/**
 * Support Ticket System - Premium UI
 * Beautiful, Modern, Fully Responsive
 * By Senior Frontend Developer
 */

/* ==================== CSS Variables ==================== */
:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --primary-bg: rgba(99, 102, 241, 0.1);

    /* Semantic Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #06b6d4;
    --info-light: #cffafe;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Sidebar Dark Theme */
    --sidebar-bg: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    --sidebar-width: 260px;
    --navbar-height: 64px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-700);
    background: var(--gray-100);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

body.sidebar-open {
    overflow: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

/* ==================== Main Layout ==================== */
.wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
    display: flex;
    flex-direction: column;
    background: var(--gray-100);
    transition: margin-left var(--transition-slow);
    overflow-x: hidden;
}

.content-wrapper {
    flex: 1;
    padding: 1.5rem 2rem;
    width: 100%;
    max-width: 1800px;
    overflow-x: hidden;
}

/* ==================== Beautiful Dark Sidebar ==================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
   background-image: linear-gradient(to right, rgb(55, 65, 81), rgb(17, 24, 39), rgb(0, 0, 0));

    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
    pointer-events: none;
}

.sidebar-header {
    position: relative;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.025em;
}

.sidebar-brand i {
    font-size: 1.75rem;
    color: var(--primary-light);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

.sidebar-close {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius);
    font-size: 1.25rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.375rem;
    line-height: 1;
    transition: all var(--transition-fast);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.sidebar-nav .nav-section {
     padding: 6px 30px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
}

.sidebar-nav .nav-item {
    list-style: none;
    padding: 0.125rem 0.75rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 8px;
    color: var(--gray-400);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    font-size: 0.9375rem;
    font-weight: 500;
    position: relative;
}

.sidebar-nav .nav-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav .nav-link.active {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.sidebar-nav .nav-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.sidebar-nav .nav-link:hover i {
    transform: scale(1.1);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.sidebar-footer small {
    color: var(--gray-500);
    font-size: 0.75rem;
}

/* ==================== Top Navbar ==================== */
.navbar {
    height: var(--navbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 0 1.5rem;
}

.navbar .container-fluid {
    height: 100%;
    display: flex;
    align-items: center;
}

.navbar .btn-link {
    color: var(--gray-500);
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.navbar .btn-link:hover {
    color: var(--gray-700);
    background: var(--gray-100);
}

.sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 0.5rem;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

/* Notification Dropdown */
.notification-badge {
    font-size: 0.625rem;
    padding: 0.2rem 0.45rem;
    font-weight: 700;
    min-width: 18px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.notification-dropdown {
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.notification-dropdown .dropdown-header {
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
}

/* User Dropdown */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    min-width: 200px;
}

.dropdown-item {
    border-radius: var(--radius);
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    color: var(--gray-700);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.dropdown-item i {
    width: 20px;
    color: var(--gray-500);
}

.dropdown-divider {
    margin: 0.375rem 0;
    border-color: var(--gray-200);
}

.dropdown-item-text {
    padding: 0.5rem 1rem;
}

/* ==================== Beautiful Cards ==================== */
.card {
    background: var(--white);
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    transition: all var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-100);
    padding: 1.125rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header i {
    color: var(--primary);
    font-size: 1.125rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
    padding: 1rem 1.5rem;
}

/* ==================== Stunning Stat Cards ==================== */
.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: none;
    transition: all var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card .card-body {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.stat-card .stat-icon {
    position: absolute;
    right: -0.5rem;
    bottom: -0.5rem;
    font-size: 5rem;
    opacity: 0.15;
    transform: rotate(-10deg);
    transition: all var(--transition);
}

.stat-card:hover .stat-icon {
    transform: rotate(0deg) scale(1.1);
    opacity: 0.2;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Stat Card Gradients */
.stat-card.bg-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.stat-card.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}

.stat-card.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}

.stat-card.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.35);
}

.stat-card.bg-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.35);
}

.stat-card.bg-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    box-shadow: 0 4px 20px rgba(100, 116, 139, 0.35);
}

/* ==================== Beautiful Tables ==================== */
.table {
    margin-bottom: 0;
    font-size: 0.9375rem;
}

.table thead th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    border-bottom: 2px solid var(--gray-200);
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    white-space: nowrap;
}

