* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: 
        radial-gradient(circle at 20% 50%, rgba(37, 150, 190, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(26, 107, 138, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(45, 184, 224, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #2596be 0%, #1a6b8a 50%, #2db8e0 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 15px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.03) 2px, rgba(255, 255, 255, 0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255, 255, 255, 0.03) 2px, rgba(255, 255, 255, 0.03) 4px);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
    position: relative;
    z-index: 1;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 32px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 100;
    position: relative;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info span {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.notifications-wrapper {
    position: relative;
}

.notif-button {
    position: relative;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 8px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.notif-button:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.notif-button i {
    font-size: 16px;
}

.notif-button.notif-has-unread i {
    color: #ffffff;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.35);
}

.notif-button.notif-has-unread {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: #ffffff;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-weight: 700;
    box-shadow: 0 0 0 2px #ffffff;
}

.notif-dropdown {
    position: absolute;
    top: 36px;
    right: 0;
    width: 280px;
    max-height: 320px;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    padding: 8px 0;
    z-index: 200;
    display: none;
}

.notifications-wrapper.open .notif-dropdown {
    display: block;
}

.notif-empty {
    padding: 10px 14px;
    font-size: 12px;
    color: var(--text-light);
}

.notif-item {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s ease, color 0.15s ease;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 56px 48px;
    max-width: 460px;
    margin: 100px auto;
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.login-box h1 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 12px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.1px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
    min-height: 120px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px 0 rgba(37, 99, 235, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-logout {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px 0 rgba(239, 68, 68, 0.5);
}

.btn-create-ticket {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
    white-space: nowrap;
}

.btn-create-ticket:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px 0 rgba(239, 68, 68, 0.5);
}

.btn-view {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(6, 182, 212, 0.3);
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px 0 rgba(6, 182, 212, 0.4);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    width: auto;
}

.register-link {
    text-align: center;
    margin-top: 28px;
    color: var(--text-secondary);
    font-size: 14px;
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
}

.register-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.error-message {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid var(--danger-color);
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

.success-message {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid var(--success-color);
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

.dashboard-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.dashboard-content h2 {
    color: var(--text-primary);
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.ticket-form-section {
    margin-bottom: 48px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 32px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-xl);
}

.ticket-form-section h3 {
    margin-top: 0;
    margin-bottom: 24px;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.ticket-form {
    background: var(--bg-tertiary);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
}

.ticket-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.ticket-form-grid .form-group {
    margin-bottom: 0;
}

.ticket-form-grid .form-group.compact label {
    margin-bottom: 8px;
}

.ticket-form-grid .form-group.compact input,
.ticket-form-grid .form-group.compact select {
    padding: 12px 16px;
}

.ticket-form-grid .full-width {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.tickets-section {
    margin-top: 48px;
}

.tickets-list {
    display: grid;
    gap: 20px;
}

.ticket-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
}

.ticket-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 16px;
}

.ticket-header h3 {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    flex: 1;
    line-height: 1.4;
    letter-spacing: -0.3px;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.status-pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.status-in_progress {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.status-resolved {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.status-closed {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
}

.status-superadmin {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #9f1239;
}

.ticket-info {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.ticket-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    font-weight: 500;
}

.ticket-info strong {
    color: var(--text-primary);
    font-weight: 700;
}

.priority-low {
    color: var(--success-color);
    font-weight: 700;
    font-size: 13px;
}

.priority-medium {
    color: var(--warning-color);
    font-weight: 700;
    font-size: 13px;
}

.priority-high {
    color: #f97316;
    font-weight: 700;
    font-size: 13px;
}

.priority-urgent {
    color: var(--danger-color);
    font-weight: 700;
    font-size: 13px;
}

.ticket-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.8;
    font-size: 15px;
    font-weight: 400;
}

.ticket-description-full {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 2px solid var(--border-light);
}

.ticket-description-full h3 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.ticket-description-full p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 15px;
    font-weight: 400;
}

.no-tickets,
.no-comments {
    text-align: center;
    color: var(--text-light);
    padding: 80px 20px;
    font-size: 16px;
    font-weight: 500;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-2xl);
}

.stat-card-clickable {
    cursor: pointer;
    user-select: none;
}

.stat-card-clickable:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-color);
}

.stat-card-clickable:active {
    transform: translateY(-4px);
}

.stat-card-active {
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-xl);
}

.stat-card-active::before {
    height: 6px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    letter-spacing: -1px;
}

.stat-pending .stat-number {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-progress .stat-number {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-resolved .stat-number {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tickets-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-top: 32px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.dashboard-header h2 {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.tickets-header h2 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.4px;
}

.compact-filter-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.compact-filter-form select {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.compact-filter-form select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.compact-filter-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.table-container {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border-light);
}

.tickets-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.tickets-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid var(--border-color);
}

.tickets-table th {
    padding: 16px 14px;
    text-align: left;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.tickets-table td {
    padding: 18px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-weight: 500;
}

.ticket-row {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ticket-row:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    transform: scale(1.01);
}

.ticket-row-stale {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
}

.ticket-row-stale:hover {
    background: linear-gradient(135deg, #fecaca 0%, #fee2e2 100%) !important;
    transform: scale(1.01);
}

.ticket-title {
    font-weight: 700;
    color: var(--text-primary);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.priority-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.priority-badge.priority-low {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.priority-badge.priority-medium {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.priority-badge.priority-high {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    color: #9a3412;
}

.priority-badge.priority-urgent {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    display: inline-block;
    box-shadow: var(--shadow-xs);
}

@media (max-width: 768px) {
    .tickets-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .compact-filter-form {
        width: 100%;
        flex-wrap: wrap;
    }

    .compact-filter-form select {
        flex: 1;
        min-width: 140px;
    }

    .table-container {
        overflow-x: scroll;
    }

    .tickets-table {
        min-width: 900px;
    }
}

.filters-section h2 {
    color: var(--text-primary);
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 800;
    border: none;
    padding: 0;
    letter-spacing: -0.4px;
}

.filter-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-form .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 180px;
}

.filter-form .form-group label {
    margin-bottom: 8px;
    font-size: 13px;
}

.filter-form button,
.filter-form a {
    height: fit-content;
}

.ticket-update-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid var(--border-light);
}

.ticket-update-section h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.ticket-update-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
    background: var(--bg-tertiary);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
}

.form-group-inline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 180px;
}

.form-group-inline label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.form-group-inline select {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.form-group-inline select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.required-note {
    font-weight: 400;
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-light);
    opacity: 0.9;
}

.ticket-details {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.comments-section {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 2px solid var(--border-light);
}

.comments-section h2 {
    color: var(--text-primary);
    margin-bottom: 28px;
    font-size: 28px;
    font-weight: 800;
    border: none;
    padding: 0;
    letter-spacing: -0.5px;
}

.comments-list {
    margin-bottom: 24px;
}

.comment-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: none;
    border: 1px solid var(--border-light);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

.comment-header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.comment-header strong {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.comment-role {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: none;
}

.comment-date {
    color: var(--text-light);
    font-size: 11px;
    margin-left: auto;
    font-weight: 400;
}

.comment-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 13px;
    font-weight: 400;
}

.add-comment-section {
    background: var(--bg-tertiary);
    padding: 32px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.add-comment-section h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.add-comment-section textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.add-comment-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.add-comment-section button {
    margin-top: 16px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 20px;
    }

    .login-box {
        margin: 60px 20px;
        padding: 40px 28px;
    }

    .dashboard-content {
        padding: 28px;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-form .form-group {
        width: 100%;
    }

    .ticket-update-form {
        flex-direction: column;
    }

    .ticket-update-form .form-group-inline {
        width: 100%;
    }

    .ticket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .ticket-info {
        grid-template-columns: 1fr;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-date {
        margin-left: 0;
    }
}

html {
    scroll-behavior: smooth;
}

*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
}

.sidebar-header {
    padding: 28px 24px;
    border-bottom: 1px solid var(--border-light);
    background: var(--primary-gradient);
    color: white;
}

.sidebar-header h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
    color: white;
    letter-spacing: -0.5px;
}

.sidebar-subtitle {
    font-size: 12px;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    font-weight: 600;
    font-size: 15px;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-item.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 700;
}

.nav-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-icon i {
    font-size: 18px;
    line-height: 1;
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-tertiary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    box-shadow: var(--shadow-md);
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
}

.btn-logout-sidebar {
    width: 100%;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    display: block;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
}

.btn-logout-sidebar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px 0 rgba(239, 68, 68, 0.5);
}

.admin-main {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

.admin-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 28px 40px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.8px;
}

.admin-content {
    padding: 40px;
    max-width: 1400px;
}

.quick-action-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 32px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    box-shadow: var(--shadow-lg);
}

.quick-action-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-color);
}

.quick-action-icon {
    font-size: 56px;
    margin-bottom: 20px;
    text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quick-action-icon i {
    font-size: 52px;
    line-height: 1;
}

.quick-action-card h3 {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: -0.3px;
}

.quick-action-card p {
    color: var(--text-secondary);
    font-size: 15px;
    text-align: center;
    margin: 0;
    font-weight: 500;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-header {
        padding: 20px 24px;
    }

    .admin-header h1 {
        font-size: 26px;
    }

    .admin-content {
        padding: 24px;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }
}
