﻿/* =========================================================
   Existing ASP.NET Core defaults (kept)
   ========================================================= */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

/*body {
    margin-bottom: 60px;
}*/

/* =========================================================
   ERP Processor – Consolidated page styles
   (from Dashboard, Compare, OrderIntake, Dashboard_Operations, Index)
   ========================================================= */

/* Shared resets used by Dashboard / OrderIntake / Operations */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
    overflow-x: hidden;
}

.container,
.container-fluid {
    padding: 0 !important;
    margin: 0 !important;
}

footer,
.footer {
    display: none !important;
}

#relatedProductNumbersTableBodyLeft tr.selected-row td {
    background-color: #166534;
    color: #ffffff;
    font-weight: 600;
}

#relatedPartNumbersTableBodyLeft tr.selected-row td {
    background-color: #9a3412;
    color: #ffffff;
    font-weight: 600;
}

#relatedProductNumbersTableBodyLeft tr,
#relatedPartNumbersTableBodyLeft tr {
    cursor: pointer;
}

#relatedFinalPartNumbersTableBodyLeft tr.selected-row td {
    background-color: #0369a1;
    color: #ffffff;
    font-weight: 600;
}

#relatedFinalPartNumbersTableBodyLeft tr {
    cursor: pointer;
}

/* =========================================================
   Sidebar – consolidated (icons + collapsed support)
   ========================================================= */

