/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: #ffffff;
    overflow: hidden;
    overflow-x: hidden;
    width: 100%;
}

body.dashboard-page {
    overflow: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    position: relative !important;
    width: 100%;
    background: #ffffff;
}

body.dashboard-page html {
    overflow: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    background: rgb(248, 250, 252);
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden !important;
    z-index: 100;
    padding: 0;
    box-sizing: border-box;
}

/* Force border-radius on active nav items */

.sidebar-header {
    padding: 20px 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar-logo {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.02em;
    font-family: 'Inter', sans-serif;
    position: relative;
    display: inline-block;
}

.sidebar-logo .logo-accent {
    position: absolute;
    top: -4px;
    left: 0.3em;
    font-size: 9px;
    font-weight: 400;
    line-height: 1;
    color: #1e293b;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 1.5rem;
    overflow-y: auto;
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100%;
    position: relative;
    box-sizing: border-box;
}

.nav-section {
    margin-bottom: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.nav-li {
    list-style: none;
    padding: 0;
    margin: 0 0 2px 0;
    width: 100%;
    border-radius: 6px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    transition: background 0.15s;
}

.nav-li:hover:not(.active) {
    background: #ddd !important;
}

.nav-li:hover:not(.active) .nav-item {
    color: rgb(30, 41, 59) !important;
}

.nav-li:hover:not(.active) .nav-icon {
    color: rgb(30, 41, 59) !important;
}

.nav-li.active {
    background: rgb(219, 234, 254) !important;
    border-radius: 6px !important;
    -webkit-border-radius: 6px !important;
    -moz-border-radius: 6px !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 1;
}

.nav-li.active .nav-item {
    color: rgb(29, 78, 216) !important;
    border-radius: 6px !important;
    -webkit-border-radius: 6px !important;
    -moz-border-radius: 6px !important;
}

.nav-li.active .nav-icon {
    color: rgb(29, 78, 216) !important;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 0 6px;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.nav-item {
    display: flex !important;
    align-items: center !important;
    padding: 8px 12px !important;
    color: rgb(30, 41, 59);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
    position: relative;
    gap: 10px !important;
    box-sizing: border-box !important;
    white-space: nowrap;
    min-height: 36px !important;
    justify-content: flex-start !important;
    width: 100%;
    background: transparent !important;
    border-radius: 6px !important;
    -webkit-border-radius: 6px !important;
    -moz-border-radius: 6px !important;
}


.nav-li.active .nav-item {
    color: rgb(29, 78, 216) !important;
}


.nav-icon {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
    color: #94a3b8;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-item.active .nav-icon {
    color: rgb(29, 78, 216) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-item.active .nav-text {
    color: rgb(29, 78, 216) !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
    position: relative;
    z-index: 1;
}


.nav-text {
    flex: 1;
    white-space: nowrap;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}

.nav-badge {
    background: #0066ff;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

/* Sidebar Profiles Section */
.sidebar-profiles {
    padding: 16px 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: rgb(248, 250, 252);
}

.profiles-title {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
}

.profiles-list {
    display: flex;
    gap: -8px;
    margin-bottom: 10px;
    margin-left: -4px;
}

.profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 2px solid #ffffff;
    margin-left: -4px;
}

.profile-avatar:first-child {
    margin-left: 0;
}

.profile-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #cbd5e1;
}

.btn-profile-new {
    width: 100%;
    padding: 7px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    outline: none;
}

.btn-profile-new:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.btn-profile-new:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.btn-profile-new.disabled {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    pointer-events: none;
}

/* Dashboard Main */
.dashboard-main {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    width: calc(100% - 240px);
    max-width: calc(100% - 240px);
    background: #ffffff;
}

/* Dashboard Header */
.dashboard-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    height: 36px;
    padding: 0 14px;
    box-sizing: border-box;
    background: #f0f2f5;
    color: #1e293b;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
    outline: none;
}

.header-btn:hover {
    background: #e2e8f0;
}

.header-btn:focus {
    outline: none;
    box-shadow: none;
}

.header-btn-icon {
    flex-shrink: 0;
    color: #64748b;
}

.dropdown-arrow {
    font-size: 10px;
    color: #64748b;
}

.header-icon-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
    line-height: 1;
    border-radius: 8px;
    border: none;
    background: #f0f2f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    color: #64748b;
    outline: none;
}

.header-icon-btn .icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.header-icon-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.header-icon-btn:focus {
    outline: none;
    box-shadow: none;
}

.header-profile {
    margin-left: 8px;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #ffffff;
}

/* ── Sidebar Footer ── */
.sidebar-footer {
    padding: 12px 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: rgb(248, 250, 252);
    margin-top: auto;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 10px;
    color: #94a3b8;
    font-family: 'Inter', sans-serif;
    text-transform: capitalize;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.15s;
    flex-shrink: 0;
}

.sidebar-logout:hover {
    background: #fee2e2;
    color: #dc2626;
}

