/* ==========================================
   SupportDesk - Complete Stylesheet
   ========================================== */

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #111128;
    --bg-card: #161635;
    --bg-input: #1a1a3e;
    --bg-hover: #1e1e48;
    --border: #2a2a5a;
    --text-primary: #e8e8f0;
    --text-secondary: #9898b8;
    --text-muted: #6868a0;
    --accent: #00d4aa;
    --accent-hover: #00eabb;
    --accent-dim: rgba(0, 212, 170, 0.15);
    --red: #ff4466;
    --orange: #ff8844;
    --yellow: #ffbb33;
    --green: #00d4aa;
    --blue: #4488ff;
    --purple: #8866ff;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ==========================================
   Navbar
   ========================================== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 60px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 18px;
}

.logo-icon {
    color: var(--accent);
    font-size: 22px;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-link.active { color: var(--accent); background: var(--accent-dim); }

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.user-role-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--accent-dim);
    color: var(--accent);
}

.role-admin { background: rgba(136, 102, 255, 0.15); color: var(--purple); }
.role-agent { background: rgba(68, 136, 255, 0.15); color: var(--blue); }

/* ==========================================
   Main Content
   ========================================== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.back-link {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ==========================================
   Cards
   ========================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* ==========================================
   Stats Grid
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stats-small { grid-template-columns: repeat(3, 1fr); }

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color 0.2s;
}

.stat-card:hover { border-color: var(--accent); }

.stat-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
}

.stat-blue   { background: rgba(68,136,255,0.12);  color: var(--blue); }
.stat-orange { background: rgba(255,136,68,0.12);  color: var(--orange); }
.stat-yellow { background: rgba(255,187,51,0.12);  color: var(--yellow); }
.stat-green  { background: rgba(0,212,170,0.12);   color: var(--green); }
.stat-purple { background: rgba(136,102,255,0.12); color: var(--purple); }

/* Make inline SVGs inside stat icons scale correctly */
.stat-icon svg { width: 26px; height: 26px; display: block; }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ==========================================
   Dashboard Grid
   ========================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Priority Bars */
.priority-bars { display: flex; flex-direction: column; gap: 14px; }
.priority-row { display: flex; align-items: center; gap: 12px; }
.priority-label { width: 70px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.priority-bar-track { flex: 1; height: 10px; background: var(--bg-input); border-radius: 5px; overflow: hidden; }
.priority-bar-fill { height: 100%; border-radius: 5px; transition: width 0.6s ease; min-width: 4px; }
.priority-count { width: 30px; text-align: right; font-weight: 600; font-size: 14px; font-family: var(--mono); }

/* Category List */
.category-list { display: flex; flex-direction: column; gap: 10px; }
.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}
.category-name { font-size: 14px; font-weight: 500; }
.category-badge {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--mono);
}

/* ==========================================
   Tables
   ========================================== */
