/* Base styles */

/* a) Global resets */

/* ============================================================
   THEME VARIABLES – what each root variable controls
   --bs-body-color               : Default text color for the entire page body.
   --bs-body-bg                  : Default background color for the entire page body.
   ============================================================ */

:root {
    /* ---- THEME VARIABLES (kept current values until green-lit) ---- */
    --bs-body-color: #212529;
    --bs-body-color-rgb: 33, 37, 41;
    --bs-body-bg: #fff;
    --bs-heading-color: #212529;
    --bs-emphasis-color: #000;
    --bs-emphasis-color-rgb: 0, 0, 0;
    --bs-border-color: #dee2e6;
    --bs-border-color-translucent: rgba(0, 0, 0, 0.175);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
    line-height: 1;
}

[class*="col-"][class*="-2"], [class*="col-"][class*="-3"], [class*="col-"][class*="-4"], [class*="col-"][class*="-6"] { 
    padding-bottom: 0.640rem !important; 
}

/* b) Buttons */

/* ============================================================
   BUTTON VARIABLES – what each CSS variable controls
   --bs-btn-color                : Text color of the button in its normal (idle) state.
   --bs-btn-bg                   : Background color of the button in its normal state.
   --bs-btn-border-color         : Border color of the button in its normal state.
   --bs-btn-hover-color          : Text color when the user hovers over the button.
   --bs-btn-hover-bg             : Background color on hover.
   --bs-btn-hover-border-color   : Border color on hover.
   --bs-btn-focus-shadow-rgb     : RGB values for the focus ring shadow (used with opacity).
   --bs-btn-active-color         : Text color when the button is active (pressed or checked).
   --bs-btn-active-bg            : Background color when active.
   --bs-btn-active-border-color  : Border color when active.
   --bs-btn-disabled-color       : Text color when the button is disabled.
   --bs-btn-disabled-bg          : Background color when disabled.
   --bs-btn-disabled-border-color: Border color when disabled.
   --bs-btn-box-shadow           : Default shadow behind the button (gives a slight 3D raised appearance).
   --bs-btn-disabled-opacity     : Opacity of the button when disabled (e.g., 0.65 makes it faded).
   --bs-btn-focus-box-shadow     : Focus ring shadow applied when the button is focused via keyboard (uses RGB values from --bs-btn-focus-shadow-rgb).
   ============================================================ */

.btn {
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
    --bs-btn-disabled-opacity: 0.65;
    --bs-btn-focus-box-shadow: 0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);
}

.btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #6c757d;
    --bs-btn-border-color: #6c757d;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #5c636a;
    --bs-btn-hover-border-color: #565e64;
    --bs-btn-focus-shadow-rgb: 130, 138, 145;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #565e64;
    --bs-btn-active-border-color: #51585e;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #6c757d;
    --bs-btn-disabled-border-color: #6c757d
}

.btn-dark {
    --bs-btn-color: #fff;
    --bs-btn-bg: #212529;
    --bs-btn-border-color: #212529;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #424649;
    --bs-btn-hover-border-color: #373b3e;
    --bs-btn-focus-shadow-rgb: 66, 70, 73;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #4d5154;
    --bs-btn-active-border-color: #373b3e;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #212529;
    --bs-btn-disabled-border-color: #212529
}

.btn-outline-secondary {
    --bs-btn-color: #6c757d;
    --bs-btn-border-color: #6c757d;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #6c757d;
    --bs-btn-hover-border-color: #6c757d;
    --bs-btn-focus-shadow-rgb: 108, 117, 125;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #6c757d;
    --bs-btn-active-border-color: #6c757d;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #6c757d;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #6c757d;
    --bs-gradient: none
}

.btn-outline-dark {
    --bs-btn-color: #212529;
    --bs-btn-border-color: #212529;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #212529;
    --bs-btn-hover-border-color: #212529;
    --bs-btn-focus-shadow-rgb: 33, 37, 41;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #212529;
    --bs-btn-active-border-color: #212529;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #212529;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #212529;
    --bs-gradient: none
}

/* c) Header */
header {
    background-color: #F5F5F5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    position: relative;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.24);
    z-index: 2;
    padding: 0 1rem;
    height: 3.75rem;
}

.header-left { 
    gap: 1rem; 
}

/* Sidebar toggle button – visual styles (same on all devices) */
.sidebar-toggle-btn {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-size: 1.2rem;
    padding: 0.125rem 0.375rem;
    min-width: 2rem;
    min-height: 2rem;
}

.sidebar-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #111;
    border-color: rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
    transform: scale(1.02);
}

.sidebar-toggle-btn:active {
    transform: scale(0.94);
    background: rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* d) Logout button */
.btn.logout-btn {
    background: linear-gradient(180deg, #e0e0e0 0%, #cfcfcf 100%);
    color: #111111;
    border: 1px solid rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    --bs-btn-focus-shadow-rgb: 102, 102, 102;
}

.btn.logout-btn:hover {
    background: linear-gradient(180deg, #d0d0d0 0%, #bdbdbd 100%);
    transform: translateY(-1px);
    border-color: rgba(0, 0, 0, 0.25); /* maintains visibility */
}

.btn.logout-btn:active {
    background: linear-gradient(180deg, #bdbdbd 0%, #ababab 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(0);
}

/* e) Sidebar */
.sidebar {
    background-color: #F5F5F5;
    border-right: 1px solid rgba(0, 0, 0, 0.25);
    box-shadow: 6px 0 12px rgba(0, 0, 0, 0.24);
    padding: 1rem;
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 0.75rem;
}

.sidebar ul li a {
    display: block;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: #666;
    background: linear-gradient(180deg, #e0e0e0 0%, #cfcfcf 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    padding: 0.5rem 0.625rem;
    border-radius: 0.625rem;
}

.sidebar ul li a:hover {
    background: linear-gradient(180deg, #d4d4d4 0%, #bcbcbc 100%);
    color: #222;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.sidebar ul li.active a {
    background: linear-gradient(180deg, #bfbfbf 0%, #9f9f9f 100%);
    color: #111;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.10);
    border-left: 4px solid #444;
}

.sidebar ul li.active a:hover {
    background: linear-gradient(180deg, #b0b0b0 0%, #909090 100%);
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.10);
    transform: translateY(-1px);
}

.sidebar ul li.active-parent > a {
    background: linear-gradient(180deg, #bfbfbf 0%, #9f9f9f 100%);
    color: #111;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.10);
    border-left: 4px solid #444;
}

.sidebar ul li.active-parent > a:hover {
    background: linear-gradient(180deg, #c0c0c0 0%, #a0a0a0 100%);
}

.sidebar .sub-menu {
    padding-left: 1rem;
    margin-top: 0.5rem;
}

#mainContent {
    flex: 1 1 auto;
    min-width: 0;
    padding: 1rem;
    background-color: #FFFFFF;
}

/* f) Footer */
#footer {
    background-color: #F5F5F5;
    border-top: 1px solid rgba(0, 0, 0, 0.25);
    position: relative;
    box-shadow: 0 -6px 12px rgba(0, 0, 0, 0.24);
    z-index: 2;
    text-transform: uppercase;
    color: #3f3f3f;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    font-size: 0.625rem;
    padding: 0 1.25rem;
}

#footer p {
    display: inline-block;
    margin: 0;
    padding: 0.625rem 0;
}