.sidebar {
    width: 295px;
    background: #2c3e50;
    color: white;
    padding: 15px;
    overflow: visible;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 100;
}

    .sidebar .nav-section {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .sidebar.collapsed {
        width: 72px;
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Nav items */
    .sidebar .nav-item {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        padding: 10px 8px;
        border-radius: 6px;
        user-select: none;
        white-space: nowrap;
        font-weight: 500;
        margin-bottom: 2px;
    }

        .sidebar .nav-item:hover {
            background: rgba(255, 255, 255, 0.08);
        }

.nav-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* Sub-menus */
.sidebar .sub-menu {
    padding-left: 18px;
    margin-bottom: 6px;
}

.sidebar .sub-item {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    padding: 6px 8px;
    font-size: 0.92rem;
    border-radius: 4px;
    white-space: nowrap;
}

    .sidebar .sub-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

/* Toggle button */
.sidebar-toggle {
    position: absolute;
    top: 18px;
    right: -14px;
    width: 26px;
    height: 26px;
    background: #3498db;
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 12px;
    font-weight: bold;
    z-index: 200;
    transition: transform 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.sidebar.collapsed .sidebar-toggle {
    transform: rotate(180deg);
}

/* Bottom action buttons */
.sidebar-bottom {
    margin-top: auto;
    padding: 20px 8px 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-btn {
    border-radius: 6px;
    text-align: center;
}

    .sidebar-btn button {
        background: none;
        border: none;
        color: white;
        font-size: 15px;
        cursor: pointer;
        width: 100%;
        padding: 12px 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

.clear-btn {
    background: #e67e22;
}

.logout-btn {
    background: #e74c3c;
}

.btn-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ===== Collapsed state ===== */
.sidebar.collapsed .nav-item-text,
.sidebar.collapsed .btn-text,
.sidebar.collapsed .sub-item {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px 0;
}

.sidebar.collapsed .nav-icon {
    font-size: 1.3rem;
}

.sidebar.collapsed .sidebar-btn button {
    padding: 14px 0;
}

.sidebar.collapsed .btn-icon {
    font-size: 1.35rem;
}

/* Better collapsed padding & centering */
.sidebar.collapsed {
    padding-left: 8px;
    padding-right: 8px;
}

    /* Make the bottom buttons look nicer when collapsed */
    .sidebar.collapsed .sidebar-btn {
        margin: 0 2px;
    }

/* Optional: prevent text from jumping during collapse */
.nav-item-text,
.btn-text {
    transition: opacity 0.2s ease;
}

/* ---------- Compare page ---------- */
.compare-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
}

.compare-header {
    background: #3498db;
    color: white;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 0 0 44px;
    box-sizing: border-box;
}

    .compare-header a {
        color: white;
        text-decoration: none;
        margin-left: 12px;
    }

.compare-layout {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 8px 12px;
    flex: 1 1 auto;
    min-height: 0;
    box-sizing: border-box;
}

.pdf-panel {
    flex: 0 0 auto;
    width: min(720px, 58vw);
    background: #e9ecef;
    border: 1px solid #ccc;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    align-self: stretch;
}

    .pdf-panel iframe {
        width: 100%;
        height: 100%;
        border: none;
        background: #525659;
    }

.pdf-missing {
    padding: 24px 16px;
    text-align: center;
    color: #666;
}

.data-panel {
    flex: 1 1 auto;
    max-width: 40%;
    width: min(420px, 38vw);
    overflow-y: auto;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 12px 14px;
    min-height: 0;
    align-self: stretch;
}

.field-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 6px 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

    .field-grid .label {
        font-weight: 600;
        color: #555;
    }

table.lines {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

    table.lines th,
    table.lines td {
        border: 1px solid #ddd;
        padding: 6px 8px;
        text-align: left;
    }

    table.lines th {
        background: #f1f3f5;
    }

    table.lines tr:nth-child(even) {
        background: #fafafa;
    }

.badge-warn {
    background: #fff3cd;
    color: #856404;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.badge-ok {
    background: #d4edda;
    color: #155724;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.field-grid input,
.lines input {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.lines input {
    min-width: 70px;
}

.save-button {
    background: #0d6efd;
}

    .save-button:hover {
        background: #0b5ed7;
    }

.button-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 6px 12px;
    flex: 0 0 52px;
    box-sizing: border-box;
}

.action-button {
    min-width: 140px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: white;
}

.approve-button {
    background: #28a745;
}

    .approve-button:hover {
        background: #218838;
    }

.needsreview-button {
    background: #dc3545;
}

    .needsreview-button:hover {
        background: #c82333;
    }

.action-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.navigation-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    flex: 0 0 52px;
    box-sizing: border-box;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
}

.navigation-btn {
    display: inline-block;
    min-width: 42px;
    padding: 8px 12px;
    text-align: center;
    text-decoration: none;
    background: #3498db;
    color: white !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

    .navigation-btn:hover {
        background: #2980b9;
    }

    .navigation-btn.disabled {
        background: #bdc3c7;
        pointer-events: none;
        cursor: default;
    }

#recordIdBox {
    width: 90px;
    padding: 8px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.aps-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.aps-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.aps-info {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.aps-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ---------- Order Intake ---------- */
#reviewPendingBtn {
    display: none !important;
}

.side-by-side {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.panel {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 12px;
    background: white;
    max-height: 520px;
    overflow-y: auto;
}

    .panel h4 {
        margin-top: 0;
        margin-bottom: 10px;
        color: #2c3e50;
        font-size: 1rem;
    }

#jsonFileList {
    font-family: monospace;
    font-size: 13px;
    line-height: 1.6;
}

#statusOutput {
    width: 100%;
    height: 420px;
    font-family: monospace;
    font-size: 13px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    white-space: pre-wrap;
    resize: vertical;
}

/* ---------- Dashboard Operations ---------- */
.burnt-orange {
    background-color: #CC5500;
    color: white;
}

    .burnt-orange:hover {
        background-color: #B34A00;
    }

#relatedTableBodyLeft tr {
    cursor: pointer;
    user-select: none;
}

    #relatedTableBodyLeft tr.selected-row {
        background-color: #FED7AA;
    }

        #relatedTableBodyLeft tr.selected-row:hover {
            background-color: #FDBA74;
        }

    #relatedTableBodyLeft tr:hover:not(.selected-row) {
        background-color: #F3F4F6;
    }

#alertsTableBody tr.alert-row {
    cursor: pointer;
    user-select: none;
}

    #alertsTableBody tr.alert-row:hover:not(.selected-row) {
        background-color: #FEE2E2;
    }

