/* ============================================================
   PTO Engineering — Yellow & Black Theme
   ============================================================ */

:root {
    --bg-primary:     #000000; /* Pure Black */
    --bg-secondary:   #111111; /* Dark Gray */
    --bg-card:        #1a1a1a; /* Lighter Black for cards */
    --bg-header:      #0a0a0a; /* Slightly lighter than pure black */
    --accent:         #FFD700; /* Bright Yellow */
    --accent-hover:   #ffea00; /* Brighter Yellow on Hover */
    --accent-dim:     rgba(255, 215, 0, 0.1);
    --text-primary:   #ffffff; /* Pure White */
    --text-secondary: #bbbbbb; /* Lighter Gray */
    --text-muted:     #666666; /* Darker Gray */
    --border:         rgba(255, 255, 255, 0.1);
    --border-hover:   rgba(255, 215, 0, 0.4);
    --success:        #22c55e;
    --danger:         #ef4444;
    --warning:        #f59e0b;
    --info:           #60a5fa;
    --radius:         12px;     /* Softer radius */
    --radius-lg:      20px;     /* Softer large radius */
    --shadow:         0 8px 24px rgba(0,0,0,0.7);
    --transition:     0.25s ease;
}

/* ===== SCROLL FADE-IN ANIMATION ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Roboto', system-ui, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

main {
    flex: 1;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

hr {
    border-color: var(--border);
    opacity: 0.5;
    margin: 2rem 0;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== HEADER / NAVBAR ===== */
.main-header {
    background: #111;
    border-bottom: 3px solid #F5C518;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
    padding: 0.5rem 0;
}

.main-header .navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary) !important;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: transform var(--transition);
}
.main-header .navbar-brand:hover {
    transform: scale(1.02);
}

.brand-bar {
    display: inline-block;
    width: 6px;
    height: 28px;
    background: #F5C518;
    border-radius: 3px;
    flex-shrink: 0;
}

.brand-accent {
    color: #F5C518;
    font-weight: 900;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: var(--radius);
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    transition: all var(--transition);
    border-width: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.btn-sm {
    border-radius: calc(var(--radius) - 4px);
    padding: 0.4rem 1rem;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--bg-primary);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    border-color: var(--border);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background-color: #222;
    border-color: var(--border-hover);
}

.btn-outline-primary {
    color: var(--accent);
    border-color: var(--accent);
}
.btn-outline-primary:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

.btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-outline-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-outline-danger {
    color: var(--danger);
    border-color: var(--danger);
}
.btn-outline-danger:hover {
    background-color: var(--danger);
    color: var(--text-primary);
}

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
    color: var(--text-primary);
}
.btn-success:hover {
    filter: brightness(1.1);
}

.btn-outline-info {
    color: var(--info);
    border-color: var(--info);
}
.btn-outline-info:hover {
    background-color: var(--info);
    color: var(--text-primary);
}


/* ===== CARDS ===== */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition);
}
.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.card-header, .card-footer {
    background-color: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
}
.card-footer {
    border-bottom: none;
    border-top: 1px solid var(--border);
}
.card-body {
    padding: 1.5rem;
}

/* ===== TABLES ===== */
.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border);
    --bs-table-color: var(--text-secondary);
    --bs-table-hover-bg: var(--accent-dim);
    --bs-table-hover-color: var(--text-primary);
    margin-bottom: 0;
}
.table th {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom-width: 2px !important;
    padding: 1rem;
}
.table td {
    vertical-align: middle;
    padding: 1rem;
}
.table-hover > tbody > tr:hover > * {
    color: var(--bs-table-hover-color);
    background-color: var(--bs-table-hover-bg);
}

/* ===== FORMS ===== */
.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.form-control, .form-select {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
    outline: none;
}
.form-control::placeholder {
    color: var(--text-muted);
}

/* ===== MODALS ===== */
.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.modal-header {
    border-bottom: 1px solid var(--border);
}
.modal-footer {
    border-top: 1px solid var(--border);
}
.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ===== BADGES ===== */
.badge {
    border-radius: calc(var(--radius) - 6px);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4em 0.8em;
}

/* ===== PAGE-SPECIFIC ===== */
.page-header {
    margin-bottom: 2rem;
}

/* ===== MESSAGES/TOASTS ===== */
.messages-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast-msg {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    color: var(--bg-primary);
    font-weight: 600;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: opacity 0.3s;
}
.toast-msg.success { background-color: var(--success); }
.toast-msg.error { background-color: var(--danger); }
.toast-msg.info { background-color: var(--info); }
.toast-msg.warning { background-color: var(--warning); }

