* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background: #f4f6fa;
    color: #111827;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background: #f4f6fa;
    color: #111827;
}

a { text-decoration: none; }

/* ══════════════════════════════════════
   LOGIN
══════════════════════════════════════ */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2f7;
}

.login-wrapper { width: 100%; max-width: 460px; padding: 20px; }

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 30px rgba(15,23,42,0.08);
    border: 1px solid #e5e7eb;
}

.brand-block  { margin-bottom: 20px; }
.brand-logo   { font-size: 30px; font-weight: 700; color: #2451b2; }
.brand-subtitle { color: #64748b; margin-top: 4px; }
.login-title  { font-size: 28px; margin-bottom: 8px; }
.login-text   { color: #64748b; margin-bottom: 20px; }

.auth-page { background: #f1f5f9; display: flex; justify-content: center; align-items: center; height: 100vh; }
.auth-container { width: 100%; max-width: 420px; }
.auth-card { background: #fff; padding: 28px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.auth-title { margin-bottom: 6px; font-size: 22px; font-weight: 700; }
.auth-subtitle { font-size: 14px; color: #64748b; margin-bottom: 18px; }

/* ══════════════════════════════════════
   FORMS
══════════════════════════════════════ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label,
.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 2px;
}

.required { color: #dc2626; margin-left: 2px; }

.form-hint {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: #2f5cb9;
    box-shadow: 0 0 0 3px rgba(47,92,185,0.1);
}

textarea.form-control,
.textarea-control {
    height: auto;
    padding: 10px 12px;
    resize: vertical;
    line-height: 1.5;
}

.file-input { height: auto; padding: 8px 12px; cursor: pointer; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.form-group-full { grid-column: 1 / -1; }

.form-actions {
    display: flex;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid #f0f4f8;
    margin-top: 4px;
}

.form-actions .btn { height: 42px; padding: 0 24px; font-size: 14px; }

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-primary {
    background: #2f5cb9;
    color: #fff;
    height: 42px;
    padding: 0 22px;
    border: none;
}
.btn-primary:hover { background: #244da0; color: #fff; }

.btn-secondary {
    background: #f1f5f9;
    color: #374151;
    border: 1px solid #d1d5db;
    height: 42px;
    padding: 0 18px;
}
.btn-secondary:hover { background: #e2e8f0; }

.btn-full { width: 100%; }

.top-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 600;
    background: #2f5cb9;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}
.top-action-btn:hover { background: #244da0; color: #fff; }

.btn-sm {
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-danger-soft  { background: #fee2e2; color: #b91c1c; }
.btn-danger-soft:hover  { background: #fecaca; color: #991b1b; }
.btn-success-soft { background: #dcfce7; color: #15803d; }
.btn-success-soft:hover { background: #bbf7d0; color: #166534; }

/* ══════════════════════════════════════
   ALERTS
══════════════════════════════════════ */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-danger  { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

/* ══════════════════════════════════════
   APP LAYOUT
══════════════════════════════════════ */
.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
    width: 280px;
    background: #12203a;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px 18px;
    flex-shrink: 0;
}

.sidebar-brand { font-size: 34px; font-weight: 700; color: #2d64d8; margin-bottom: 30px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 8px; }

.nav-section-title {
    color: #8b97ad;
    font-size: 13px;
    font-weight: 700;
    margin: 18px 0 6px;
    letter-spacing: 1px;
}

.nav-link { padding: 14px 16px; border-radius: 10px; color: #e5e7eb; display: block; }
.nav-link:hover, .nav-link.active { background: #2a3b63; color: #fff; }

.sidebar-footer { margin-top: 24px; }

.user-box {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 24px;
}

.user-name { font-size: 18px; font-weight: 600; }
.user-role { color: #94a3b8; margin-top: 4px; }

.logout-btn {
    display: block;
    margin-top: 14px;
    padding: 14px 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: #fff;
}

/* ── Main content ── */
.main-content { flex: 1; padding: 42px 34px; min-width: 0; }

/* ── Page header ── */
.page-header h1 { font-size: 42px; margin-bottom: 6px; color: #0f172a; }
.page-header p  { color: #64748b; font-size: 16px; margin-bottom: 28px; }

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}
.page-header-row .page-header p { margin-bottom: 0; }

/* ══════════════════════════════════════
   STAT CARDS (Dashboard)
══════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 16px;
    padding: 24px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 120px;
    box-shadow: 0 3px 10px rgba(15,23,42,0.06);
}

.stat-card-urgent { border-left: 3px solid #ef4444; }

.stat-label { color: #5b6b87; font-size: 15px; margin-bottom: 10px; }
.stat-value { font-size: 36px; font-weight: 700; color: #0f172a; }

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 700;
}
.stat-icon svg { width: 24px; height: 24px; display: block; }

.stat-icon.blue   { background: #e8f0ff; color: #2d64d8; }
.stat-icon.purple { background: #f0eaff; color: #7c3aed; }
.stat-icon.red    { background: #fde8e8; color: #ef4444; }
.stat-icon.green  { background: #dcfce7; color: #16a34a; }
.stat-icon.orange { background: #ffedd5; color: #ea580c; }

/* ══════════════════════════════════════
   PANEL CARD
══════════════════════════════════════ */
.panel-card {
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 16px;
    padding: 26px 28px;
    box-shadow: 0 3px 10px rgba(15,23,42,0.06);
    margin-bottom: 24px;
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-card { max-width: 980px; }

.empty-state { color: #64748b; text-align: center; padding-top: 60px; font-size: 16px; }
.compact-empty { padding-top: 16px; padding-bottom: 8px; text-align: left; }

/* ══════════════════════════════════════
   FILTERS ROW (Tickets page)
══════════════════════════════════════ */
.filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.filters-row .form-control,
.filters-row .filter-input,
.filters-row .filter-select {
    height: 36px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111827;
    padding: 0 10px;
    margin-bottom: 0;
}

.filters-row .filter-input  { min-width: 200px; flex: 1; }
.filters-row .filter-select { width: 148px; flex: 0 0 auto; padding-right: 8px; }

.filters-row .btn {
    height: 36px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}
.filters-row .btn-primary  { background: #2f5cb9; color: #fff; border: none; }
.filters-row .btn-primary:hover  { background: #244da0; }
.filters-row .btn-secondary { height: 36px; background: #f1f5f9; color: #374151; border: 1px solid #d1d5db; }
.filters-row .btn-secondary:hover { background: #e2e8f0; }

/* ══════════════════════════════════════
   DATA TABLE
══════════════════════════════════════ */
.table-wrap { overflow-x: auto; margin-top: 4px; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    background: #fff;
}

.data-table thead tr {
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    border-bottom: 2px solid #e2e8f0;
}

.data-table th {
    padding: 10px 14px;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    background: #f8fafc;
    text-align: left;
    vertical-align: middle;
}

.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f4f8;
    color: #1e293b;
    vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f5f8ff; }

.table-link { color: #2f5cb9; font-weight: 700; }
.table-link:hover { text-decoration: underline; }
.text-muted { color: #64748b; font-size: 13.5px; }

/* ══════════════════════════════════════
   BADGES
══════════════════════════════════════ */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-status            { background: #eef2ff; color: #4338ca; }
.badge-status-new        { background: #eff6ff; color: #1d4ed8; }
.badge-status-open       { background: #f0fdf4; color: #15803d; }
.badge-status-inprogress { background: #fefce8; color: #a16207; }
.badge-status-waiting    { background: #fff7ed; color: #c2410c; }
.badge-status-resolved   { background: #f0fdf4; color: #166534; }
.badge-status-closed     { background: #f1f5f9; color: #475569; }

.badge-priority                           { background: #fff7ed; color: #c2410c; }
.badge-priority[data-priority="Critical"] { background: #fde8e8; color: #b91c1c; }
.badge-priority[data-priority="High"]     { background: #fff7ed; color: #c2410c; }
.badge-priority[data-priority="Medium"]   { background: #fefce8; color: #a16207; }
.badge-priority[data-priority="Low"]      { background: #f0fdf4; color: #166534; }

.badge-role     { background: #f1f5f9; color: #475569; }
.badge-active   { background: #dcfce7; color: #15803d; }
.badge-inactive { background: #fee2e2; color: #b91c1c; }
.badge-you      { background: #eff6ff; color: #1d4ed8; }

.comment-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e8f0ff;
    color: #2f5cb9;
    font-size: 12px;
    font-weight: 700;
}

/* ══════════════════════════════════════
   TICKET DETAIL
══════════════════════════════════════ */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.detail-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 24px; }

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f4f8;
    font-size: 14px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row > span:first-child { color: #64748b; font-weight: 500; min-width: 100px; }
.detail-row > strong { color: #1e293b; text-align: right; }

.description-block {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f4f8;
}

.description-title {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.description-text {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.7;
    color: #334155;
}

/* ══════════════════════════════════════
   ATTACHMENTS
══════════════════════════════════════ */
.attachment-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13.5px;
}

.attachment-icon { font-size: 16px; flex-shrink: 0; }
.attachment-link { color: #2f5cb9; font-weight: 600; flex: 1; }
.attachment-link:hover { text-decoration: underline; }
.attachment-meta { color: #94a3b8; font-size: 12px; white-space: nowrap; }

.upload-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid #f0f4f8; }

.upload-row { display: flex; gap: 10px; align-items: center; }
.upload-row .file-input { flex: 1; }
.upload-row .btn-secondary { height: 42px; padding: 0 20px; flex-shrink: 0; }

/* ══════════════════════════════════════
   COMMENTS
══════════════════════════════════════ */
.comment-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }

.comment-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    background: #fafafa;
}

.comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8f0ff;
    color: #2f5cb9;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.comment-meta strong { font-size: 13.5px; color: #1e293b; display: block; }
.comment-time  { font-size: 12px; color: #94a3b8; }
.comment-body  { font-size: 14px; line-height: 1.6; color: #334155; margin-left: 42px; }
.comment-form  { padding-top: 16px; border-top: 1px solid #f0f4f8; }

/* ══════════════════════════════════════
   USERS PAGE
══════════════════════════════════════ */
.user-stats-strip {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    padding: 16px 28px;
    margin-bottom: 24px;
    box-shadow: 0 3px 10px rgba(15,23,42,0.06);
}

.user-stat-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 28px; }
.user-stat-item:first-child { padding-left: 0; }
.user-stat-value { font-size: 28px; font-weight: 700; color: #1e293b; line-height: 1; }
.user-stat-label { font-size: 12px; color: #94a3b8; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.user-stat-divider { width: 1px; height: 36px; background: #e5e7eb; flex-shrink: 0; }

.user-name-cell { display: flex; align-items: center; gap: 10px; }

.user-initials-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e8f0ff;
    color: #2f5cb9;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ══════════════════════════════════════
   DASHBOARD ACTIVITY
══════════════════════════════════════ */
.activity-list { display: flex; flex-direction: column; gap: 0; }

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f4f8;
}
.activity-item:last-child { border-bottom: none; padding-bottom: 0; }

.activity-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.activity-content { flex: 1; min-width: 0; }

.activity-main {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.activity-target {
    font-size: 13px;
    font-weight: 600;
    color: #2f5cb9;
    background: #eff6ff;
    padding: 1px 8px;
    border-radius: 999px;
}

.activity-sub  { font-size: 13px; color: #64748b; }
.activity-time { font-size: 12px; color: #94a3b8; white-space: nowrap; flex-shrink: 0; margin-top: 2px; }
.muted         { color: #64748b; font-size: 13px; }

/* ══════════════════════════════════════
   AUDIT LOG
══════════════════════════════════════ */
.audit-filter-card { margin-bottom: 20px; padding: 20px 24px; }
/* Audit log filter card — remove extra space */
.audit-filter-card {
    margin-bottom: 20px;
    padding: 20px 24px !important;
    min-height: unset !important;
}

.panel-card.audit-filter-card {
    min-height: unset !important;
    padding: 20px 24px !important;
}
.audit-filter-row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.audit-filter-group { display: flex; flex-direction: column; gap: 6px; }
.audit-filter-group .form-control { width: 180px; height: 38px; font-size: 13.5px; }

.audit-filter-btns { display: flex; gap: 8px; align-items: center; }
.audit-filter-btns .btn { height: 38px; padding: 0 18px; font-size: 13.5px; }
.audit-filter-btns .btn-primary { background: #2f5cb9; color: #fff; border: none; }
.audit-filter-btns .btn-primary:hover { background: #244da0; }

.audit-time          { font-size: 13px; color: #475569; white-space: nowrap; }
.audit-action-badge  { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.audit-target        { font-size: 13.5px; font-weight: 600; color: #2f5cb9; }
.audit-details       { font-size: 13px; max-width: 260px; }
.audit-ip            { font-size: 12.5px; color: #94a3b8; font-family: monospace; white-space: nowrap; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(200px, 1fr)); }
}

@media (max-width: 1024px) {
    .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .app-layout    { flex-direction: column; }
    .sidebar       { width: 100%; }
    .stats-grid    { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 32px; }
    .page-header-row { flex-direction: column; }
    .form-grid     { grid-template-columns: 1fr; }
    .form-group-full { grid-column: auto; }
    .filters-row   { flex-direction: column; align-items: stretch; }
    .filters-row .filter-input,
    .filters-row .filter-select { width: 100%; flex: none; }
    .form-actions  { flex-direction: column; }
    .upload-row    { flex-direction: column; }
    .upload-row .btn-secondary { width: 100%; }
    .audit-filter-row { flex-direction: column; align-items: stretch; }
    .audit-filter-group .form-control { width: 100%; }
    .user-stats-strip { padding: 16px; flex-wrap: wrap; gap: 16px; }
    .user-stat-item { padding: 0 16px; }
}
a {
    text-decoration: none;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2f7;
}

.login-wrapper {
    width: 100%;
    max-width: 460px;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.brand-block {
    margin-bottom: 20px;
}

.brand-logo {
    font-size: 30px;
    font-weight: 700;
    color: #2451b2;
}

.brand-subtitle {
    color: #64748b;
    margin-top: 4px;
}

.login-title {
    font-size: 28px;
    margin-bottom: 8px;
}

.login-text {
    color: #64748b;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}

.form-control {
    width: 100%;
    height: 46px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}

.btn-primary {
    background: #2f5cb9;
    color: #fff;
    height: 46px;
}

.btn-full {
    width: 100%;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #12203a;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px 18px;
}

.sidebar-brand {
    font-size: 34px;
    font-weight: 700;
    color: #2d64d8;
    margin-bottom: 30px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-section-title {
    color: #8b97ad;
    font-size: 13px;
    font-weight: 700;
    margin: 18px 0 6px;
    letter-spacing: 1px;
}

.nav-link {
    padding: 14px 16px;
    border-radius: 10px;
    color: #e5e7eb;
    display: block;
}

.nav-link:hover,
.nav-link.active {
    background: #2a3b63;
    color: #fff;
}

.sidebar-footer {
    margin-top: 24px;
}

.user-box {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 24px;
}

.user-name {
    font-size: 18px;
    font-weight: 600;
}

.user-role {
    color: #94a3b8;
    margin-top: 4px;
}

.logout-btn {
    display: block;
    margin-top: 14px;
    padding: 14px 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: #fff;
}

.main-content {
    flex: 1;
    padding: 42px 34px;
}

.page-header h1 {
    font-size: 48px;
    margin-bottom: 8px;
}

.page-header p {
    color: #64748b;
    font-size: 18px;
    margin-bottom: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 18px;
    padding: 26px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 130px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.stat-label {
    color: #5b6b87;
    font-size: 17px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 38px;
    font-weight: 700;
}

.stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.stat-icon.blue   { background: #e8f0ff; color: #2d64d8; }
.stat-icon.purple { background: #f0eaff; color: #7c3aed; }
.stat-icon.red    { background: #fde8e8; color: #ef4444; }
.stat-icon.green  { background: #dcfce7; color: #16a34a; }
.stat-icon.orange { background: #ffedd5; color: #ea580c; }

.panel-card {
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
    min-height: 260px;
}

.panel-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
}

.empty-state {
    color: #64748b;
    text-align: center;
    padding-top: 60px;
    font-size: 18px;
}

.compact-empty {
    padding-top: 24px;
    padding-bottom: 8px;
}

/* ── Page header row ── */
.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

/* ── NEW TICKET BUTTON ── */
.top-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 600;
    background: #2f5cb9;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    transition: background 0.15s;
}
.top-action-btn:hover {
    background: #244da0;
    color: #fff;
}

/* ── FILTERS ROW ── */
.filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.filters-row .form-control,
.filters-row .filter-input,
.filters-row .filter-select {
    height: 36px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111827;
    padding: 0 10px;
}

.filters-row .filter-input {
    min-width: 200px;
    flex: 1;
}

.filters-row .filter-select {
    width: 148px;
    flex: 0 0 auto;
    padding-right: 8px;
    appearance: auto;
}

/* ── FILTER / RESET BUTTONS ── */
.filters-row .btn {
    height: 36px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: background 0.15s;
}

.filters-row .btn-primary {
    background: #2f5cb9;
    color: #fff;
    border: none;
}
.filters-row .btn-primary:hover {
    background: #244da0;
}

.btn-secondary {
    background: #f1f5f9;
    color: #374151;
    border: 1px solid #d1d5db;
    height: 46px;
    padding: 0 18px;
}
.btn-secondary:hover {
    background: #e5e7eb;
}

.filters-row .btn-secondary {
    height: 36px;
    background: #f1f5f9;
    color: #374151;
    border: 1px solid #d1d5db;
}
.filters-row .btn-secondary:hover {
    background: #e2e8f0;
}

/* ── DATA TABLE ── */
.table-wrap {
    overflow-x: auto;
    margin-top: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    background: #fff;
}

.data-table thead tr {
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    border-bottom: 2px solid #e2e8f0;
}

.data-table th {
    padding: 10px 14px;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    background: #f8fafc;
    text-align: left;
    vertical-align: middle;
}

.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f4f8;
    color: #1e293b;
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: #f5f8ff;
}

.table-link {
    color: #2f5cb9;
    font-weight: 700;
}
.table-link:hover {
    text-decoration: underline;
}

/* ── BADGES ── */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-status {
    background: #eef2ff;
    color: #4338ca;
}

/* Priority badge colors via data attribute */
.badge-priority                           { background: #fff7ed; color: #c2410c; }
.badge-priority[data-priority="Critical"] { background: #fde8e8; color: #b91c1c; }
.badge-priority[data-priority="High"]     { background: #fff7ed; color: #c2410c; }
.badge-priority[data-priority="Medium"]   { background: #fefce8; color: #a16207; }
.badge-priority[data-priority="Low"]      { background: #f0fdf4; color: #166534; }

/* ── FORMS ── */
.form-card {
    max-width: 980px;
}

.ticket-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 18px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.textarea-control {
    height: auto;
    padding: 14px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

/* ── TICKET DETAIL ── */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

.detail-row span {
    color: #64748b;
}

.description-block {
    margin-top: 24px;
}

.description-title {
    font-weight: 700;
    margin-bottom: 10px;
}

.description-text {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    line-height: 1.6;
}

/* ── COMMENTS ── */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.comment-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    background: #fafafa;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 13px;
}

.comment-body {
    line-height: 1.6;
}

.comment-form {
    margin-top: 12px;
}

/* ── ACTIVITY ── */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.activity-item {
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 12px;
}

.activity-main {
    font-size: 14px;
    margin-bottom: 4px;
}

.activity-sub,
.activity-time,
.muted {
    color: #64748b;
    font-size: 13px;
}

/* ── AUTH PAGES ── */
.auth-page {
    background: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: #ffffff;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.auth-title {
    margin-bottom: 6px;
    font-size: 22px;
    font-weight: 700;
}

.auth-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 18px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
}

@media (max-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 34px;
    }

    .page-header-row {
        flex-direction: column;
    }

    .ticket-form .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group-full {
        grid-column: auto;
    }

    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-row .filter-input,
    .filters-row .filter-select {
        width: 100%;
        flex: none;
    }

    .form-actions {
        flex-direction: column;
    }
}