#alertsTableBody tr.selected-row {
    background-color: #FECACA;
}

    #alertsTableBody tr.selected-row:hover {
        background-color: #FCA5A5;
    }

#alertsTableBody tr:not(.alert-row) {
    cursor: default;
}

.process-flow {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    overflow-x: auto;
}

.process-box-house {
    clip-path: polygon(0% 30%, 50% 0%, 100% 30%, 100% 100%, 0% 100%);
    padding-top: 1.25rem;
}

.flow-shape {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    min-width: 115px;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: #111;
    line-height: 1.2;
}

.cylinder {
    width: 88px;
}

.cylinder-top {
    height: 16px;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.cylinder-body {
    height: 44px;
    margin-top: -2px;
}

.cylinder-bottom {
    height: 16px;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    margin-top: -2px;
}

.process-box {
    padding: 12px 10px;
    border-radius: 6px;
    clip-path: polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%);
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.process-box-start {
    clip-path: polygon(15% 0%, 100% 0%, 100% 100%, 15% 100%, 0% 50%);
}

.process-box-end {
    clip-path: polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%);
}

.staging-wave {
    padding: 12px 16px;
    border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shape-inactive {
    background-color: #E1B12C !important;
    color: #111;
}

.shape-yellow {
    background-color: #E1B12C !important;
    color: #111;
}

.shape-green {
    background-color: #10B981 !important;
    color: #111;
}

.shape-red {
    background-color: #EF4444 !important;
    color: white;
}

.shape-blue {
    background-color: #3B82F6 !important;
    color: white;
}
.bin-gray {
    background-color: #c5c5c5;
}

.bin-tan {
    background-color: #e6b089;
}

.bin-blue-dark {
    background-color: #2f5f9a;
    color: #fff;
}

/* taller than the process-flow cylinders */
.cylinder-body.bin-body-tall {
    min-height: 220px;
    height: 220px;
}

/* ===== Window controls in header ===== */
.window-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 20px;
}

.win-btn {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
    color: transparent;
    position: relative;
}

    .win-btn:hover {
        transform: scale(1.15);
        color: rgba(0, 0, 0, 0.75);
    }

    .win-btn.minimize {
        background: #fbbf24;
    }

        .win-btn.minimize::after {
            content: "−";
        }

    .win-btn.maximize {
        background: #34d399;
    }

        .win-btn.maximize::after {
            content: "+";
        }

    .win-btn.close {
        background: #f87171;
    }

        .win-btn.close::after {
            content: "×";
        }

/* ===== Main layout adjustments ===== */
.main-layout {
    display: flex;
    height: calc(100vh - 56px);
    margin-top: 56px;
    transition: height 0.25s ease;
}