.table-responsive { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    text-align: left;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.table tbody td {
    padding: 14px;
    border-bottom: 1px solid rgba(42, 42, 90, 0.5);
    font-size: 14px;
}

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

.clickable-row { cursor: pointer; transition: background 0.15s; }
.clickable-row:hover { background: var(--bg-hover); }

.ticket-code {
    font-family: var(--mono);
    font-size: 12px;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.ticket-subject {
    font-weight: 500;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================
   Status & Priority Badges
   ========================================== */
.status-badge, .priority-badge, .category-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.status-open { background: rgba(68,136,255,0.15); color: var(--blue); }
.status-in_progress { background: rgba(255,187,51,0.15); color: var(--yellow); }
.status-waiting { background: rgba(255,136,68,0.15); color: var(--orange); }
.status-resolved { background: rgba(0,212,170,0.15); color: var(--green); }
.status-closed { background: rgba(104,104,160,0.15); color: var(--text-muted); }

.priority-critical { background: rgba(255,68,102,0.15); color: var(--red); }
.priority-high { background: rgba(255,136,68,0.15); color: var(--orange); }
.priority-medium { background: rgba(255,187,51,0.15); color: var(--yellow); }
.priority-low { background: rgba(0,212,170,0.15); color: var(--green); }

.category-tag { background: var(--bg-input); color: var(--text-secondary); font-weight: 500; text-transform: none; }

/* ==========================================
   Forms
   ========================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.form-inline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 120px auto;
    gap: 16px;
    align-items: end;
}

.select-sm {
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary { background: var(--accent); color: #0a0a1a; }
.btn-primary:hover { background: var(--accent-hover); color: #0a0a1a; transform: translateY(-1px); }

.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-full { width: 100%; }

/* ==========================================
   Alerts
   ========================================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success { background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.3); color: var(--green); }
.alert-error { background: rgba(255,68,102,0.1); border: 1px solid rgba(255,68,102,0.3); color: var(--red); }
.alert-info { background: rgba(68,136,255,0.1); border: 1px solid rgba(68,136,255,0.3); color: var(--blue); }

/* ==========================================
   Auth Page
   ========================================== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 0%, #161635 0%, var(--bg-primary) 70%);
}

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

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header .logo { font-size: 24px; margin-bottom: 8px; }
.auth-subtitle { color: var(--text-muted); font-size: 14px; }

.auth-switch {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: var(--text-muted);
}

.guest-option { margin-top: 24px; }

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 16px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ==========================================
   Ticket View Layout
   ========================================== */
.ticket-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

.ticket-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* Response Cards */
.response-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
}

.response-card.original { border-left: 3px solid var(--accent); }
.response-card.internal-note { border-left: 3px solid var(--yellow); background: rgba(255,187,51,0.04); }

.response-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

.response-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.avatar-agent { background: var(--accent-dim); color: var(--accent); }

.response-time { color: var(--text-muted); font-size: 12px; margin-left: 4px; }

.response-body {
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.agent-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
}

.internal-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255,187,51,0.15);
    color: var(--yellow);
    font-weight: 700;
    text-transform: uppercase;
}

/* System Messages */
.system-response { background: transparent; border-color: transparent; }
.system-message {
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.system-icon { font-size: 16px; }

/* Sidebar */
.sidebar-details { display: flex; flex-direction: column; gap: 14px; }
.detail-row { display: flex; justify-content: space-between; font-size: 14px; }
.detail-label { color: var(--text-muted); font-weight: 500; }

.sidebar-form .form-group { margin-bottom: 10px; }
.sidebar-form label { font-size: 12px; }

/* Timeline */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 18px;
}

.timeline-dot {
    position: absolute;
    left: -17px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-card);
}

.timeline-content { display: flex; flex-direction: column; gap: 3px; }
.timeline-time { font-size: 12px; color: var(--text-muted); }
.timeline-user { font-size: 12px; color: var(--text-muted); }

/* Reply Card */
.reply-card { border: 1px dashed var(--border); }

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* ==========================================
   Empty State
   ========================================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* ==========================================
   Pagination
   ========================================== */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding-top: 20px;
}

.page-link {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-input);
}

.page-link.active {
    background: var(--accent);
    color: #0a0a1a;
}

/* ==========================================
   Filter Bar
   ========================================== */
.filter-card { padding: 16px 20px; margin-bottom: 20px; }
.filter-form {
    display: flex;
    gap: 12px;
    align-items: end;
}

.filter-form .form-group { margin-bottom: 0; flex: 1; }
.filter-form .btn { height: 40px; }

/* ==========================================
   Utility
   ========================================== */
.text-muted { color: var(--text-muted); }

/* ==========================================
   Attachments
   ========================================== */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: var(--bg-input);
    user-select: none;
}
.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: var(--accent);
    background: var(--accent-dim);
}
.file-upload-area input[type="file"] { display: none; }
.file-upload-icon { font-size: 28px; margin-bottom: 6px; }
.file-upload-text { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.file-upload-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.file-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.file-preview-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    font-size: 12px;
    color: var(--text-secondary);
}
.file-preview-size { color: var(--text-muted); }

