:root {
    --primary: #0b57ff; /* vivid blue accent */
    --primary-dark: #0837b3;
    --primary-light: #60a5fa;
    --secondary: #0b57ff;
    --accent: #0b57ff;
    --bg: #ffffff; /* main page background stays white */
    --bg-light: #f8fafc; /* subtle off-white */
    --bg-lighter: #eef2f6;
    --card-bg: #ffffff; /* white cards */
    --card-light: #f1f5f9;
    --border: #e2e8f0; /* subtle light border */
    --text: #0f172a; /* dark text */
    --text-muted: #475569;
    --text-light: #64748b;
    --blue: #0b57ff;
    --blue-light: #60a5fa;
    --green: #10b981;
    --green-light: #047857;
    --orange: #f59e0b;
    --orange-light: #b45309;
    --red: #ef4444;
    --red-light: #991b1b;
    --shadow-sm: 0 2px 6px 0 rgba(15, 23, 42, 0.06);
    --shadow-md: 0 6px 18px -6px rgba(15, 23, 42, 0.08), 0 4px 8px -4px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 14px 32px -8px rgba(15, 23, 42, 0.12), 0 6px 12px -6px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 30px 70px -20px rgba(15, 23, 42, 0.14), 0 12px 20px -8px rgba(15, 23, 42, 0.1);
    --shadow-3d: 0 30px 60px -15px rgba(15, 23, 42, 0.18);
}

* { 
    box-sizing: border-box;
}

html, body {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-light) 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { 
    text-decoration: none; 
    color: inherit;
    transition: all 0.3s ease;
}

/* ===== Layout ===== */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    perspective: 1000px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(248,250,252,0.85) 100%);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-badge {
    width: 116px;
    height: 38px;
    display: block;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateZ(20px);
}

.brand-badge:hover {
    transform: translateZ(30px) scale(1.04);
}

.brand-text .system-name {
    font-weight: 700;
    font-size: 16px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.brand-text .company-name {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-menu {
    position: relative;
}

.notification-menu summary {
    list-style: none;
}

.notification-menu summary::-webkit-details-marker {
    display: none;
}

.notification-button {
    width: 42px;
    height: 42px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.notification-button:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.notification-icon {
    font-size: 18px;
    line-height: 1;
}

.notification-count {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid #fff;
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(360px, calc(100vw - 32px));
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 30;
}

.notification-menu[open] .notification-dropdown {
    display: block;
}

.notification-header {
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.notification-item {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: rgba(11, 87, 255, 0.06);
}

.notification-item.unread {
    background: rgba(239, 68, 68, 0.08);
}

.notification-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

.notification-meta,
.notification-time {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.notification-empty {
    padding: 18px 14px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.user-info {
    text-align: right;
    line-height: 1.2;
}

.user-info .user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.user-info .user-role {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    overflow: hidden;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(255,255,255,0.03);
    box-shadow: 0 8px 16px rgba(11,87,255,0.08), inset -1px -1px 2px rgba(255,255,255,0.04);
}

.user-avatar:hover {
    transform: scale(1.1) rotateY(10deg);
    box-shadow: 0 12px 24px rgba(11, 87, 255, 0.5), inset -1px -1px 2px rgba(0,0,0,0.45);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#logout-form {
    all: unset;
}

.logout-link {
    font-size: 14px;
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    white-space: nowrap;
    background: var(--card-bg);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    transform: translateZ(10px);
    box-shadow: var(--shadow-sm);
}

.logout-link:hover { 
    background: linear-gradient(90deg, rgba(11,87,255,0.06), rgba(11,87,255,0.03));
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateZ(15px) translateY(-2px);
}

/* ===== Body: sidebar + content ===== */
.body-shell {
    display: flex;
    flex: 1;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg) 100%);
    border-right: 1px solid var(--border);
    padding: 20px 12px;
    flex-shrink: 0;
    overflow-y: auto;
    backdrop-filter: blur(4px);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    transform: translateZ(5px);
}

.nav-item:hover { 
    background: rgba(11, 87, 255, 0.06);
    color: var(--primary);
    padding-left: 16px;
    transform: translateZ(8px);
    box-shadow: 0 4px 12px rgba(11, 87, 255, 0.06);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(11,87,255,0.08) 0%, rgba(11,87,255,0.04) 100%);
    color: var(--text);
    box-shadow: 0 6px 16px rgba(11,87,255,0.06), inset 0 1px 2px rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--primary);
    padding-left: 11px;
    transform: translateZ(10px) translateX(2px);
}

.nav-item .nav-icon {
    width: 18px;
    text-align: center;
    font-size: 16px;
}

.nav-badge {
    margin-left: auto;
    background: linear-gradient(135deg, rgba(11,87,255,0.5), rgba(11,87,255,0.25));
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(11,87,255,0.24);
}

.nav-item.active .nav-badge {
    background: rgba(255, 255, 255, 0.3);
    color: #f1f5f9;
}

.nav-divider {
    border-top: 1px solid var(--border);
    margin: 14px 0;
}

.nav-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-light);
    padding: 10px 14px 6px;
    font-weight: 700;
}