.main-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.content-scroll {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* ===== Page Footer ===== */
.page-footer {
    background: #2c3e50;
    color: #bdc3c7;
    padding: 12px 30px;
    font-size: 13px;
    border-top: 1px solid #34495e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

    .page-footer a {
        color: #3498db;
        text-decoration: none;
    }

        .page-footer a:hover {
            text-decoration: underline;
        }

/* ===== Minimized Taskbar ===== */
.minimized-taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: #1a252f;
    border-top: 1px solid #3498db;
    display: none; /* shown via JS */
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

.minimized-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(52, 152, 219, 0.15);
    border: 1px solid rgba(52, 152, 219, 0.4);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    color: #ecf0f1;
    cursor: pointer;
    transition: all 0.2s;
    max-width: 220px;
}

    .minimized-tab:hover {
        background: rgba(52, 152, 219, 0.3);
        border-color: #3498db;
    }

    .minimized-tab .tab-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .minimized-tab .tab-maximize {
        background: #34d399;
        border: none;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        color: #000;
        font-size: 11px;
        font-weight: bold;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

        .minimized-tab .tab-maximize:hover {
            transform: scale(1.15);
        }

    .minimized-tab .tab-close {
        background: #f87171;
        border: none;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        color: #000;
        font-size: 12px;
        font-weight: bold;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: 2px;
        flex-shrink: 0;
        transition: transform 0.15s;
    }

        .minimized-tab .tab-close:hover {
            transform: scale(1.15);
            background: #ef4444;
        }

/* When taskbar is visible, reserve space */
body.has-taskbar .main-layout {
    height: calc(100vh - 56px - 48px);
}

body.has-taskbar .sidebar {
    max-height: calc(100vh - 56px - 48px);
}

/* =========================================================
   Index / Portal – new dark slate + lime accent theme
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0f172a;
    --panel: rgba(30, 41, 59, 0.7);
    --text: #f1f5f9;
    --text-muted: #e2e8f0;
    --accent: #99cc00;
    --accent-hover: #fff;
    --border: rgba(255, 255, 255, 0.08);
}

/* Force dark theme only on the portal page */
body:has(.hero) {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

    /* Scrollbar */
    body:has(.hero)::-webkit-scrollbar {
        width: 8px;
    }

    body:has(.hero)::-webkit-scrollbar-track {
        background: var(--bg-dark);
    }

    body:has(.hero)::-webkit-scrollbar-thumb {
        background: #334155;
        border-radius: 10px;
    }

        body:has(.hero)::-webkit-scrollbar-thumb:hover {
            background: var(--accent);
        }

/* Hero section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    background: radial-gradient(ellipse at 50% 0%, rgba(153, 204, 0, 0.08) 0%, transparent 55%), radial-gradient(ellipse at 80% 80%, rgba(153, 204, 0, 0.05) 0%, transparent 50%), var(--bg-dark);
}

    .hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2399cc00' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        opacity: 0.5;
        pointer-events: none;
    }

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(153, 204, 0, 0.12);
    border: 1px solid rgba(153, 204, 0, 0.3);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 28px;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Title */
.hero h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin-bottom: 18px;
    color: var(--text);
}

    .hero h1 span {
        color: var(--accent);
        background: none;
        -webkit-text-fill-color: var(--accent);
    }

/* Tagline */
.tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

/* Launch button – matches .btn-accent */
.launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--accent);
    color: #0f172a;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    padding: 0.85rem 2rem;
    border: 2px solid var(--accent);
    border-radius: 9999px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(153, 204, 0, 0.25);
}

    .launch-btn:hover {
        background: transparent;
        color: var(--accent);
        box-shadow: 0 0 25px rgba(153, 204, 0, 0.45);
        transform: translateY(-2px);
    }

    .launch-btn i {
        font-size: 18px;
    }

