/* =====================================================
   GLOBAL CSS - Complaint Management System
   Place in: includes/CSS/global.css
   ===================================================== */

:root {
    --primary: #1a1a2e;
    --accent: #e94560;
    --secondary: #16213e;
    --surface: #0f3460;
    --light: #f5f5f5;
    --card-shadow: 0 4px 24px rgba(0,0,0,0.08);
    --sidebar-width: 260px;
}

* { font-family: 'DM Sans', sans-serif; }
body { background: var(--light); min-height: 100vh; display: flex; flex-direction: column; margin: 0; }
html { height: 100%; }

/* ===== LAYOUT: Footer Sticky ===== */
.main-content { flex: 1 0 auto; }
footer { flex-shrink: 0; }

/* ===== SIDEBAR ===== */
.sidebar {
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
    width: var(--sidebar-width);
    position: fixed; top: 0; left: 0; z-index: 1050;
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.sidebar .brand { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar .brand h4 { color: #fff; font-weight: 700; margin: 0; font-size: 1.1rem; }
.sidebar .brand small { color: rgba(255,255,255,0.5); font-size: 0.75rem; }
.sidebar .nav-link {
    color: rgba(255,255,255,0.65); padding: 12px 20px; border-left: 3px solid transparent;
    transition: all 0.2s ease; font-size: 0.9rem; display: block;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: #fff; background: rgba(255,255,255,0.06); border-left-color: var(--accent);
}
.sidebar .nav-link i { margin-right: 10px; width: 20px; text-align: center; }

/* ===== MAIN CONTENT ===== */
.main-content { margin-left: var(--sidebar-width); padding: 0; transition: margin-left 0.3s ease; }

/* ===== TOP BAR ===== */
.top-bar {
    background: #fff; padding: 16px 20px; border-bottom: 1px solid #eee;
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 100;
}
.top-bar .page-title {
    font-weight: 700; font-size: 1.2rem; color: var(--primary);
    flex-grow: 1; display: flex; align-items: center; gap: 8px; margin-left: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ===== HAMBURGER MENU TOGGLE ===== */
.menu-toggle {
    display: none; background: transparent; border: 1px solid #ddd;
    font-size: 1.3rem; color: var(--primary); cursor: pointer;
    padding: 4px 8px; border-radius: 1px; transition: background 0.2s; line-height: 1;
}
.menu-toggle:hover { background: rgba(0,0,0,0.05); }

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5); z-index: 1040; opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.active { display: block; opacity: 1; }

/* ===== CONTENT AREA ===== */
.content-area { padding: 20px; }

/* ===== STAT CARDS ===== */
.stat-card {
    background: #fff; border-radius: 12px; padding: 20px; box-shadow: var(--card-shadow);
    border: none; transition: transform 0.2s ease;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .stat-icon {
    width: 46px; height: 46px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 1.2rem;
}
.stat-card .stat-number { font-size: 1.6rem; font-weight: 900; line-height: 1; }
.stat-card .stat-label {
    color: #888; font-size: 0.75rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* ===== CARD TABLE ===== */
.card-table {
    background: #fff; border-radius: 12px; box-shadow: var(--card-shadow);
    border: none; overflow: hidden;
}
.card-table .card-header {
    background: #fff; border-bottom: 1px solid #eee; padding: 16px 20px;
    font-weight: 700; font-size: 0.95rem;
}

/* ===== TABLES ===== */
.table thead th {
    background: var(--primary); color: #fff; font-weight: 600; font-size: 0.82rem;
    text-transform: uppercase; letter-spacing: 0.5px; border: none; padding: 12px 16px;
}
.table tbody td { padding: 12px 16px; vertical-align: middle; border-color: #f0f0f0; font-size: 0.9rem; }

/* ===== BADGES ===== */
.badge-status { padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.3px; }

/* ===== BUTTONS ===== */
.btn-accent {
    background: var(--accent); color: #fff; border: none; padding: 10px 20px;
    border-radius: 8px; font-weight: 600; transition: all 0.2s ease;
}
.btn-accent:hover { background: #d63850; color: #fff; transform: translateY(-1px); }
.btn-outline-accent {
    border: 2px solid var(--accent); color: var(--accent); padding: 8px 18px;
    border-radius: 8px; font-weight: 600; background: transparent;
}
.btn-outline-accent:hover { background: var(--accent); color: #fff; }

/* ===== FORMS ===== */
.form-control, .form-select { border-radius: 8px; padding: 10px 14px; border: 1.5px solid #ddd; font-size: 0.9rem; }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(233,69,96,0.15); }

/* ===== AVATAR ===== */
.avatar-circle {
    width: 36px; height: 36px; border-radius: 50%; background: var(--accent);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}

/* ===== ALERTS ===== */
.alert-dismissible .btn-close { padding: 14px; }

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* ===== PWA INSTALL BANNER ===== */
.pwa-install-banner {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: #fff; padding: 16px 24px;
    border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    z-index: 9999; display: none; align-items: center; gap: 16px;
    font-size: 0.9rem; max-width: 95%; border: 1px solid var(--surface);
}
.pwa-install-banner .btn-install {
    background: var(--accent); color: #fff; border: none; padding: 8px 20px;
    border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 0.9rem;
}
.pwa-install-banner .btn-dismiss {
    background: transparent; color: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 14px; border-radius: 8px; cursor: pointer;
}

/* ===== COLUMN TOGGLE ===== */
.col-hidden { display: none !important; }
.col-toggle-dropdown .dropdown-menu {
    min-width: 230px; max-height: 380px; overflow-y: auto;
    border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); padding: 0;
}
.col-toggle-dropdown .dropdown-header {
    background: var(--primary); color: #fff; font-weight: 700; font-size: 0.85rem;
    padding: 10px 14px; border-radius: 10px 10px 0 0;
    display: flex; justify-content: space-between; align-items: center;
}
.col-toggle-dropdown .dropdown-header .btn-reset {
    color: rgba(255,255,255,0.8); font-size: 0.72rem; cursor: pointer;
    text-decoration: none; font-weight: 600; padding: 2px 6px; border-radius: 4px;
}
.col-toggle-dropdown .dropdown-header .btn-reset:hover { color: #fff; background: rgba(255,255,255,0.15); }
.col-toggle-dropdown .dropdown-body { padding: 8px 10px; }
.col-toggle-dropdown .form-check { padding: 5px 0 5px 28px; margin: 0; }
.col-toggle-dropdown .form-check-input { cursor: pointer; accent-color: var(--accent); }
.col-toggle-dropdown .form-check-input:disabled { cursor: not-allowed; opacity: 0.5; }
.col-toggle-dropdown .form-check-label { cursor: pointer; font-size: 0.84rem; color: #333; user-select: none; }
.col-toggle-dropdown .form-check-input:disabled + .form-check-label { color: #999; cursor: not-allowed; }
.col-toggle-dropdown .form-check-label .lock-icon { color: #aaa; font-size: 0.7rem; margin-left: 4px; }

/* ===== FILTER PANEL ===== */
.filter-panel {
    background: linear-gradient(135deg, #f8f9ff, #eef2ff);
    border: 1px solid #d0d8f0; border-radius: 12px;
    padding: 0; overflow: hidden; transition: all 0.3s ease;
}
.filter-panel.has-active-filters { border-color: #7ba1e0; box-shadow: 0 2px 14px rgba(26,26,46,0.08); }
.filter-panel-header {
    background: var(--primary); color: #fff; padding: 10px 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.filter-panel-header .filter-title { font-weight: 700; font-size: 0.88rem; display: flex; align-items: center; gap: 6px; }
.filter-panel-header .filter-title i { font-size: 1rem; }
.filter-panel-header .active-badge { display: none; background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-left: 8px; }
.filter-panel.has-active-filters .filter-panel-header .active-badge { display: inline-block; }
.filter-panel-header .filter-toggle-btn {
    background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); color: #fff;
    font-size: 0.8rem; font-weight: 600; padding: 4px 12px; border-radius: 6px;
    cursor: pointer; display: flex; align-items: center; gap: 5px;
}
.filter-panel-header .filter-toggle-btn:hover { background: rgba(255,255,255,0.25); }
.filter-panel-header .filter-toggle-btn i { transition: transform 0.3s; }
.filter-panel-header .filter-toggle-btn.collapsed i { transform: rotate(-180deg); }
.filter-panel-body { padding: 18px 20px; }
.filter-panel-body.collapse:not(.show) { display: none; }
.filter-row { display: flex; align-items: flex-end; gap: 0; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 4px; padding: 0 12px; position: relative; flex: 1; min-width: 140px; }
.filter-group:first-child { padding-left: 0; }
.filter-group-border { position: relative; }
.filter-group-border::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px; background: #d0d8f0; }
.filter-group-border:first-child::before { display: none; }
.filter-group label { font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.6px; color: #64748b; margin: 0; }
.filter-group .form-control, .filter-group .form-select {
    border: 1px solid #d0d8f0; border-radius: 8px; font-size: 0.85rem; padding: 6px 10px; background: #fff;
}
.filter-group .form-control:focus, .filter-group .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(233,69,96,0.12); }
.filter-actions { display: flex; align-items: center; gap: 8px; padding: 0 12px; flex-shrink: 0; }
.filter-actions .btn { border-radius: 8px; font-size: 0.84rem; font-weight: 600; padding: 6px 16px; white-space: nowrap; }
.filter-active-tags { display: none; padding: 10px 20px 0; border-top: 1px dashed #d0d8f0; margin-top: 14px; }
.filter-panel.has-active-filters .filter-active-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filter-active-tags .tag-label { font-size: 0.75rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-right: 4px; }
.filter-active-tags .filter-tag {
    display: inline-flex; align-items: center; gap: 4px; background: #fff;
    border: 1px solid #c5d5f0; border-radius: 6px; padding: 3px 10px; font-size: 0.78rem; font-weight: 600; color: var(--primary);
}
.filter-active-tags .filter-tag:hover { border-color: var(--accent); color: var(--accent); }
.filter-active-tags .filter-tag i { font-size: 0.7rem; cursor: pointer; }
.filter-active-tags .clear-all-tag { font-size: 0.78rem; font-weight: 600; color: var(--accent); text-decoration: none; margin-left: 4px; }
.filter-active-tags .clear-all-tag:hover { text-decoration: underline; }

/* ===== BULK TOOLBAR ===== */
.bulk-toolbar {
    background: linear-gradient(135deg, #f8f9ff, #eef2ff);
    border: 1px solid #d0d8f0; border-radius: 12px; padding: 14px 20px;
    display: flex; align-items: center; gap: 0; transition: all 0.3s ease;
}
.bulk-toolbar.has-selection { background: linear-gradient(135deg, #eef4ff, #dde8ff); border-color: #7ba1e0; box-shadow: 0 2px 14px rgba(26,26,46,0.08); }
.bulk-toolbar-section { display: flex; align-items: center; gap: 10px; }
.bulk-toolbar-divider { width: 1px; height: 32px; background: #d0d8f0; margin: 0 16px; flex-shrink: 0; }
.bulk-toolbar .select-all-wrap { display: flex; align-items: center; gap: 6px; }
.bulk-toolbar .select-all-checkbox { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }
.bulk-toolbar .select-all-label { font-weight: 600; font-size: 0.88rem; cursor: pointer; user-select: none; color: #333; }
.bulk-toolbar .selected-count { font-weight: 700; color: var(--primary); font-size: 0.88rem; display: flex; align-items: center; gap: 6px; }
.bulk-toolbar .selected-count .count-num {
    background: var(--primary); color: #fff; border-radius: 50%; min-width: 22px; height: 22px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; transition: transform 0.2s;
}
.bulk-toolbar.has-selection .selected-count .count-num { transform: scale(1.15); }
.bulk-toolbar .clear-sel { color: var(--accent); font-size: 0.78rem; font-weight: 600; text-decoration: none; display: none; }
.bulk-toolbar .clear-sel:hover { color: #c0392b; text-decoration: underline; }
.bulk-toolbar.has-selection .clear-sel { display: inline; }
.bulk-toolbar-info { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 0.78rem; color: #8898aa; white-space: nowrap; }

/* Bulk Assign Form (inside toolbar) */
.bulk-toolbar #bulkAssignForm { display: flex; align-items: center; gap: 8px; }
.bulk-toolbar #bulkAssignForm .form-select { max-width: 200px; min-width: 160px; border: 1px solid #d0d8f0; border-radius: 8px; font-size: 0.85rem; padding: 6px 10px; background: #fff; }
.bulk-toolbar #bulkAssignForm .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(233,69,96,0.12); }
.bulk-toolbar #bulkAssignBtn { white-space: nowrap; }

/* ===== CHECKBOXES ===== */
.complaint-checkbox, .request-checkbox { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }
tr.disabled-row { opacity: 0.55; }
tr.disabled-row .complaint-checkbox, tr.disabled-row .request-checkbox { cursor: not-allowed; }

/* ===== NOTIFICATION DROPDOWN ===== */
.notif-dropdown { width: 360px; max-height: 450px; overflow-y: auto; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); }
.notif-dropdown-item { transition: background 0.15s ease, padding-left 0.15s ease; }
.notif-dropdown-item:hover { background: rgba(15, 52, 96, 0.06) !important; padding-left: 20px !important; }
.notif-dropdown-item.bg-light:hover { background: rgba(15, 52, 96, 0.10) !important; }
.notification-item:hover { background: rgba(15, 52, 96, 0.04) !important; }
.notification-item.bg-light:hover { background: rgba(15, 52, 96, 0.08) !important; }

/* ===== RESPONSIVE CARD TABLES ===== */
@media (max-width: 991px) {
    .responsive-cards-table thead,
    .complaints-responsive-table thead,
    .sa-complaints-table thead { display: none; }
    .responsive-cards-table tbody tr,
    .complaints-responsive-table tbody tr,
    .sa-complaints-table tbody tr {
        display: block; background: #fff; border: 1px solid #e9ecef;
        border-radius: 12px; padding: 14px; margin-bottom: 14px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04); transition: box-shadow 0.2s;
    }
    .responsive-cards-table tbody tr:hover,
    .complaints-responsive-table tbody tr:hover,
    .sa-complaints-table tbody tr:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
    .responsive-cards-table tbody td,
    .complaints-responsive-table tbody td,
    .sa-complaints-table tbody td {
        display: flex; justify-content: space-between; align-items: center;
        padding: 8px 4px; border-bottom: 1px solid #f1f1f1; border-top: none !important;
    }
    .responsive-cards-table tbody td:last-child,
    .complaints-responsive-table tbody td:last-child,
    .sa-complaints-table tbody td:last-child {
        border-bottom: none; margin-top: 10px; padding-top: 14px;
        border-top: 1px dashed #ddd; justify-content: flex-end;
    }
    .responsive-cards-table tbody td::before,
    .complaints-responsive-table tbody td::before,
    .sa-complaints-table tbody td::before {
        content: attr(data-label); font-weight: 700; font-size: 0.82rem;
        color: #6c757d; text-align: left; padding-right: 12px; white-space: nowrap;
    }
    .responsive-cards-table tbody td.td-title,
    .complaints-responsive-table tbody td.td-title,
    .sa-complaints-table tbody td.td-title {
        flex-direction: column; align-items: flex-start;
        border-bottom: 2px solid var(--accent); padding-bottom: 12px; margin-bottom: 4px;
    }
    .responsive-cards-table tbody td.td-title::before,
    .complaints-responsive-table tbody td.td-title::before,
    .sa-complaints-table tbody td.td-title::before {
        margin-bottom: 4px; color: var(--accent); font-size: 0.78rem;
        text-transform: uppercase; letter-spacing: 0.5px;
    }
    .complaints-responsive-table tbody td.td-check {
        border-bottom: 2px solid var(--primary); padding-bottom: 12px;
        margin-bottom: 4px; justify-content: flex-start; gap: 8px;
    }
    .complaints-responsive-table tbody td.td-check::before {
        color: var(--primary); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px;
    }
    .responsive-cards-table tbody td.col-hidden,
    .complaints-responsive-table tbody td.col-hidden,
    .sa-complaints-table tbody td.col-hidden { display: none !important; }
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: inline-block; }
    .content-area { padding: 15px; }
    .stat-card { padding: 16px; }
    .stat-card .stat-number { font-size: 1.3rem; }
    .stat-card .stat-icon { width: 40px; height: 40px; font-size: 1.1rem; }
}

@media (max-width: 767.98px) {
    .top-bar { padding: 8px 12px !important; gap: 8px !important; flex-wrap: nowrap; min-height: auto; }
    .top-bar .page-title { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
    .top-bar .page-title i { display: none; }
    .top-bar .profile-info { display: none !important; }
    .top-bar .avatar-circle { width: 32px; height: 32px; font-size: 0.78rem; }
    .top-bar .btn-sm { padding: 4px 10px; font-size: 0.75rem; }
    .top-bar .btn-sm .btn-label { display: none; }
    .top-bar .notif-dropdown { width: 300px !important; max-width: 90vw; }

    .filter-row { flex-direction: column; gap: 12px; }
    .filter-group { padding: 0; min-width: 100%; }
    .filter-group-border::before { display: none; }
    .filter-group + .filter-group { padding-top: 12px; border-top: 1px dashed #d0d8f0; }
    .filter-actions { padding: 0; width: 100%; padding-top: 12px; border-top: 1px dashed #d0d8f0; }
    .filter-actions .btn { flex: 1; }

    .bulk-toolbar { flex-wrap: wrap; gap: 12px; padding: 12px 14px; }
    .bulk-toolbar-divider { display: none; }
    .bulk-toolbar-section { width: 100%; }
    .bulk-toolbar #bulkAssignForm { width: 100%; flex-wrap: wrap; }
    .bulk-toolbar #bulkAssignForm .form-select { max-width: 100%; flex: 1; min-width: 0; }
    .bulk-toolbar #bulkAssignBtn { flex-shrink: 0; }
    .bulk-toolbar-info { margin-left: 0; width: 100%; padding-top: 10px; border-top: 1px dashed #d0d8f0; }

    .card-header .btn-sm .btn-label { display: none; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .top-bar .page-title { font-size: 1.05rem; }
    .top-bar .profile-info .profile-role { display: none; }
    .filter-group { min-width: 120px; flex: 1 1 14%; }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .filter-group { min-width: 120px; flex: 1 1 14%; }
}

/* ===== REQUEST MASTER SPECIFIC ===== */
.request-type-icon {
    width: 42px; height: 42px; border-radius: 10px; display: inline-flex;
    align-items: center; justify-content: center; font-size: 1.1rem;
}
.request-type-icon.type-keyboard { background: rgba(13,110,253,0.1); color: #0d6efd; }
.request-type-icon.type-mouse { background: rgba(25,135,84,0.1); color: #198754; }
.request-type-icon.type-cpu { background: rgba(111,66,193,0.1); color: #6f42c1; }
.request-type-icon.type-printer { background: rgba(253,126,20,0.1); color: #fd7e14; }
.request-type-icon.type-monitor { background: rgba(13,202,240,0.1); color: #0dcaf0; }
.request-type-icon.type-headset { background: rgba(214,51,132,0.1); color: #d63384; }
.request-type-icon.type-webcam { background: rgba(108,117,125,0.1); color: #6c757d; }
.request-type-icon.type-ups { background: rgba(255,193,7,0.1); color: #ffc107; }
.request-type-icon.type-cable { background: rgba(32,201,151,0.1); color: #20c997; }
.request-type-icon.type-ram { background: rgba(220,53,69,0.1); color: #dc3545; }
.request-type-icon.type-storage { background: rgba(55,70,196,0.1); color: #3746c4; }
.request-type-icon.type-other { background: rgba(108,117,125,0.1); color: #6c757d; }

.request-status-pending { background: rgba(240,173,78,0.12); color: #856404; border: 1px solid rgba(240,173,78,0.3); }
.request-status-approved { background: rgba(25,135,84,0.12); color: #155724; border: 1px solid rgba(25,135,84,0.3); }
.request-status-rejected { background: rgba(220,53,69,0.12); color: #721c24; border: 1px solid rgba(220,53,69,0.3); }
.request-status-fulfilled { background: rgba(13,110,253,0.12); color: #084298; border: 1px solid rgba(13,110,253,0.3); }

.urgency-indicator {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
}
.urgency-low { background: rgba(25,135,84,0.1); color: #198754; }
.urgency-medium { background: rgba(240,173,78,0.1); color: #856404; }
.urgency-high { background: rgba(253,126,20,0.1); color: #fd7e14; }
.urgency-urgent { background: rgba(220,53,69,0.1); color: #dc3545; animation: pulse 1.5s infinite; }

/* ===== UPDATES HISTORY ANCHOR SCROLL ===== */
#updates { scroll-margin-top: 80px; }

/* ===== City Badge ===== */
.city-badge { background: rgba(15,52,96,0.1); color: var(--surface); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; display: inline-block; margin: 2px; }

/* ===== QUEUE BADGES (Complainant Dashboard) ===== */
.queue-summary-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--surface) 100%);
    color: #fff; border-radius: 16px; padding: 24px;
    box-shadow: var(--card-shadow); position: relative; overflow: hidden;
}
.queue-summary-card::before {
    content: ''; position: absolute; top: -30px; right: -30px;
    width: 120px; height: 120px; background: rgba(255,255,255,0.05); border-radius: 50%;
}
.queue-summary-card::after {
    content: ''; position: absolute; bottom: -20px; left: -20px;
    width: 80px; height: 80px; background: rgba(255,255,255,0.03); border-radius: 50%;
}
.queue-number-big {
    font-size: 2.8rem; font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, #ffc107, #ff6b35);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.queue-info-row { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.queue-info-item {
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; padding: 10px 16px; flex: 1; min-width: 100px;
}
.queue-info-item .qi-value { font-size: 1.15rem; font-weight: 700; color: #ffc107; }
.queue-info-item .qi-label { font-size: 0.7rem; opacity: 0.7; margin-top: 2px; }

.queue-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 28px; border-radius: 8px;
    font-size: 0.82rem; font-weight: 700; padding: 2px 10px;
}
.queue-badge.queue-high { background: linear-gradient(135deg, #198754, #20c997); color: #fff; box-shadow: 0 2px 8px rgba(25,135,84,0.3); }
.queue-badge.queue-mid { background: linear-gradient(135deg, #f0ad4e, #ffc107); color: #fff; box-shadow: 0 2px 8px rgba(240,173,78,0.3); }
.queue-badge.queue-low { background: linear-gradient(135deg, #dc3545, #e74c6f); color: #fff; box-shadow: 0 2px 8px rgba(220,53,69,0.3); }
.queue-badge.queue-na { background: rgba(108,117,125,0.12); color: #6c757d; border: 1px solid rgba(108,117,125,0.2); }

/* ===== STAFF AVAILABILITY BADGES ===== */
.staff-avail-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600;
}
.staff-avail-badge.in-office { background: rgba(25,135,84,0.1); color: #198754; border: 1px solid rgba(25,135,84,0.3); }
.staff-avail-badge.out-office { background: rgba(220,53,69,0.1); color: #dc3545; border: 1px solid rgba(220,53,69,0.3); }
.staff-avail-badge.no-staff { background: rgba(108,117,125,0.1); color: #6c757d; border: 1px solid rgba(108,117,125,0.3); }
.avail-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.avail-dot.green { background: #198754; box-shadow: 0 0 6px rgba(25,135,84,0.5); }
.avail-dot.red { background: #dc3545; opacity: 0.7; }
.avail-dot.gray { background: #6c757d; opacity: 0.5; }

/* ===== STAFF LIST CARD ===== */
.staff-list-card { max-height: 480px; overflow-y: auto; }
.staff-list-card::-webkit-scrollbar { width: 5px; }
.staff-list-card::-webkit-scrollbar-track { background: #f1f1f1; }
.staff-list-card::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
.staff-item { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; transition: background 0.2s; }
.staff-item:last-child { border-bottom: none; }
.staff-item:hover { background: #f8f9fa; }

/* ===== PUNCH CARD (Staff) ===== */
.punch-btn-topbar {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px;
    border-radius: 50px; font-size: 0.82rem; font-weight: 700; border: none;
    cursor: pointer; transition: all 0.2s ease; text-decoration: none;
}
.punch-btn-topbar.punch-in { background: #198754; color: #fff; box-shadow: 0 2px 10px rgba(25,135,84,0.3); }
.punch-btn-topbar.punch-in:hover { background: #157347; color: #fff; transform: translateY(-1px); }
.punch-btn-topbar.punch-out { background: #dc3545; color: #fff; box-shadow: 0 2px 10px rgba(220,53,69,0.3); }
.punch-btn-topbar.punch-out:hover { background: #bb2d3b; color: #fff; transform: translateY(-1px); }

.punch-card {
    border-radius: 16px; padding: 30px; text-align: center;
    position: relative; overflow: hidden; transition: all 0.3s ease;
}
.punch-card.punch-in {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #198754;
}
.punch-card.punch-out {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
}
.punch-card .punch-icon {
    width: 80px; height: 80px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 2rem; margin-bottom: 16px;
}
.punch-card.punch-in .punch-icon { background: #198754; color: #fff; box-shadow: 0 4px 20px rgba(25,135,84,0.3); }
.punch-card.punch-out .punch-icon { background: #dc3545; color: #fff; box-shadow: 0 4px 20px rgba(220,53,69,0.3); }
.punch-card .punch-status-text { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; }
.punch-card.punch-in .punch-status-text { color: #198754; }
.punch-card.punch-out .punch-status-text { color: #dc3545; }
.punch-card .punch-time { font-size: 0.85rem; color: #666; margin-bottom: 20px; }
.btn-punch-in {
    background: #198754; color: #fff; border: none; padding: 12px 40px;
    border-radius: 50px; font-weight: 700; font-size: 1rem;
    transition: all 0.2s ease; box-shadow: 0 4px 15px rgba(25,135,84,0.3);
}
.btn-punch-in:hover { background: #157347; color: #fff; transform: translateY(-2px); }
.btn-punch-out {
    background: #dc3545; color: #fff; border: none; padding: 12px 40px;
    border-radius: 50px; font-weight: 700; font-size: 1rem;
    transition: all 0.2s ease; box-shadow: 0 4px 15px rgba(220,53,69,0.3);
}
.btn-punch-out:hover { background: #bb2d3b; color: #fff; transform: translateY(-2px); }

/* ===== LOGIN / AUTH PAGES ===== */
.login-wrapper {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--surface) 100%);
    position: relative; overflow: hidden;
}
.login-wrapper::before {
    content: ''; position: absolute; width: 400px; height: 400px;
    background: rgba(233,69,96,0.1); border-radius: 50%; top: -100px; right: -100px;
}
.login-wrapper::after {
    content: ''; position: absolute; width: 300px; height: 300px;
    background: rgba(15,52,96,0.2); border-radius: 50%; bottom: -80px; left: -80px;
}
.login-card {
    background: #fff; border-radius: 16px; padding: 40px; width: 100%; max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); position: relative; z-index: 1;
}
.login-card--narrow { padding: 48px 40px; max-width: 440px; }
.login-card--wide { max-width: 550px; }
.login-card h2, .login-card h3 { font-weight: 900; color: var(--primary); }
.login-card p.sub { color: #888; font-size: 0.9rem; }

.demo-credentials { background: #f8f9fa; border-radius: 10px; padding: 16px; font-size: 0.8rem; color: #666; }
.demo-credentials strong { color: var(--primary); }

/* ===== COMPLAINANT: NEW COMPLAINT HERO PANEL ===== */
.complaint-form-card { border-top: 4px solid var(--accent); }
.complaint-hero-panel {
    background: linear-gradient(15deg, var(--primary) 0%, var(--surface) 50%);
    color: #fff; display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
    padding: 2.5rem; border-radius: 16px; box-shadow: var(--card-shadow);
    min-height: 500px; width: 100%;
}
.complaint-hero-img {
    max-height: 320px; width: 100%; object-fit: cover;
    border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem; border: 1px solid rgba(255,255,255,0.2);
}
.complaint-hero-text {
    font-size: 0.95rem; color: rgba(255,255,255,0.8);
    line-height: 1.6; margin-bottom: 1rem;
}
.complaint-hero-icon {
    width: 50px; height: 50px; background: rgba(255,255,255,0.1);
    border-radius: 12px; display: flex; align-items: center;
    justify-content: center; margin: 0 auto 8px auto; font-size: 1.2rem;
}
.complaint-hero-small { font-size: 0.75rem; color: rgba(255,255,255,0.6); }

/* ===== VIEW COMPLAINT ===== */
.detail-description { background: #f8f9fa; line-height: 1.8; }
.attachment-thumb { border: 2px solid #eee; aspect-ratio: 1; }

/* ===== TIMELINE ===== */
.timeline-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}
.timeline-line { width: 2px; flex: 1; background: #ddd; margin-top: 4px; }

/* ===== ITEM PREVIEW (New Request) ===== */
.item-preview-box { background: #f8f9fa; border: 1px dashed #ddd; border-radius: 8px; padding: 1rem; }

/* ===== PHONE LINK ===== */
.phone-link { color: #198754; text-decoration: none; font-weight: 600; }
.phone-link:hover { color: #157347; text-decoration: underline; }

/* ===== AVAILABILITY BADGE (functions.php) ===== */
.avail-badge { font-size: 0.78rem; padding: 5px 12px; border-radius: 20px; display: inline-block; }
.avail-badge.in-office { background: #198754; color: #fff; }
.avail-badge.out-office { background: #dc3545; color: #fff; }
.avail-badge-time { font-size: 0.7rem; color: #888; }
/* ===== COMPLAINANT INFO GRID ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}
.info-item { display: flex; flex-direction: column; }
.info-label {
    font-size: 0.78rem; color: #6c757d; font-weight: 600;
    margin-bottom: 4px; display: flex; align-items: center; gap: 5px;
}
.info-value {
    font-size: 0.92rem; font-weight: 600; color: var(--primary);
    word-break: break-word;
}
.info-value a { color: var(--primary); text-decoration: none; }
.info-value a:hover { text-decoration: underline; }

/* ===== SECTION TITLE SMALL ===== */
.section-title-sm {
    font-size: 0.9rem; font-weight: 700; color: var(--primary);
    margin-bottom: 1rem; display: flex; align-items: center; gap: 8px;
}

/* ===== MOBILE ICON ONLY BUTTONS ===== */
@media (max-width: 767.98px) {
    .btn-mobile-icon .btn-label { display: none; }
    .btn-mobile-icon i { margin-left: 0 !important; margin-right: 0 !important; }
}
/* ===== IT INVENTORY SPECIFIC ===== */
.serial-search-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--surface) 100%);
    border-radius: 16px; padding: 24px 28px; color: #fff; margin-bottom: 24px;
    position: relative; overflow: hidden;
}
.serial-search-box::before {
    content: ''; position: absolute; width: 150px; height: 150px;
    background: rgba(233,69,96,0.08); border-radius: 50%; top: -40px; right: -30px;
}
.serial-search-input {
    border-radius: 12px; padding: 14px 20px; font-size: 1rem;
    border: 2px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1);
    color: #fff; width: 100%; position: relative; z-index: 1;
}
.serial-search-input::placeholder { color: rgba(255,255,255,0.5); }
.serial-search-input:focus { background: rgba(255,255,255,0.15); border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(233,69,96,0.3); }
.serial-result-card {
    background: rgba(255,255,255,0.08); border-radius: 12px; padding: 16px;
    margin-top: 12px; border: 1px solid rgba(255,255,255,0.12);
}
.serial-result-card .result-name { font-weight: 700; font-size: 1.05rem; }
.serial-result-card .result-owner { color: var(--accent); font-weight: 700; }

.inv-warranty-badge { padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; display: inline-block; }
.inv-warranty-active { background: rgba(25,135,84,0.12); color: #198754; border: 1px solid rgba(25,135,84,0.2); }
.inv-warranty-expiring { background: rgba(240,173,78,0.15); color: #856404; border: 1px solid rgba(240,173,78,0.3); }
.inv-warranty-expired { background: rgba(220,53,69,0.12); color: #dc3545; border: 1px solid rgba(220,53,69,0.2); }

.inv-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.inv-detail-label { font-size: 0.78rem; color: #6c757d; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 5px; }
.inv-detail-value { font-size: 0.92rem; font-weight: 600; color: var(--primary); word-break: break-word; }

.config-box { background: #f0f4ff; border: 1px dashed #b0c4de; border-radius: 8px; padding: 12px 16px; font-family: 'Courier New', monospace; font-size: 0.88rem; line-height: 1.8; }

.bulk-step { border-left: 4px solid var(--accent); padding-left: 20px; margin-bottom: 28px; }
.bulk-step-title { font-weight: 800; color: var(--primary); font-size: 1.05rem; margin-bottom: 12px; }
.bulk-step-title .step-num { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; align-items: center; justify-content: center; font-size: 0.82rem; margin-right: 8px; }
.bulk-item-row { background: #f8f9ff; border: 1px solid #e0e4f0; border-radius: 10px; padding: 16px; margin-bottom: 10px; position: relative; transition: border-color 0.2s; }
.bulk-item-row:hover { border-color: var(--accent); }
.remove-row-btn { position: absolute; top: 8px; right: 8px; }
.add-tab { cursor: pointer; padding: 12px 24px; font-weight: 700; border-bottom: 3px solid transparent; transition: all 0.2s; color: #888; }
.add-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.add-tab:hover { color: var(--accent); }