.file-remove-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    padding: 0 0 0 4px;
    margin-left: auto;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}
.file-remove-btn:hover { color: var(--red); }

/* Make label inside upload area fill the whole area so the click target is correct */
.file-upload-area label {
    display: block;
    cursor: pointer;
    padding: 24px 20px;
    text-align: center;
}
.file-upload-area { padding: 0; }

.attachments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px 14px;
    border-top: 1px solid var(--border);
    background: var(--bg-input);
}
.attachments-label {
    width: 100%;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.attachment-item:hover { border-color: var(--accent); color: var(--accent); }
.attachment-item-icon { flex-shrink: 0; }
.attachment-img-thumb {
    display: block;
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: opacity 0.2s;
}
.attachment-img-thumb:hover { opacity: 0.85; }
.attachment-img-wrap {
    display: inline-block;
    text-decoration: none;
}

/* ==========================================
   Theme Toggle — Pill / Slider Switch
   ========================================== */
.theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

/* Hide the real checkbox */
.theme-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.switch-icon-left,
.switch-icon-right {
    font-size: 13px;
    line-height: 1;
    opacity: 0.55;
    transition: opacity 0.2s;
}

/* Highlight active side icon */
.theme-switch input:not(:checked) ~ .switch-icon-left,
.theme-switch .switch-icon-left { opacity: 0.55; }

/* Track */
.switch-track {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--bg-hover);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    transition: background 0.3s, border-color 0.3s;
    flex-shrink: 0;
}

/* Thumb */
.switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
    transition: transform 0.25s ease, background 0.25s;
}

/* Checked = light mode: thumb slides right, track turns accent */
.theme-switch input:checked + .switch-track {
    background: var(--accent-dim);
    border-color: var(--accent);
}

.theme-switch input:checked + .switch-track .switch-thumb {
    transform: translateX(20px);
    background: var(--accent);
}

/* Hover glow */
.theme-switch:hover .switch-track {
    border-color: var(--accent);
}

/* Nav user link (wraps the avatar+name so it's clickable) */
.nav-user-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    transition: background 0.15s;
}
.nav-user-link:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-user-link.active .user-avatar { border: 2px solid var(--accent); }

/* ==========================================
   Light Theme Variables
   ========================================== */
[data-theme="light"] {
    --bg-primary:    #f0f2f7;
    --bg-secondary:  #ffffff;
    --bg-card:       #ffffff;
    --bg-input:      #f4f6fc;
    --bg-hover:      #e8ecf5;
    --border:        #cdd4e8;
    --text-primary:  #1a1d2e;
    --text-secondary:#4a5270;
    --text-muted:    #7888ac;
    --accent:        #009e82;
    --accent-hover:  #00b898;
    --accent-dim:    rgba(0, 158, 130, 0.10);
    --shadow:        0 4px 24px rgba(0,0,0,0.08);
}

[data-theme="light"] .auth-page {
    background: radial-gradient(ellipse at 50% 0%, #e4e9f5 0%, var(--bg-primary) 70%);
}

/* Keep dark text on accent button in light mode */
[data-theme="light"] .btn-primary { color: #ffffff; }
[data-theme="light"] .btn-primary:hover { color: #ffffff; }

/* Fix select option colors in light mode */
[data-theme="light"] .form-group select option {
    background: #ffffff;
    color: #1a1d2e;
}

/* Fix hardcoded border color on table rows */
[data-theme="light"] .table tbody td {
    border-bottom: 1px solid var(--border);
}

/* Slightly dim timeline line */
[data-theme="light"] .timeline::before {
    background: var(--border);
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 768px) {
    .navbar { flex-wrap: wrap; height: auto; padding: 12px; gap: 8px; }
    .nav-links { order: 3; width: 100%; overflow-x: auto; }
    .main-content { padding: 16px; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-small { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .ticket-layout { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-inline-grid { grid-template-columns: 1fr; }
    .filter-form { flex-direction: column; }
    .filter-form .form-group { flex: none; }
}