.table tbody td {
    vertical-align: middle;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

.table tbody tr {
    transition: background var(--transition-fast);
}

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

.table-hover tbody tr:hover {
    background: var(--gray-50);
}

.table-responsive {
    border-radius: var(--radius-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* DataTables Custom */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding: 1rem 1.5rem;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.dataTables_wrapper .dataTables_info {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.dataTables_wrapper .dataTables_paginate {
    padding: 1rem 1.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--radius) !important;
    margin: 0 0.125rem;
    transition: all var(--transition-fast);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

/* ==================== Beautiful Badges ==================== */
.badge {
    font-weight: 600;
    padding: 0.4em 0.75em;
    font-size: 0.75rem;
    border-radius: var(--radius);
    letter-spacing: 0.025em;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.badge i {
    font-size: 0.6875rem;
}

/* Soft Badge Variants */
.badge.bg-primary {
    background: var(--primary-bg) !important;
    color: var(--primary-dark);
}
.badge.bg-success {
    background: var(--success-light) !important;
    color: #059669;
}
.badge.bg-warning {
    background: var(--warning-light) !important;
    color: #b45309;
}
.badge.bg-danger {
    background: var(--danger-light) !important;
    color: #b91c1c;
}
.badge.bg-info {
    background: var(--info-light) !important;
    color: #0e7490;
}
.badge.bg-secondary {
    background: var(--gray-200) !important;
    color: var(--gray-600);
}

/* ==================== Buttons ==================== */
.btn {
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    font-size: 0.9375rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

.btn i {
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

.btn-sm i {
    font-size: 1rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.45);
    background: linear-gradient(135deg, var(--primary-dark) 0%, #4338ca 100%);
}

.btn-outline-primary {
    color: var(--primary);
    border: 2px solid var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--white);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.45);
}

/* Secondary Button */
.btn-secondary {
    background: var(--gray-600);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--gray-700);
}

.btn-outline-secondary {
    color: var(--gray-600);
    border: 2px solid var(--gray-300);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-700);
}

/* Light Button */
.btn-light {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.btn-light:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

/* Icon Button */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius);
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

/* ==================== Forms ==================== */
.form-control,
.form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    color: var(--gray-700);
    background-color: var(--white);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-bg);
    outline: none;
}

.form-control:disabled,
.form-select:disabled {
    background: var(--gray-100);
    color: var(--gray-500);
}

.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.form-text {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.375rem;
}

/* Input Group */
.input-group-text {
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    border-right: none;
    color: var(--gray-500);
    font-size: 1rem;
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus {
    border-left: 2px solid var(--primary);
}

.input-group .form-control:focus + .input-group-text,
.input-group-text:has(+ .form-control:focus) {
    border-color: var(--primary);
}

/* Form Check */
.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.15rem;
    border: 2px solid var(--gray-300);
    transition: all var(--transition-fast);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px var(--primary-bg);
    border-color: var(--primary);
}

/* ==================== Auth Pages ==================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url(../images/bg.jpg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: authBgMove 15s ease-in-out infinite;
    pointer-events: none;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

@keyframes authBgMove {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(2%, 2%) rotate(1deg); }
    50% { transform: translate(0, 4%) rotate(0deg); }
    75% { transform: translate(-2%, 2%) rotate(-1deg); }
}

/* Floating shapes decoration */
.auth-wrapper .floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    pointer-events: none;
}

.auth-wrapper .shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #fff 0%, transparent 100%);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.auth-wrapper .shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #fff 0%, transparent 100%);
    bottom: -50px;
    left: -50px;
    animation: float 10s ease-in-out infinite reverse;
}

.auth-wrapper .shape-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #fff 0%, transparent 100%);
    top: 50%;
    left: 10%;
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 3rem;
    position: relative;
    z-index: 1;
    animation: cardSlideUp 0.6s ease-out;
}

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo .logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.auth-logo .logo-icon i {
    font-size: 2.5rem;
    color: white;
}

.auth-logo i:not(.logo-icon i) {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.3));
}

.auth-logo h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.auth-logo p {
    color: var(--gray-500);
    font-size: 1rem;
    margin: 0;
}

/* Auth Form Styles */
.auth-card .form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.auth-card .input-group {
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-lg); */
    overflow: hidden;
}

.auth-card .input-group-text {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-right: none;
    color: var(--gray-500);
    padding: 0.75rem 1rem;
}