/* Feature cards – glass style */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 80px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.feature-card {
    background: var(--panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: left;
    transition: all 0.25s;
}

    .feature-card:hover {
        border-color: rgba(153, 204, 0, 0.4);
        transform: translateY(-4px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .feature-card i {
        font-size: 24px;
        color: var(--accent);
        margin-bottom: 14px;
    }

    .feature-card h3 {
        font-size: 16px;
        margin-bottom: 8px;
        font-weight: 700;
        color: var(--accent);
    }

    .feature-card p {
        font-size: 0.95rem;
        color: var(--text-muted);
        line-height: 1.6;
        margin: 0;
    }

/* Footer */
.hero + footer {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 13px;
}

/* =========================================================
   Account pages – Login / Logout / RequestAccount / ManageAccountRequests
   ========================================================= */

/* ---------- Request Account page (Layout = null) ---------- */
/* These rules only affect the Request Account page because it is a
   standalone page. They do not override Bootstrap on other pages. */

body.request-account-page {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: #f4f6f9;
}

.request-account-page .header {
    background: #3498db;
    color: white;
    padding: 15px 25px;
}

.request-account-page .card {
    max-width: 480px;
    margin: 40px auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

.request-account-page .form-label {
    font-weight: 600;
    margin-top: 12px;
    display: block;
}

.request-account-page .form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

.request-account-page .btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
}

    .request-account-page .btn-primary:hover {
        background: #2980b9;
    }

.request-account-page .alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.request-account-page .alert-success {
    background: #d4edda;
    color: #155724;
}

.request-account-page .alert-danger {
    background: #f8d7da;
    color: #721c24;
}

/* ---------- Login page (minor enhancement) ---------- */
.footer-links {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}

    .footer-links a {
        color: #3498db;
        text-decoration: none;
    }

        .footer-links a:hover {
            text-decoration: underline;
        }

/* ---------- Manage Account Requests (Admin table) ---------- */
/* Scoped under a unique class so it never affects other .table uses */

.account-requests-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    color: #e2e8f0;
}

    .account-requests-table th,
    .account-requests-table td {
        border: 1px solid rgba(0, 240, 255, 0.15);
        padding: 10px 12px;
        text-align: left;
    }

    .account-requests-table th {
        background: #0f172a;
        color: #00f0ff;
        font-weight: 600;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 2px solid rgba(0, 240, 255, 0.3);
    }

    .account-requests-table tr:hover td {
        background: rgba(0, 240, 255, 0.05);
    }

.badge-pending {
    background: #fff3cd;
    color: #856404;
    padding: 2px 8px;
    border-radius: 4px;
}

.badge-approved {
    background: #d4edda;
    color: #155724;
    padding: 2px 8px;
    border-radius: 4px;
}

.badge-rejected {
    background: #f8d7da;
    color: #721c24;
    padding: 2px 8px;
    border-radius: 4px;
}

.btn-sm.btn-approve {
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    background: #28a745;
    color: white;
}

.btn-sm.btn-reject {
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    background: #dc3545;
    color: white;
}

/* =========================================================
   UserAdmin page (Admin → User & Personnel Admin)
   ========================================================= */

.user-admin-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 140px);
    min-height: 600px;
}