.main-header .nav-link {
    color: #bbb !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1rem !important;
    border-radius: 50px;
    transition: all .25s ease;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    position: relative;
}

.main-header .nav-link:hover {
    color: #F5C518 !important;
    background: rgba(245,197,24,.08);
}

.main-header .nav-link.active {
    color: #F5C518 !important;
    background: rgba(245,197,24,.12);
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50px;
    font-size: 0.82rem;
    color: #ccc !important;
    font-weight: 500;
}

.user-badge .role-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #F5C518;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(245,197,24,.4);
}

/* Header-specific logout button */
.main-header .btn-outline-secondary {
    border-color: rgba(255,255,255,.2);
    color: #eee !important;
    border-radius: 50px;
    font-size: 0.78rem;
    padding: 0.35rem 0.9rem;
    transition: all .25s ease;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.main-header .btn-outline-secondary:hover {
    border-color: #F5C518;
    color: #F5C518 !important;
    background: rgba(245,197,24,.06);
    transform: translateY(-1px);
}

.navbar-toggler { border: 1px solid var(--border) !important; }
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 215, 0, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===== FOOTER ===== */
.main-footer {
    background: var(--bg-header);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
}

.main-footer .text-muted {
    color: var(--text-muted) !important;
    font-size: 0.85rem;
}

/* ===== BUTTONS ===== */
.btn {
    font-weight: 700;
    border-radius: 30px; /* Fully rounded */
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    transition: all var(--transition);
    padding: 0.6rem 1.5rem;
    border: 2px solid transparent;
    text-transform: uppercase;
}

.btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 2rem; font-size: 1.1rem; }

.btn-primary {
    background: var(--accent);
    color: #000 !important;
    border-color: var(--accent);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary) !important;
    border-color: var(--border);
}
.btn-secondary:hover {
    background: #2a2a2a;
    border-color: var(--border-hover);
    color: var(--text-primary) !important;
    transform: translateY(-2px);
}

