/* ============================================================
   TEMPORARY OPS / DASHBOARD THEME
   Light SaaS-style palette — does NOT touch main site until merge
   ============================================================ */

:root {
    /* Primary Palette */
    --primary: #0099ff;       /* Vibrant but clean blue */
    --secondary: #00c4ff;     /* Softer cyan for secondary elements */
    --accent: #0f3d6e;        /* Deep navy for headers / contrast */

    /* Backgrounds */
    --bg: #f8fbfd;            /* Lightest, airy base background */
    --bg-alt: #e8f4f8;        /* Slight tint for layout sections */
    --card: #ffffff;          /* White cards – consistent depth */

    /* Text Colors */
    --text: #1e293b;          /* Dark slate — excellent contrast */
    --text-muted: #64748b;    /* Soft muted text */
    --border: rgba(15, 61, 110, 0.12);

    /* Utility Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger:  #ef4444;
    --info:    #0ea5e9;

    /* Element Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-xl: 16px;

    --mobile-nav-offset: 40px;
}

/* ============================================================
   BASE TYPOGRAPHY / RESET (Dashboard-only, non-interfering)
   ============================================================ */

body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.4;

    min-height: 100vh;
    display: flex;
    flex-direction: column; 
}

main {
    flex: 1;
} 
/* Anchor Defaults */
a {
    color: var(--primary);
    text-decoration: none;
}

/* ============================================================
   DASHBOARD CONTAINER (BASE)
   ============================================================ */

.container {
    width: 100%;
    padding: 16px;
    margin: 0 auto;
    flex: 1; /* allows footer to flush properly */
}
a:hover {
    text-decoration: underline;
}

/* Simple Utility Classes */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }

/* ============================================================
   CARDS / PANELS (SaaS dashboard blocks)
   ============================================================ */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
}

.card h2 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--accent);
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text);
    font-size: 0.95rem;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    outline: none;
    background: #ffffff;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 10px 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover {
    opacity: 0.95;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

/* ============================================================
   BADGES
   ============================================================ */

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active {
    background: rgba(16,185,129,0.15);
    color: var(--success);
}

.badge-inactive {
    background: rgba(239,68,68,0.15);
    color: var(--danger);
}

/* ============================================================
   HEADER BAR
   ============================================================ */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

.top-bar-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
}

.pill-role {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    font-size: 0.75rem;
}

/* ============================================================
   MOBILE-FIRST LAYOUT
   ============================================================ */

@media (min-width: 768px) {
    .container {
        max-width: 1100px;
        padding: 24px;
    }
}


/* ============================================================
   AUTH PAGE STYLES (Login Page)
   ============================================================ */

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--bg);
    color: var(--text);
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 18px 24px;
}

.auth-header {
    text-align: center;
    margin-bottom: 18px;
}

.auth-header h1 {
    font-size: 1.4rem;
    margin-bottom: 4px;
    color: var(--accent);
}

.auth-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.auth-input {
    width: 100%;
    padding: 10px 11px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.auth-input:focus {
    border-color: var(--primary);
    outline: none;
    background: #ffffff;
}

.auth-error {
    margin-bottom: 10px;
    padding: 8px 10px;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    background: rgba(239,68,68,0.12);
    color: var(--danger);
}

.auth-submit {
    width: 100%;
    padding: 10px 11px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}

.auth-submit:hover {
    opacity: .95;
}

.auth-footer {
    margin-top: 12px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}


.card-thumb {
	margin-bottom: 10px;
}

.card-thumb img {
	width: 100%;
	max-height: 160px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid var(--border);
	background: #f8f8f8;
}



/* ============================================================
   DASHBOARD HAMBURGER NAV
   ============================================================ */

.top-bar-left {
    display: flex;
    flex-direction: column;   /* STACK logo + user vertically */
    align-items: flex-start;  /* left align */
    gap: 6px;                 /* subtle spacing */
}

.top-bar-user {
    font-size: 0.8rem;
    line-height: 1.25;
    color: var(--text-muted);
}

.top-bar-right {
    position: relative;
}

/* Hamburger button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    width: 100%;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: 0.25s ease;
}

/* Desktop nav */
.main-nav {
    display: flex;
    
    gap: 12px;
}

.main-nav a {
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ============================================================
   MOBILE BEHAVIOR
   ============================================================ */

@media (max-width: 760px) {

    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        margin-top: calc(-1 * var(--mobile-nav-offset, 40px));
        display: none;
        flex-direction: column;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        min-width: 220px;
        padding: 8px 0;
        z-index: 999;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav a {
        padding: 10px 16px;
        border-bottom: 1px solid var(--border);
    }

    .main-nav a:last-child {
        border-bottom: none;
    }

    .main-nav .pill-role {
        margin: 6px 16px 8px;
        text-align: center;
    }
}
/* ============================================================
   DASHBOARD FOOTER
   ============================================================ */

.dashboard-footer {
    border-top: 1px solid var(--border);
    background: var(--card);
    margin-top: auto; /* THIS is what flushes it to bottom */
}

.dashboard-footer-inner {
    padding: 14px 16px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dashboard-footer-inner a {
    color: var(--primary);
}




/* ============================================================
   DASHBOARD SUB-NAV (NAV GROUPS)
   ============================================================ */

.nav-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.nav-group-toggle {
    background: none;
    border: none;
    text-align: left;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
}

.nav-group-toggle::after {
    content: "▾";
    float: right;
    font-size: 0.7rem;
    opacity: 0.6;
    margin-left: 4px;
    position: relative;
    top: 1px; /* tiny optical correction */
}


.nav-group-menu {
    display: none;
    flex-direction: column;
    padding-left: 12px;
}

.nav-group-menu a {
    font-size: 0.85rem;
    padding: 8px 16px;
    color: var(--text-muted);
}

.nav-group-menu a:hover {
    color: var(--primary);
}

/* Expanded state */
.nav-group.open .nav-group-menu {
    display: flex;
}

.nav-group.open .nav-group-toggle::after {
    transform: rotate(180deg);
}


/* ============================================================
   DESKTOP SUB-NAV DROPDOWN
   ============================================================ */

@media (min-width: 761px) {

    .nav-group-menu {
        position: absolute;
        top: 100%;
        right: 0;
        
        min-width: 220px;

        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);

        padding: 10px 0;
        box-shadow: 0 6px 18px rgba(0,0,0,0.08);

        z-index: 1000;
    }

    .nav-group-menu a {
        
        padding: 14px 22px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
}



/* ============================================================
   NAV ITEM NORMALIZATION (LINKS + BUTTONS)
   ============================================================ */

.main-nav a,
.nav-group-toggle {
    display: inline-flex;
    align-items: center;

    height: auto;              /* KEY: consistent vertical box */
    line-height: auto;

    padding: 10px 8px;
    font-size: 0.9rem;
    font-weight: 500;

    color: var(--primary);
    background: none;
    border: none;

    cursor: pointer;
}


/* ============================================================
   MOBILE NAV SPACING FIX
   ============================================================ */

@media (max-width: 760px) {

    .main-nav a,
    .nav-group-toggle {
        height: auto;
        line-height: 1.4;
        padding: 12px 16px;   /* comfortable tap target */
        font-size: 0.95rem;
    }

    .nav-group-menu a {
        padding: 10px 16px;
    }
}