.auth-card .input-group .form-control {
    border: 2px solid var(--gray-200);
    border-left: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.auth-card .input-group:focus-within {
    box-shadow: 0 0 0 4px var(--primary-bg);
}

.auth-card .input-group:focus-within .input-group-text,
.auth-card .input-group:focus-within .form-control {
    border-color: var(--primary);
}

.auth-card .input-group:focus-within .input-group-text {
    color: var(--primary);
}

.auth-card .btn-primary {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all var(--transition);
}

.auth-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.auth-card .btn-primary:active {
    transform: translateY(0);
}

.auth-card .form-check-label {
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.auth-card a {
    color: var(--primary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.auth-card a:hover {
    color: var(--primary-dark);
}

/* Password Toggle Button */
.auth-card #togglePassword {
    border: 2px solid var(--gray-200);
    border-left: none;
    background: var(--gray-50);
    color: var(--gray-500);
    padding: 0.75rem 1rem;
}

.auth-card #togglePassword:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Auth Footer Text */
.auth-card .text-center.text-muted {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* ==================== Page Header ==================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
    letter-spacing: -0.025em;
}

/* ==================== Timeline ==================== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--gray-200) 100%);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.625rem;
    top: 0.375rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.timeline-item.completed::before {
    background: var(--success);
    box-shadow: 0 0 0 3px var(--success-light);
}

.timeline-content {
    background: var(--gray-50);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
}

/* ==================== Priority Colors ==================== */
.priority-low { color: var(--success); }
.priority-medium { color: var(--info); }
.priority-high { color: var(--warning); }
.priority-critical { color: var(--danger); }

/* ==================== Star Rating ==================== */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--gray-300);
    transition: all var(--transition-fast);
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #fbbf24;
    transform: scale(1.1);
}

/* ==================== File Upload ==================== */
.file-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--gray-50);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.file-upload-area i {
    font-size: 2.5rem;
    color: var(--gray-400);
    margin-bottom: 0.75rem;
    display: block;
}

.file-upload-area p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.file-upload-area .text-primary {
    font-weight: 600;
}

/* File Preview */
.file-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    margin-top: 1rem;
    border: 1px solid var(--gray-200);
}

.file-preview i {
    font-size: 1.75rem;
    color: var(--primary);
}

.file-preview .file-info {
    flex: 1;
    min-width: 0;
}

.file-preview .file-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--gray-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview .file-size {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* ==================== Loading Spinner ==================== */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== Ticket Detail Page ==================== */
.ticket-header {
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: relative;
    overflow: hidden;
}

.ticket-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.ticket-header h2 {
    color: var(--white);
    font-size: 1.375rem;
    margin-bottom: 1rem;
    position: relative;
}

.ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.9375rem;
}

.ticket-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.9;
}

.ticket-meta-item i {
    opacity: 0.7;
}

/* ==================== Conversation ==================== */
.conversation-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.conversation-item.internal {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    margin: 0 -1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--warning);
}

.conversation-avatar {
    flex-shrink: 0;
}

.conversation-message {
    flex: 1;
    min-width: 0;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.conversation-author {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 1rem;
}

.conversation-time {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.conversation-body {
    color: var(--gray-700);
    line-height: 1.75;
}

/* ==================== Charts ==================== */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1.25rem;
    display: block;
}

.empty-state h5 {
    color: var(--gray-700);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== Avatar ==================== */
.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    color: var(--white);
    flex-shrink: 0;
    font-size: 0.9375rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ==================== Alerts ==================== */
.alert {
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    border: none;
    font-size: 0.9375rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
}

.alert-info {
    background: var(--info-light);
    color: #155e75;
}

/* ==================== Modal ==================== */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--gray-100);
    padding: 1.25rem 1.5rem;
    background: var(--gray-50);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-100);
    padding: 1rem 1.5rem;
    background: var(--gray-50);
}

.btn-close {
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.btn-close:hover {
    opacity: 0.8;
}

/* ==================== Utilities ==================== */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.hover-shadow:hover {
    box-shadow: var(--shadow-lg) !important;
}

.bg-light-subtle {
    background: var(--gray-50) !important;
}

/* ==================== Mobile Overlay ==================== */
.sidebar-overlay {
  display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    z-index: 1040;
    opacity: 0;
    transition: opacity var(--transition-slow);
    backdrop-filter: blur(4px);
}

.sidebar-overlay.show {
    opacity: 1;
}

/* ==================== Responsive Design ==================== */

/* Extra Large Screens (1400px+) */
@media (min-width: 1400px) {
    .content-wrapper {
        padding: 2rem 2.5rem;
    }
}

/* Large Screens (1200px - 1399px) */
@media (max-width: 1399.98px) {
    :root {
        --sidebar-width: 250px;
    }
}

/* Medium-Large Screens (992px - 1199px) */
@media (max-width: 1199.98px) {
    :root {
        --sidebar-width: 240px;
    }

    .content-wrapper {
        padding: 1.5rem;
    }
}

/* Tablet (below 992px) - Mobile Sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
        width: 280px;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-overlay {
        /* display: block; */
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }

    .sidebar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .content-wrapper {
        padding: 1.25rem;
    }

    .page-title {
        font-size: 1.375rem;
    }

    .stat-card .stat-value {
        font-size: 1.75rem;
    }

    .stat-card .stat-icon {
        font-size: 4rem;
    }

    .chart-container {
        height: 260px;
    }
}