.btn-outline-primary {
    background: transparent;
    color: var(--accent) !important;
    border-color: var(--accent);
}
.btn-outline-primary:hover {
    background: var(--accent);
    color: #000 !important;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    background: transparent;
    color: var(--text-secondary) !important;
    border-color: var(--border);
}
.btn-outline-secondary:hover {
    background: var(--bg-secondary);
    color: var(--text-primary) !important;
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

/* Refined color buttons */
.btn-success { background: var(--success); color: #fff !important; border-color: var(--success); }
.btn-danger  { background: var(--danger);  color: #fff !important; border-color: var(--danger); }
.btn-warning { background: var(--warning); color: #000 !important; border-color: var(--warning); }
.btn-info    { background: var(--info);    color: #fff !important; border-color: var(--info); }

.btn-success:hover { background: #1cae54; border-color: #1cae54; transform: translateY(-2px); }
.btn-danger:hover  { background: #e03434; border-color: #e03434; transform: translateY(-2px); }
.btn-warning:hover { background: #e0900a; border-color: #e0900a; transform: translateY(-2px); }
.btn-info:hover    { background: #4a94e9; border-color: #4a94e9; transform: translateY(-2px); }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
    border-color: var(--border-hover);
}

.card-header {
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-body { padding: 1.5rem; }

.card-footer {
    background: transparent;
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
}

.card-header.bg-primary {
    background: var(--accent-dim) !important;
    border-bottom-color: rgba(255, 215, 0, 0.2) !important;
    color: var(--accent) !important;
}
.card-header.bg-danger {
    background: rgba(239,68,68,0.1) !important;
    color: #f87171 !important;
    border-bottom-color: rgba(239,68,68,0.2) !important;
}
.card-header.bg-success {
    background: rgba(34,197,94,0.1) !important;
    color: #4ade80 !important;
    border-bottom-color: rgba(34,197,94,0.2) !important;
}

/* ===== TABLES ===== */
.table {
    color: var(--text-primary);
    border-color: var(--border);
    margin-bottom: 0;
}

.table th {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid var(--border) !important;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.02);
    white-space: nowrap;
}

.table td {
    border-color: var(--border);
    padding: 1rem 1.25rem;
    vertical-align: middle;
    font-size: 0.9rem;
}

.table-hover tbody tr:hover {
    background: var(--accent-dim);
    color: var(--text-primary);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background: rgba(255,255,255,0.02);
    color: var(--text-primary);
}

.table-dark th {
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    border-color: var(--border);
}

.table-responsive {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

/* ===== FORMS ===== */
.form-control, .form-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-control:focus, .form-select:focus {
    background: var(--bg-secondary);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 4px var(--accent-dim);
    outline: none;
}

.form-control::placeholder { color: var(--text-muted); }
.form-select option, .form-control option { background: var(--bg-card); color: var(--text-primary); }

.form-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

textarea.form-control { resize: vertical; min-height: 120px; }

.form-check-input {
    background-color: var(--bg-secondary);
    border-color: var(--border);
    border-radius: 4px;
}
.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}
.form-check-input[type=checkbox] { border-radius: 4px; }
.form-check-input[type=radio] { border-radius: 50%; }


/* ===== BADGES ===== */
.badge {
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 0.4em 0.9em;
    border-radius: 30px;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.badge.bg-primary { background: var(--accent-dim) !important; color: var(--accent) !important; border-color: var(--accent-dim); }
.badge.bg-info    { background: rgba(96,165,250,0.15) !important; color: #93c5fd !important; border-color: rgba(96,165,250,0.2); }
.badge.bg-secondary { background: rgba(139,147,169,0.15) !important; color: #9ba3b8 !important; border-color: rgba(139,147,169,0.2); }
.badge.bg-success { background: rgba(34,197,94,0.15) !important; color: #4ade80 !important; border-color: rgba(34,197,94,0.2); }
.badge.bg-danger  { background: rgba(239,68,68,0.15) !important; color: #f87171 !important; border-color: rgba(239,68,68,0.2); }
.badge.bg-warning { background: rgba(245,158,11,0.15) !important; color: #fcd34d !important; border-color: rgba(245,158,11,0.2); }
.badge.bg-dark    { background: #2a2a2a !important; color: var(--text-secondary) !important; border-color: #3a3a3a; }

/* ===== STATUS BADGE CUSTOM ===== */
.status-new       { background: rgba(96,165,250,0.15); color: #93c5fd; border: 1px solid rgba(96,165,250,0.2); }
.status-calc      { background: rgba(245,158,11,0.15); color: #fcd34d; border: 1px solid rgba(245,158,11,0.2); }
.status-sent      { background: rgba(139,92,246,0.15); color: #c4b5fd; border: 1px solid rgba(139,92,246,0.2); }
.status-approved  { background: rgba(34,197,94,0.15);  color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.status-rejected  { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.status-completed { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-dim); }
.status-progress  { background: rgba(59,130,246,0.15); color: #7dd3fc; border: 1px solid rgba(59,130,246,0.2); }

/* ===== ALERTS ===== */
.alert {
    border-radius: var(--radius);
    border: 1px solid transparent;
    padding: 1.25rem 1.5rem;
    font-size: 0.9rem;
}

.alert-info    { background: rgba(96,165,250,0.1);  color: #93c5fd; border-color: rgba(96,165,250,0.25); }
.alert-success { background: rgba(34,197,94,0.1);   color: #86efac; border-color: rgba(34,197,94,0.25); }
.alert-danger  { background: rgba(239,68,68,0.1);   color: #fca5a5; border-color: rgba(239,68,68,0.25); }
.alert-warning { background: rgba(245,158,11,0.1);  color: #fde68a; border-color: rgba(245,158,11,0.25); }

/* ===== MODALS ===== */
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    box-shadow: 0 10px 50px rgba(0,0,0,0.8);
}
.modal-header { border-bottom: 1px solid var(--border); padding: 1.5rem; }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid var(--border); padding: 1.25rem 1.5rem; }
.modal-header.bg-danger { background: rgba(239,68,68,0.1) !important; }
.modal-backdrop.show { opacity: 0.7; backdrop-filter: blur(5px); }
.btn-close { filter: invert(1) brightness(2); opacity: 0.7; }
.btn-close:hover { opacity: 1; }

/* ===== PROGRESS ===== */
.progress {
    background: var(--bg-secondary);
    border-radius: 30px;
    overflow: hidden;
    height: 1rem;
}

.progress-bar {
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.75rem;
    transition: width 0.6s cubic-bezier(.4,0,.2,1);
    background-color: var(--accent);
    color: #000;
}

/* ===== TOAST MESSAGES ===== */
.messages-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1056;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-msg {
    min-width: 280px;
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateX(100%);
    animation: toast-in 0.5s forwards;
}

@keyframes toast-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-msg.success { border-left-color: var(--success); }
.toast-msg.error { border-left-color: var(--danger); }
.toast-msg.warning { border-left-color: var(--warning); }
.toast-msg.info { border-left-color: var(--info); }


.progress-bar.bg-success {
    background: linear-gradient(90deg, #16a34a, #22c55e) !important;
}

/* ===== PAGE HEADER ===== */
.page-header {
    padding: 2.5rem 0 1.75rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.page-header h1 {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0 0 0.5rem;
}

.page-header::after {
    content: '';
    display: block;
    width: 44px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin-top: 0.75rem;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition);
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}
.stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.5rem;
}

/* ===== DASHBOARD HERO ===== */
.dashboard-hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border);
    padding: 3rem 0 2.5rem;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -5%;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(245,197,24,0.055) 0%, transparent 65%);
    pointer-events: none;
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(96,165,250,0.03) 0%, transparent 60%);
    pointer-events: none;
}

.dashboard-hero h1 {
    font-size: 2.3rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.9rem;
    background: rgba(245,197,24,0.1);
    border: 1px solid rgba(245,197,24,0.28);
    border-radius: 20px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 0.6rem;
}

/* ===== ACTION CARDS (dashboard) ===== */
.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    cursor: default;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}
.action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: rgba(245,197,24,0.3);
}
.action-card .action-icon {
    font-size: 2.5rem;
    line-height: 1;
}
.action-card h5 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}
.action-card p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin: 0;
}

/* ===== AUTH PAGES ===== */
.auth-wrapper {
    min-height: calc(100vh - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(ellipse at 25% 50%, rgba(245,197,24,0.05) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 20%, rgba(96,165,250,0.03) 0%, transparent 50%),
        var(--bg-primary);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 448px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}
.auth-brand .brand-bar { height: 26px; }
.auth-brand span {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.auth-card h2 {
    font-size: 1.45rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.35rem;
}
.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.85rem;
    margin-bottom: 1.75rem;
}

/* ===== FILTER FORM ===== */
.filter-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
}

/* ===== CHAT ===== */
.chat-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
    max-height: 720px;
    box-shadow: var(--shadow);
}

.chat-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.025);
    flex-shrink: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: var(--bg-secondary);
}

.msg {
    max-width: 68%;
    animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

.msg.own { align-self: flex-end; }
.msg.other { align-self: flex-start; }

.msg-bubble {
    padding: 0.65rem 0.95rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.5;
}
.msg.own .msg-bubble {
    background: rgba(245,197,24,0.14);
    border: 1px solid rgba(245,197,24,0.22);
    border-bottom-right-radius: 3px;
}
.msg.other .msg-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom-left-radius: 3px;
}
.msg-meta {
    font-size: 0.69rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    padding: 0 0.1rem;
}
.msg.own .msg-meta { text-align: right; }
.msg-author { font-weight: 700; color: var(--accent); font-size: 0.75rem; margin-bottom: 0.1rem; }

.chat-input-area {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,0.018);
    flex-shrink: 0;
}

/* ===== CALCULATOR FORM ===== */
.calculator-section { background: transparent; padding: 0; }

.calculator-step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.calculator-step h3 { font-size: 1.15rem; margin-bottom: 1.5rem; }

.nav-pills .nav-link {
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.78rem;
    font-weight: 600;
    transition: all var(--transition);
}
.nav-pills .nav-link.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* ===== SECTION ACCENT LINE ===== */
.section-title {
    font-size: 1.3rem;
    font-weight: 800;
    position: relative;
    padding-bottom: 0.6rem;
    margin-bottom: 1.25rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    color: var(--text-secondary);
}
.empty-state .empty-icon {
    font-size: 3rem;
    opacity: 0.45;
    margin-bottom: 1rem;
    display: block;
}
.empty-state h5 { color: var(--text-primary); margin-bottom: 0.5rem; }

/* ===== TOAST / MESSAGES ===== */
.messages-container {
    position: fixed;
    top: 75px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 360px;
}

.toast-msg {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    animation: slideIn 0.25s ease;
    cursor: pointer;
    border: 1px solid;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; } }

.toast-msg.success { background: rgba(34,197,94,0.12); color: #86efac; border-color: rgba(34,197,94,0.25); }
.toast-msg.error,
.toast-msg.danger   { background: rgba(239,68,68,0.12); color: #fca5a5; border-color: rgba(239,68,68,0.25); }
.toast-msg.warning  { background: rgba(245,158,11,0.12); color: #fde68a; border-color: rgba(245,158,11,0.25); }
.toast-msg.info     { background: rgba(96,165,250,0.12);  color: #93c5fd; border-color: rgba(96,165,250,0.25); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .dashboard-hero h1 { font-size: 1.7rem; }
    .auth-card { padding: 1.75rem 1.25rem; }
    .page-header h1 { font-size: 1.5rem; }
    .msg { max-width: 88%; }
    .chat-wrap { height: calc(100vh - 120px); }
}