/* ===== THEME VARIABLES ===== */
:root {
    --accent:       #3b6ea5;
    --accent-dark:  #2d5a8e;
    --accent-light: #ebf2fa;
    --accent-xlight:#f4f8fd;
    --bg-page:      #f2f5f9;
    --bg-card:      #ffffff;
    --border:       #dde3ec;
    --border-light: #edf0f5;
    --text-primary: #1a2433;
    --text-secondary:#475569;
    --text-muted:   #8496ad;
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== LAYOUT ===== */
body {
    font-family: 'Figtree';
    display: flex;
    height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 250px;
    background: var(--bg-card);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 16px;
    border-right: 1px solid var(--border-light);
}

/* Logo / Title */
.sidebar h2 {
    color: var(--accent);
    margin-bottom: 28px;
    font-size: 28px;
    padding: 0 6px;
}

/* Menu */
.menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 7px 10px;
    margin-bottom: 2px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-weight: 400;
    font-size: 13.5px;
}

.menu a:hover {
    background: var(--accent-xlight);
    color: var(--accent);
    border-left-color: transparent;
}

.menu a.active {
    background: var(--accent-light);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 500;
    padding-left: 10px;
}

.menu a:hover .nav-icon svg,
.menu a.active .nav-icon svg {
    stroke: var(--accent);
}

.nav-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    opacity: 0.65;
}

.menu a:hover .nav-icon,
.menu a.active .nav-icon {
    opacity: 1;
}

.menu h4 {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 14px 10px 6px;
    margin-top: 6px;
    border-top: 1px solid var(--border-light);
}

.menu h4:first-child {
    margin-top: 0;
    border-top: none;
    padding-top: 4px;
}

.menu h4 .nav-icon {
    display: none;
}

/* Logout */
.logout {
    background: rgb(255, 91, 91);
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    color: white;
}

/* ===== GLOBAL HEADER ===== */
.topheader {
    position: fixed;
    top: 0;
    left: 250px;
    right: 0;
    height: 56px;
    background: white;
    border-bottom: 1px solid var(--border-light);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    margin: 6px 8px;
    border-radius: 6px;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 14px;
    min-width: 260px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.header-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,110,165,0.12);
    background: white;
}

.header-search-icon {
    font-size: 13px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.header-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
    padding: 0;
    margin: 0;
    width: 100%;
    display: block;
}

.header-search-input::placeholder {
    color: var(--text-muted);
}

.header-kbd {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--border-light);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
}

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

.avatar-wrap {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.avatar-circle.small {
    width: 30px;
    height: 30px;
    font-size: 13px;
    flex-shrink: 0;
}

.avatar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    min-width: 200px;
    z-index: 300;
    overflow: hidden;
}

.avatar-dropdown.show {
    display: block;
}

.avatar-menu-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
}

.avatar-menu-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.avatar-menu-role {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.avatar-menu-divider {
    height: 1px;
    background: var(--border-light);
}

.avatar-menu-item {
    display: block;
    padding: 11px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.15s;
}

.avatar-menu-item:hover {
    background: var(--bg-page);
}

.avatar-logout {
    color: #ef4444;
}

/* ===== MAIN CONTENT AREA ===== */
.content {
    flex: 1;
    padding: 66px 24px 30px;
    background: var(--bg-page);
    overflow-y: auto;
    height: 100vh;
}
