/* GLOBAL RESET */
body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #1e293b;
    padding: 18px 30px;
    color: white;
    font-size: 20px;
    font-weight: bold;
    z-index: 1000;
}

/* MAIN LAYOUT */
.layout {
    display: flex;
    height: 100vh; /* sidebar uses full height */
    margin-top: 20px; /* push content below header */
}

/* SIDEBAR */
/* REMOVE BULLETS GLOBALLY */
.menu, .menu li, .submenu, .submenu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* SIDEBAR */
.sidebar {
    width: 240px;
    background: #0f172a;
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0;
    padding-top: 20px;
    overflow-y: auto;
}

/* MAIN MENU LINKS */
.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 15px;
    transition: background 0.15s;
}

.sidebar a:hover {
    background: #1e293b;
}

/* ICONS */
.sidebar i {
    width: 18px;
    height: 18px;
}

/* COLLAPSIBLE TITLE */
.collapsible .section-header {
    color: #cbd5e1;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.section-header:hover {
    background: #1e293b;
}

/* CHEVRON ICON ROTATION */
.chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
}

/* SUBMENU */
.submenu li a {
    padding-left: 40px;
}

/* COLLAPSE/EXPAND ANIMATION */
.submenu {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.25s ease;
}

.submenu.open {
    max-height: 200px; /* enough for 5 submenu items */
    opacity: 1;
}


/* CONTENT */
.content {
    margin-left: 240px;  /* match sidebar width */
    padding: 40px;
    width: calc(100% - 240px);
    height: calc(100vh - 60px);
    overflow-y: auto;
}

/* TABLE */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th {
    text-align: left;
    padding: 10px 0;
}

.table td {
    padding: 12px 0;
    border-top: 1px solid #e5e7eb;
}

/* BUTTONS */
.btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-small {
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    padding: 6px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.btn-small:hover {
    background: #cbd5e1;
}

/* INPUTS */
.input {
    width: 97%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    margin-bottom: 12px;
}

/* DRAWER OVERLAY */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 900;
}

/* DRAWER PANEL (HIDDEN BY DEFAULT) */
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 12px rgba(0,0,0,0.18);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
}

/* DRAWER VISIBLE STATE */
.drawer.open {
    transform: translateX(0);
}

.drawer-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* DRAWER HEADER */
.drawer-header {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    margin-top: 70px;
}

.drawer-close {
    float: right;
    cursor: pointer;
    font-size: 20px;
}