.personnel-list-panel {
    width: 340px;
    flex-shrink: 0;
    background: #1e293b;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .personnel-list-panel h5 {
        color: #99cc00;
        padding: 12px 16px;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

.search-box {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

    .search-box input,
    .search-box select {
        width: 100%;
        margin-bottom: 6px;
        padding: 6px 10px;
        border-radius: 4px;
        border: 1px solid #475569;
        background: #0f172a;
        color: #e2e8f0;
    }

.personnel-scroll {
    flex: 1;
    overflow-y: auto;
}

.personnel-item {
    display: block;
    padding: 10px 16px;
    color: #e2e8f0;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

    .personnel-item:hover {
        background: rgba(153, 204, 0, 0.15);
    }

    .personnel-item.active {
        background: rgba(153, 204, 0, 0.25);
        border-left: 3px solid #99cc00;
    }

    .personnel-item .name {
        font-weight: 600;
    }

    .personnel-item .meta {
        font-size: 0.8rem;
        color: #94a3b8;
    }

.detail-panel {
    flex: 1;
    overflow-y: auto;
    background: #1e293b;
    border-radius: 8px;
    padding: 20px 24px;
    color: #e2e8f0;
}

    .detail-panel h4,
    .detail-panel h5 {
        color: #99cc00;
    }

.form-section {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px 18px;
}

    .form-grid label {
        display: block;
        font-size: 0.8rem;
        color: #94a3b8;
        margin-bottom: 2px;
    }

    .form-grid input,
    .form-grid select {
        width: 100%;
        padding: 7px 10px;
        border-radius: 4px;
        border: 1px solid #475569;
        background: #0f172a;
        color: #f1f5f9;
    }

.perm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

    .perm-table th {
        background: #0f172a;
        color: #99cc00;
        padding: 8px 12px;
        text-align: left;
    }

    .perm-table td {
        padding: 8px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

/* Re-use / extend the accent button already used on the portal */
.btn-accent {
    background: #99cc00;
    color: #0f172a;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

    .btn-accent:hover {
        background: #88b800;
    }

.btn-outline-light {
    background: transparent;
    color: #e2e8f0;
    border: 1px solid #64748b;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-danger-sm {
    background: #dc3545;
    color: white;
    border: none;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

/* AI Chat Popup Window Activation */
.ai-footer-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
    padding: 6px 14px 6px 10px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

    .ai-footer-chip:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
        filter: brightness(1.05);
    }

    .ai-footer-chip:active {
        transform: translateY(0);
    }

.ai-footer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.ai-footer-label {
    letter-spacing: 0.02em;
}

.ai-chat-panel {
    position: fixed;
    right: 20px;
    bottom: 70px;
    /* 50% wider */
    width: 25vw;
    min-width: 420px;
    max-width: 540px;
    /* 30% taller */
    height: 60vh;
    min-height: 416px;
    max-height: 676px;
    z-index: 2000;
    display: none;
    flex-direction: column;
    background: #fffaf5;
    border: 1px solid #c45c26;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(153, 61, 0, 0.28);
    overflow: hidden;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.ai-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, #cc5500 0%, #a34400 100%);
    color: #fff;
    flex-shrink: 0;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ai-chat-category {
    padding: 8px 12px;
    border-bottom: 1px solid #e8c4a8;
    background: #fdf0e6;
    flex-shrink: 0;
}

    .ai-chat-category .form-label {
        color: #7a3e12;
    }

    .ai-chat-category .form-select {
        border-color: #d4a574;
        font-size: 0.85rem;
    }

        .ai-chat-category .form-select:focus {
            border-color: #cc5500;
            box-shadow: 0 0 0 0.2rem rgba(204, 85, 0, 0.2);
        }

.ai-chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px 12px;
    background: #fffaf5;
    min-height: 0;
}

.ai-bubble-user {
    background: #ffe4cc;
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 10px 10px 4px 10px;
    font-size: 0.85rem;
    color: #3d2314;
}

.ai-bubble-assistant {
    background: #fff;
    border: 1px solid #e8c4a8;
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 10px 10px 10px 4px;
    font-size: 0.85rem;
    color: #3d2314;
    white-space: pre-wrap;
}

.ai-chat-input-row {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #e8c4a8;
    background: #fdf0e6;
    flex-shrink: 0;
}

    .ai-chat-input-row .form-control {
        border-color: #d4a574;
        font-size: 0.85rem;
    }

        .ai-chat-input-row .form-control:focus {
            border-color: #cc5500;
            box-shadow: 0 0 0 0.2rem rgba(204, 85, 0, 0.2);
        }

.ai-chat-send-btn {
    background-color: #cc5500;
    border-color: #b34a00;
    color: #fff;
    font-size: 0.85rem;
    white-space: nowrap;
}

    .ai-chat-send-btn:hover {
        background-color: #b34a00;
        border-color: #993d00;
        color: #fff;
    }

/* Taskbar is 48px tall – lift AI UI when it is visible */
body.has-taskbar .ai-chat-panel {
    bottom: calc(70px + 48px);
}

/* If the launcher chip is fixed (or ends up under the taskbar) */
body.has-taskbar .ai-footer-chip,
body.has-taskbar #aiChatFooterBtn {
    bottom: calc(12px + 48px) !important;
}

/* Keep the page footer clearly above the taskbar */
body.has-taskbar .page-footer {
    padding-bottom: 12px;
}

body.has-taskbar .main-layout {
    height: calc(100vh - 56px - 48px);
}

body.has-taskbar .sidebar {
    max-height: calc(100vh - 56px - 48px);
}

/* Keep footer content spaced; chip sits on the right group */
.page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* User Admin page */
.user-admin-layout {
    background: #1e293b;
    min-height: 100%;
}

body:has(.user-admin-layout) .main-content-area,
body:has(.user-admin-layout) .content-scroll {
    background: #1e293b;
}