.content {
    flex: 1;
    padding: 32px 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.page-subtitle {
    color: var(--text-muted);
    margin: 0 0 32px;
    font-size: 15px;
}

/* ===== Cards / stats ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 1000px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.stat-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(246,249,252,0.98) 100%);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md), inset 0 1px 2px rgba(255, 255, 255, 0.6);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    transform: translateZ(10px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(11,87,255,0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-card:hover {
    border-color: rgba(11,87,255,0.5);
    box-shadow: 0 12px 32px rgba(11,87,255,0.18), inset 0 1px 2px rgba(255, 255, 255, 0.02);
    transform: translateZ(20px) translateY(-4px);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: var(--shadow-md), inset 0 1px 2px rgba(255, 255, 255, 0.6);
    transform: translateZ(10px);
}

.stat-icon.blue { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.stat-icon.lightblue { background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%); }
.stat-icon.green { background: linear-gradient(135deg, #10b981 0%, #34d399 100%); }
.stat-icon.black { background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(7,17,41,0.9) 100%); }

.stat-delta {
    font-size: 12px;
    font-weight: 700;
}
.stat-delta.up { color: #10b981; }
.stat-delta.down { color: #ef4444; }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text);
}

.stat-label {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 6px;
    font-weight: 500;
}

/* ===== Generic card / panel ===== */
.panel {
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(246,249,252,0.98) 100%);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-md), inset 0 1px 2px rgba(255, 255, 255, 0.6);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateZ(5px);
}

.panel:hover {
    border-color: rgba(11,87,255,0.12);
    box-shadow: 0 12px 32px rgba(11,87,255,0.06), inset 0 1px 2px rgba(255, 255, 255, 0.02);
    transform: translateZ(10px) translateY(-2px);
}

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

.panel-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.view-all-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: var(--primary-light);
}

/* ===== Table ===== */
table.tickets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table.tickets-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border);
    background: rgba(255,255,255,0.02);
}

table.tickets-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

table.tickets-table tbody tr {
    transition: all 0.3s ease;
    transform: translateZ(2px);
}

table.tickets-table tbody tr:hover { 
    background: rgba(11,87,255,0.06);
    box-shadow: inset 0 0 8px rgba(11,87,255,0.04);
}

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.badge-open { 
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-in_progress { 
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-open { 
    background: rgba(11,87,255,0.12);
    color: #60a5fa;
    border: 1px solid rgba(11,87,255,0.22);
}
.badge-in_progress { 
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.22);
}
.badge-resolved { 
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.22);
}
.badge-closed { 
    background: rgba(255,255,255,0.02);
    color: #a0aec0;
    border: 1px solid rgba(255,255,255,0.03);
}
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

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

.form-group label,
.field-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text);
}

.form-input, .form-select, .form-textarea,
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], select, textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text);
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-sm);
}

.form-input::placeholder, textarea::placeholder {
    color: var(--text-light);
}

.form-input:focus, .form-select:focus, .form-textarea:focus,
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 6px rgba(11,87,255,0.08), inset 0 0 8px rgba(11,87,255,0.04);
    background: var(--card-bg);
    transform: translateZ(10px);
}

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

.file-drop {
    border: 2px dashed var(--border);
    border-radius: 12px;
    text-align: center;
    padding: 40px 24px;
    color: var(--text-muted);
    font-size: 14px;
    background: var(--card-bg);
    transition: all 0.3s ease;
}

.file-drop:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.file-drop strong { 
    color: #6366f1;
    font-weight: 700;
}

.file-drop input[type=file] {
    border: none;
    margin-top: 12px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-transform: none;
    transform: translateZ(5px);
}

.btn-primary { 
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(11, 87, 255, 0.38), inset 0 1px 2px rgba(255, 255, 255, 0.04);
}

.btn-primary:hover { 
    box-shadow: 0 8px 28px rgba(11, 87, 255, 0.48), inset 0 1px 2px rgba(255, 255, 255, 0.04);
    transform: translateZ(10px) translateY(-3px);
}

.btn-primary:active {
    transform: translateZ(5px) translateY(-1px);
}

.btn-outline { 
    background: var(--card-bg);
    color: var(--text);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover { 
    background: rgba(11, 87, 255, 0.06);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateZ(8px) translateY(-2px);
}

.btn-sm { 
    padding: 6px 14px; 
    font-size: 13px; 
}

/* ===== Search / filter bar ===== */
.search-bar {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
}

.search-bar input[type=text] { 
    flex: 1;
}

/* ===== Ticket list cards (My Tickets) ===== */
.ticket-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(246,249,252,0.98) 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-sm);
    transform: translateZ(5px);
}

.ticket-card:hover {
    border-color: rgba(99, 102, 241, 0.12);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.06), inset 0 1px 2px rgba(255, 255, 255, 0.6);
    transform: translateZ(15px) translateX(4px);
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(246,249,252,0.98) 100%);
}

