:root {
    --bg-primary: #f4f6f9;
    --sidebar-bg: #304a87;
    --sidebar-hover: #334155;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --text-light: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --header-bg: #ffffff;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --success-color: #10b981;
}
/* --- SIDENAV STYLE BASICS --- */
.sidenav {
    width: 260px;
    background: #0f172a;
    height: 100vh;
    padding: 20px 16px;
    color: #94a3b8;
}

.menu-list { list-style: none; }
.menu-item-group { margin-bottom: 4px; }

.menu-item, .submenu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;    font-size: 12px;
    transition: all 0.2s ease;
}

.menu-item i, .submenu-item i {
    width: 24px;
    font-size: 1.1rem;
}

.menu-item:hover, .submenu-item:hover {
    background: #304a87;
    color: #f8fafc;
}

/* Arrow rotation modifier */
.arrow-icon {
    margin-left: auto;
    font-size: 0.8rem !important;
    transition: transform 0.2s ease;
}

/* --- SUBMENU ANIMATION MATRIX --- */
.submenu {
    list-style: none;
    padding-left: 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0, 1, 0, 1); /* Snappy accordion feel */
}

/* Parent Dropdown OPEN State */
.has-dropdown.open .submenu {
    max-height: 500px; /* Big enough to clear structural children bounds */
    transition: max-height 0.25s cubic-bezier(1, 0, 1, 0);
}

.has-dropdown.open .arrow-icon {
    transform: rotate(90deg);
}

/* --- ACTIVE TARGET STATES --- */
/* Highlights the precise active nested item page */
.submenu-item.active {
    color: #ffffff;    font-size: 12px;
        background-color: #304a87;
}

/* Optional: Subtle background indicator for open parent category */
.has-dropdown.open > .menu-item {
    color: #f8fafc;
    background: #304a87;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-primary);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* --- LEFT SIDEBAR --- */
.sidebar {
    width: 260px;
    background-color: #16264c;
    color: white;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-brand {
    padding: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid var(--sidebar-hover);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-item {
    padding: 12px 24px;
    display: flex;
    align-items: center;
        color: white;
    text-decoration: none;
    cursor: pointer;
        font-size: 13px;
    transition: background 0.2s;
}

.menu-item:hover, .menu-item.active {
  background-color: #304a87;
  color: white;
}

.menu-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Sub-menu styling */
.submenu {
    list-style: none;
    background-color: #0f172a;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.submenu.open { max-height: 200px; }
.submenu .menu-item { padding-left: 50px; font-size: 12px; }
.chevron { transition: transform 0.3s; }
.chevron.rotate { transform: rotate(90deg); }

/* --- MAIN CONTENT AREA --- */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top Header */
.header {
    height: 65px;
    background-color: var(--header-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.page-title {
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 600;
}

/* --- RIGHT USER PROFILE DROPDOWN --- */
.user-profile { position: relative; }
.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.profile-trigger:hover { background-color: var(--bg-primary); }
.profile-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #16264c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: 50px;
    width: 200px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    display: none;
    flex-direction: column;
    z-index: 100;
}

.profile-dropdown.show { display: flex; }
.dropdown-item {
    padding: 12px 16px;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}
.dropdown-item:hover { background-color: var(--bg-primary); }
.dropdown-divider { height: 1px; background-color: var(--border-color); margin: 4px 0; }

.content-body { padding: 30px; overflow-y: auto; flex-grow: 1; }