/* Mobile (below 768px) */
@media (max-width: 767.98px) {
    html {
        font-size: 15px;
    }

    body {
        overflow-x: hidden;
    }

    .wrapper {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .main-content {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .content-wrapper {
        padding: 1rem;
        max-width: 100%;
        overflow-x: auto;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .page-header .btn {
        width: 100%;
        justify-content: center;
    }

    .page-title {
        font-size: 1.25rem;
    }

    /* Stat Cards */
    .stat-card .card-body {
        padding: 1.25rem;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .stat-card .stat-label {
        font-size: 0.8125rem;
    }

    .stat-card .stat-icon {
        font-size: 3.5rem;
        right: 0;
        bottom: 0;
    }

    /* Cards */
    .card-header {
        padding: 1rem 1.25rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    /* Tables */
    .table thead th,
    .table tbody td {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    /* Auth */
    .auth-card {
        padding: 2rem;
    }

    .auth-logo i {
        font-size: 2.5rem;
    }

    .auth-logo h1 {
        font-size: 1.375rem;
    }

    /* Ticket Detail */
    .ticket-header {
        padding: 1.5rem;
    }

    .ticket-header h2 {
        font-size: 1.25rem;
    }

    .ticket-meta {
        gap: 1rem;
        font-size: 0.875rem;
    }

    /* Conversation */
    .conversation-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Charts */
    .chart-container {
        height: 240px;
    }

    /* Dropdowns */
    .notification-dropdown {
        width: calc(100vw - 2rem) !important;
        max-width: 340px;
    }

    /* Hide columns on mobile */
    .table .hide-mobile {
        display: none;
    }

    /* Dashboard stat cards - 2 per row */
    .stat-card .stat-label {
        font-size: 0.75rem;
    }
}

/* Small Mobile (below 576px) */
@media (max-width: 575.98px) {
    html {
        font-size: 14px;
    }

    body,
    .wrapper,
    .main-content {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .content-wrapper {
        padding: 0.875rem;
        overflow-x: hidden;
    }

    /* Bootstrap Grid Fixes */
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .row > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Stat Cards Mobile */
    .stat-card .stat-icon {
        /* display: none; */
    }

    .stat-card .stat-value {
        font-size: 1.375rem;
    }

    .stat-card .card-body {
        padding: 1rem;
    }

    /* Cards */
    .card {
        margin-bottom: 0.75rem;
    }

    .card-header {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* DataTables */
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: left;
        width: 100%;
        padding: 0.875rem 1rem;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 0.5rem;
        display: block;
    }

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none;
        text-align: center;
        padding: 0.75rem 1rem;
    }

    /* Tables */
    .table-responsive {
        margin: 0 -1rem;
        padding: 0 1rem;
        width: calc(100% + 2rem);
    }

    /* Auth */
    .auth-card {
        padding: 1.5rem;
    }

    /* Modal */
    .modal-dialog {
        margin: 0.5rem;
    }

    /* File Upload */
    .file-upload-area {
        padding: 2rem 1.5rem;
    }

    .file-upload-area i {
        font-size: 2rem;
    }

    /* Navbar */
    .navbar {
        padding: 0 0.75rem;
    }

    .navbar .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    .sidebar,
    .navbar,
    .sidebar-toggle,
    .sidebar-overlay,
    .btn,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .content-wrapper {
        padding: 0;
    }

    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .stat-card {
        background: #f5f5f5 !important;
        color: #000 !important;
        box-shadow: none !important;
    }
}

/* ==================== Accessibility ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus Styles */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    z-index: 9999;
    font-weight: 600;
    border-radius: 0 0 var(--radius) 0;
    transition: top var(--transition);
}

.skip-link:focus {
    top: 0;
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ==================== Selection ==================== */
::selection {
    background: var(--primary);
    color: var(--white);
}
