/* =========================================================
   🎨 DOS Brand Design System (Master File)
   ========================================================= */
:root {
    /* --- BRAND COLORS --- */
    --brand-blue: #0078D7;
    --brand-dark: #121212;
    --dashboard-blue-dark: #0B63A8;
    
    /* --- GRADIENTS --- */
    --bg-gradient-light: linear-gradient(135deg, #E6F0F8 0%, #D0E6F5 100%);
    --bg-gradient-dark: linear-gradient(135deg, #0b1220 0%, #071a2d 100%);

    /* --- PALETTE --- */
    --primary-color: var(--brand-blue);
    --primary-hover: #005a9e;    
    --text-main: #201f1e;
    --text-muted: #605e5c;
    --border-color: rgba(200, 200, 200, 0.5);
    
    /* --- THEME DEFAULTS --- */
    --bg-current: var(--bg-gradient-light);
    --card-bg: rgba(255, 255, 255, 0.95);
    
    /* --- DIMENSIONS --- */
    --input-height: 42px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body.dark-mode {
    --bg-current: var(--bg-gradient-dark);
    --card-bg: rgba(30, 30, 35, 0.90);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #f3f3f3;
    --text-muted: #a19f9d;
}

/* =========================================================
   📦 Core Layout
   ========================================================= */
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg-current);
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0;
    padding-bottom: 60px;
    min-height: 100vh;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.container-fluid { padding: 0 2rem; } /* Wider layout for dashboards */

/* --- HEADER --- */
.dashboard-header {
    background-color: var(--brand-blue);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-area h1 { margin: 0; font-size: 1.4rem; font-weight: 800; color: white !important; }
.btn-header { 
    background: rgba(255,255,255,0.2); color: #fff; padding: 0.5rem 1rem; 
    border-radius: var(--radius-md); text-decoration: none; font-size: 0.9rem; transition: 0.2s;
}
.btn-header:hover { background: #fff; color: var(--brand-blue); }

/* --- CARDS (Glassmorphism) --- */
.modern-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(12px);
    margin-bottom: 20px;
}

.card-header-custom {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-header-custom h5 { margin: 0; font-weight: 700; font-size: 1.1rem; color: var(--text-main); }
.card-body-custom { padding: 1.5rem; }

/* =========================================================
   📝 Form System (Fixed Layouts)
   ========================================================= */
.form-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 25px;
    row-gap: 15px;
    width: 100%;
}
@media (max-width: 768px) { .form-grid-container { grid-template-columns: 1fr; } }

.form-group { width: 100%; }
.form-label {
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
}

.form-control {
    display: block;
    width: 100%;
    height: var(--input-height);
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-sizing: border-box;
    transition: all 0.2s;
}
.form-control:focus {
    background-color: #fff;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(0, 120, 215, 0.15);
    outline: none;
}

/* =========================================================
   ✅ Role Grid (Fixed Overflow)
   ========================================================= */
.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}
.role-chip { display: block; cursor: pointer; width: 100%; }
.role-chip input[type="radio"] { position: absolute; opacity: 0; }
.role-card-visual {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: flex; align-items: center; gap: 8px;
    width: 100%; box-sizing: border-box;
}
.role-chip:hover .role-card-visual { border-color: var(--brand-blue); background: rgba(0, 120, 215, 0.04); }
.role-chip input[type="radio"]:checked + .role-card-visual {
    border-color: var(--brand-blue);
    background: rgba(0, 120, 215, 0.1);
    box-shadow: inset 0 0 0 1px var(--brand-blue);
}
.role-name { 
    font-weight: 600; font-size: 0.85rem; color: var(--text-main);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* =========================================================
   🚦 Queue System Specifics
   ========================================================= */

/* 1. Ticket Card Style */
.ticket {
    width: 100%; max-width: 350px; margin: 20px auto; padding: 25px;
    text-align: center; background: var(--card-bg);
    border: 1px solid var(--border-color); border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.ticket h2 { color: var(--brand-blue); font-weight: 800; margin-bottom: 1rem; font-size: 1.8rem; }

/* 2. Status Badges */
.badge-status {
    padding: 6px 12px; border-radius: 50px; font-size: 0.8rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-pending { background: #e3f2fd; color: #0d6efd; }
.badge-progress { background: #fff3cd; color: #856404; }
.badge-completed { background: #d1e7dd; color: #0f5132; }
.badge-rejected { background: #f8d7da; color: #842029; }

/* 3. Vertical Tabs Layout */
.vertical-tabs-container {
    display: flex;
    min-height: 500px;
}
.vertical-nav-area {
    width: 240px; flex-shrink: 0;
    border-right: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.02);
    padding: 1.5rem 0;
}
.vertical-content-area {
    flex-grow: 1; padding: 1.5rem; overflow-x: hidden;
}

/* Vertical Tab Links */
.queue-tabs-vertical {
    flex-direction: column; gap: 5px; padding: 0 1rem;
}
.queue-tabs-vertical .nav-link {
    border: none; color: var(--text-muted); font-weight: 600;
    padding: 0.85rem 1.2rem; border-radius: var(--radius-md);
    transition: all 0.2s ease; display: flex; justify-content: space-between;
    align-items: center; text-align: left;
}
.queue-tabs-vertical .nav-link:hover {
    background: rgba(0, 120, 215, 0.05); color: var(--brand-blue);
    transform: translateX(4px);
}
.queue-tabs-vertical .nav-link.active {
    background: var(--brand-blue); color: white;
    box-shadow: 0 4px 10px rgba(0, 120, 215, 0.3);
}
.queue-tabs-vertical .nav-link.active .badge {
    background: rgba(255, 255, 255, 0.2) !important; color: white !important;
}

/* Responsive Tabs */
@media (max-width: 768px) {
    .vertical-tabs-container { flex-direction: column; }
    .vertical-nav-area { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); }
}

/* =========================================================
   🛠 Components (Tables, Buttons, Avatars)
   ========================================================= */
.table-container { overflow-x: auto; }
.custom-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.custom-table th {
    padding: 1rem; text-align: left; font-size: 0.75rem; text-transform: uppercase;
    color: var(--text-muted); border-bottom: 2px solid var(--border-color);
}
.custom-table td { padding: 1rem; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; }

/* Buttons */
.btn-primary-custom {
    background: var(--brand-blue); color: white; border: none;
    padding: 0.6rem 1.5rem; border-radius: var(--radius-md); font-weight: 600; cursor: pointer;
}
.btn-primary-custom:hover { background: #005a9e; }

.btn-action {
    background: transparent; border: 1px solid transparent; color: var(--text-muted);
    width: 32px; height: 32px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.btn-action:hover { background: rgba(0,0,0,0.05); color: var(--brand-blue); }
.btn-action.delete:hover { background: #fff1f0; color: #d13438; }

/* Avatar */
.avatar-circle {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; background: linear-gradient(135deg, var(--brand-blue), #005a9e);
}

/* Info Bar Pills */
.info-bar { display: flex; gap: 15px; margin-bottom: 1.5rem; }
.info-pill {
    background: var(--card-bg); border: 1px solid var(--border-color);
    padding: 0.5rem 1rem; border-radius: 50px; font-weight: 600; color: var(--text-muted);
    display: flex; align-items: center; gap: 8px; font-size: 0.9rem;
}

/* Modals Bottom Right */
.modal-dialog-bottom-right {
    position: fixed; bottom: 20px; right: 20px; margin: 0; width: 350px; z-index: 1060;
}
/* Ensure Modals are hidden by default */
.modal { display: none; }
.modal.show { display: block; }