.ticket-card-main { 
    flex: 1; 
    min-width: 0; 
}

.ticket-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.ticket-card-id { 
    font-weight: 700; 
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.2);
    padding: 2px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.ticket-card-subject {
    font-size: 16px;
    font-weight: 600;
    margin: 6px 0;
    color: var(--text);
}

.ticket-card-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.ticket-card-side {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.comment-count {
    background: rgba(99, 102, 241, 0.06);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* ===== Login page ===== */
.login-wrapper {
    min-height: 100vh;
    display: grid;
    align-items: center;
    justify-content: center;
    background: #f7f8fa;
    padding: 32px 20px;
    perspective: 1000px;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 16% 18%, rgba(11, 87, 255, 0.08), transparent 26%),
        radial-gradient(circle at 82% 78%, rgba(16, 185, 129, 0.07), transparent 28%),
        linear-gradient(135deg, rgba(255,255,255,0.92) 0%, rgba(248,250,252,0.72) 100%);
    z-index: 0;
}

.login-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    z-index: 1;
}

.login-card {
    width: min(100%, 430px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 36px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.logout-link {
    font-size: 14px;
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    white-space: nowrap;
    background: var(--card-bg);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    transform: translateZ(10px);
    box-shadow: var(--shadow-sm);
}
.logout-link:hover { 
    background: linear-gradient(90deg, rgba(99,102,241,0.06), rgba(236,72,153,0.03));
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateZ(15px) translateY(-2px);
}

.login-card .brand-badge {
    width: 180px;
    height: 58px;
    margin: 0 auto 26px;
}

.login-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
    line-height: 1.2;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 30px;
}

.login-card .form-group {
    margin-bottom: 16px !important;
}

.login-card .form-input {
    padding: 13px 14px;
    background: #fff;
}

.login-card .form-input:focus {
    transform: none;
}

.login-card .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 13px 16px;
    margin-top: 12px;
}

.errorlist {
    color: #991b1b;
    list-style: none;
    padding: 10px;
    background: rgba(239, 68, 68, 0.08);
    border-radius: 8px;
    font-size: 13px;
    margin: 8px 0 16px;
    border: 1px solid rgba(239, 68, 68, 0.18);
}

/* ===== Alerts ===== */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    border-left: 4px solid;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.alert-success { 
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border-left-color: #10b981;
}

.alert-error { 
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-left-color: #ef4444;
}

/* ===== Reports ===== */
.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.category-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 14px;
}

.category-row .cat-label { 
    width: 160px; 
    flex-shrink: 0;
    font-weight: 500;
    color: var(--text);
}

.bar-track {
    flex: 1;
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 5px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 8px rgba(11, 87, 255, 0.36);
}

.cat-count { 
    width: 60px; 
    text-align: right; 
    color: var(--text-muted); 
    flex-shrink: 0;
    font-weight: 700;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .topbar {
        padding: 12px 16px;
    }
    
    .topbar-right {
        gap: 12px;
    }
    
    .sidebar {
        width: 240px;
        padding: 16px 8px;
    }
    
    .content {
        padding: 24px 20px;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .topbar-right {
        gap: 8px;
    }
    
    .user-info {
        display: none;
    }
    
    .brand-text .system-name {
        font-size: 14px;
    }

    .login-wrapper {
        padding: 20px 14px;
    }

    .login-card {
        padding: 28px 20px;
        border-radius: 14px;
    }

    .login-card .brand-badge {
        width: 150px;
        height: 48px;
    }

    .login-title {
        font-size: 22px;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15,23,42,0.03);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 5px;
    box-shadow: 0 0 8px rgba(11, 87, 255, 0.32);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* ===== Ticket detail ===== */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.attachment-preview img {
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 12px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.attachment-preview img:hover {
    box-shadow: 0 12px 32px rgba(11, 87, 255, 0.28);
    transform: scale(1.02) translateZ(10px);
}

.comment {
    padding: 16px;
    margin-bottom: 12px;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 10px;
    border-left: 3px solid #6366f1;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.comment:hover {
    background: rgba(99, 102, 241, 0.12);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    transform: translateX(2px) translateZ(5px);
}

.comment:last-child { 
    margin-bottom: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.comment-author { 
    font-weight: 700; 
    color: #60a5fa;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-body {
    color: var(--text);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ===== Additional modern styles ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

select, .form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23cbd5e1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

/* Button group */
.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

.status-indicator.active {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.status-indicator.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.status-indicator.inactive {
    background: rgba(75, 85, 99, 0.2);
    color: #a0aec0;
}

/* Link styling */
a.link {
    color: var(--primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

a.link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Text utilities */
.text-muted {
    color: var(--text-muted);
}

.text-light {
    color: var(--text-light);
}

.text-error {
    color: #ef4444;
}

.text-success {
    color: #10b981;
}

/* Divider */
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

/* Animation for transitions */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
