/* Modern SaaS CRM Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #1f2937;
    --light-bg: #f9fafb;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --sidebar-width: 260px;
    
    /* Light mode (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-hover: #f8fafc;
    --bg-active: #f1f5f9;
    --text-heading: #0f172a;
    --text-body: #374151;
    --text-muted: #64748b;
    --text-faint: #94a3b8;
    --border-light: #f1f5f9;
    --border-medium: #e2e8f0;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --dropdown-bg: #ffffff;
    --dropdown-shadow: rgba(0, 0, 0, 0.12);
    --modal-overlay: rgba(0, 0, 0, 0.5);
}

/* Dark Mode - Pure Black */
[data-theme="dark"] {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #34d399;
    --danger-color: #f87171;
    --warning-color: #fbbf24;
    --light-bg: #000000;
    --border-color: #1f1f1f;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #141414;
    --bg-hover: #1a1a1a;
    --bg-active: #1f1f1f;
    --text-heading: #f8fafc;
    --text-body: #e2e8f0;
    --text-muted: #94a3b8;
    --text-faint: #64748b;
    --border-light: #1a1a1a;
    --border-medium: #262626;
    --card-bg: #0a0a0a;
    --input-bg: #141414;
    --dropdown-bg: #0a0a0a;
    --dropdown-shadow: rgba(0, 0, 0, 0.5);
    --modal-overlay: rgba(0, 0, 0, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Page - Modern Dark/Light Split Design */
body.login-page {
    background: #ffffff;
    color: #111827;
}

.login-container {
    display: flex;
    min-height: 100vh;
    background: #ffffff;
}

.login-left {
    flex: 0 0 60%;
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 50%, #1e1b4b 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 80px;
    position: relative;
    overflow: hidden;
}

/* Animated gradient overlay */
.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 10% 20%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(99, 102, 241, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(56, 189, 248, 0.12) 0%, transparent 60%);
    pointer-events: none;
    animation: loginPulseGlow 8s ease-in-out infinite;
}

@keyframes loginPulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* Subtle grid pattern */
.login-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Floating particles */
.login-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.login-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    animation: loginFloatUp 12s infinite ease-in-out;
}

.login-particles span:nth-child(1) {
    left: 10%;
    bottom: -10px;
    animation-delay: 0s;
    animation-duration: 14s;
}

.login-particles span:nth-child(2) {
    left: 30%;
    bottom: -10px;
    width: 4px;
    height: 4px;
    background: rgba(99, 102, 241, 0.5);
    animation-delay: 2s;
    animation-duration: 12s;
}

.login-particles span:nth-child(3) {
    left: 50%;
    bottom: -10px;
    width: 5px;
    height: 5px;
    background: rgba(56, 189, 248, 0.45);
    animation-delay: 4s;
    animation-duration: 16s;
}

.login-particles span:nth-child(4) {
    left: 70%;
    bottom: -10px;
    width: 4px;
    height: 4px;
    background: rgba(59, 130, 246, 0.4);
    animation-delay: 6s;
    animation-duration: 13s;
}

.login-particles span:nth-child(5) {
    left: 85%;
    bottom: -10px;
    width: 5px;
    height: 5px;
    background: rgba(99, 102, 241, 0.45);
    animation-delay: 8s;
    animation-duration: 15s;
}

@keyframes loginFloatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-500px) scale(0.5);
        opacity: 0;
    }
}

.login-brand {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 500px;
}

.login-logo {
    position: relative;
    margin-bottom: 0;
}

.login-logo img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.95;
    transition: all 0.4s ease;
}

.login-logo:hover img {
    opacity: 1;
    transform: scale(1.05);
}

/* Subtle glow effect behind logo */
.login-logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.login-tagline {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px 0;
    letter-spacing: -0.3px;
    line-height: 1.2;
    white-space: nowrap;
}

.login-subtitle {
    font-size: 17px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Animated gradient line */
.login-brand::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    margin: 0 auto 40px;
    border-radius: 2px;
    background: linear-gradient(90deg, #6366f1, #a855f7, #6366f1);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.login-highlights {
    display: flex;
    flex-direction: row;
    gap: 16px;
    width: 100%;
    max-width: 600px;
}

.login-highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    transition: all 0.3s ease;
    flex: 1;
}

.login-highlight-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
}

.login-highlight-item svg {
    width: 28px;
    height: 28px;
    color: #818cf8;
    flex-shrink: 0;
}

.login-highlight-item span {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.2px;
    line-height: 1.4;
}

.login-left-footer {
    position: absolute;
    bottom: 32px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 1;
}

.login-left-footer p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.login-right {
    flex: 0 0 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    background: #ffffff;
    position: relative;
}

/* Subtle corner accent */
.login-right::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.login-box {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-box-header {
    margin-bottom: 36px;
    text-align: left;
}

.login-box h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #111827;
    letter-spacing: -0.5px;
}

.login-box p {
    font-size: 15px;
    color: #6b7280;
    font-weight: 400;
}

.login-box .form-group {
    margin-bottom: 20px;
}

.login-box .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-box .form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    transition: all 0.2s ease;
}

.login-box .form-control:focus {
    outline: none;
    border-color: #0a0a0a;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(10, 10, 10, 0.05);
}

.login-box .form-control::placeholder {
    color: #9ca3af;
}

.login-box .btn-primary {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    background: #0a0a0a;
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
    position: relative;
    overflow: hidden;
}

.login-box .btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-box .btn-primary:hover {
    background: #171717;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.login-box .btn-primary:hover::before {
    opacity: 1;
}

.login-box .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.login-box .alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.login-box .alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.login-box .alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Hide close button on desktop */
.sidebar-close {
    display: none;
}

/* Sidebar Footer - Bottom positioned */
.sidebar-footer {
    margin-top: auto;
    padding: 12px 12px 16px;
    border-top: 1px solid var(--border-light, #f1f5f9);
    background: var(--bg-primary, #ffffff);
}

.sidebar-footer .theme-toggle {
    margin: 0 0 4px 0;
    padding: 10px 12px;
    width: 100%;
    border-radius: 8px;
}

.sidebar-footer .sidebar-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-footer .sidebar-logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

.sidebar-footer .sidebar-logout .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer .sidebar-logout .nav-icon svg {
    width: 20px;
    height: 20px;
}

[data-theme="dark"] .sidebar-footer {
    border-top-color: var(--border-medium, #262626);
    background: var(--bg-primary, #000000);
}

[data-theme="dark"] .sidebar-footer .sidebar-logout:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #f87171;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-header .sidebar-user {
    margin-top: 16px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.sidebar-logo-icon {
    width: 36px;
    height: 36px;
    background: #4f46e5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.sidebar-logo-text h2 {
    font-size: 17px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.sidebar-logo-img {
    max-height: 36px;
    max-width: 160px;
    object-fit: contain;
    transition: filter 0.3s ease;
}

/* Make logo white in dark mode */
[data-theme="dark"] .sidebar-logo-img {
    filter: brightness(0) invert(1);
}

.sidebar-logo-text span {
    display: none;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 12px 0;
    flex: 1;
}

.nav-section {
    margin-bottom: 4px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    padding: 16px 20px 8px;
}

.nav-section-title::after {
    display: none;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 9px 20px;
    margin: 1px 8px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.sidebar-nav a:hover {
    background: #f8fafc;
    color: #0f172a;
}

.sidebar-nav a.active {
    background: #f1f5f9;
    color: #0f172a;
}

.sidebar-nav a .nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav a .nav-icon svg {
    width: 18px;
    height: 18px;
    color: currentColor;
}

/* Hide unused elements */
.workspace-selector,
.workspace-icon,
.workspace-info,
.workspace-name,
.workspace-plan,
.workspace-chevron,
.pro-badge,
.quick-actions,
.sidebar-help,
.sidebar-user-menu,
.status-dot {
    display: none;
}

/* Sidebar Navigation Badges */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #ef4444;
    border-radius: 10px;
    line-height: 1;
}

/* Sidebar Footer - removed, user now in header */

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.sidebar-user:hover {
    background: #f8fafc;
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4f46e5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 12px;
    color: #94a3b8;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
}

.topbar {
    background: #ffffff;
    padding: 16px 32px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.mobile-menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

.mobile-menu-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.sidebar-overlay {
    display: none;
}

.topbar-left h1 {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #94a3b8;
}

.topbar-breadcrumb a {
    color: #64748b;
    text-decoration: none;
}

.topbar-breadcrumb a:hover {
    color: #0f172a;
}

.topbar-breadcrumb span {
    color: #cbd5e1;
}

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

.topbar-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.topbar-icon-btn svg {
    width: 20px;
    height: 20px;
}

.topbar-icon-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.topbar-divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 8px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.user-info:hover {
    background: #f8fafc;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4f46e5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-details-name {
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    line-height: 1.2;
}

.user-details-role {
    font-size: 11px;
    color: #94a3b8;
}

/* User Dropdown */
.user-dropdown-wrapper {
    position: relative;
}

button.user-info {
    border: none;
    background: none;
    font-family: inherit;
}

.user-dropdown-chevron {
    width: 16px;
    height: 16px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.user-dropdown-wrapper.active .user-dropdown-chevron {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.user-dropdown-wrapper.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.user-dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4f46e5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    flex-shrink: 0;
}

.user-dropdown-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

.user-dropdown-email {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 4px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.user-dropdown-item:hover {
    background: #f8fafc;
    color: #0f172a;
}

.user-dropdown-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.user-dropdown-item-danger {
    color: #ef4444;
}

.user-dropdown-item-danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.user-dropdown-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.user-dropdown-overlay.active {
    display: block;
}

.content {
    padding: 32px;
}

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

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.card {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

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

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control.error {
    border-color: var(--danger-color);
}

.form-error {
    color: var(--danger-color);
    font-size: 13px;
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-success-alt {
    background: #10b981;
    color: white;
}

.btn-success-alt:hover {
    background: #059669;
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
}

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

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-block {
    width: 100%;
    display: block;
}

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

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

table thead {
    background: var(--light-bg);
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
}

table tbody tr:hover {
    background: var(--light-bg);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-secondary {
    background: #f1f5f9;
    color: #64748b;
}

/* Online status pulse animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.online-indicator {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.offline-indicator {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    display: inline-block;
}

/* Online Users Card */
.online-users-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.online-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.online-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #4f46e5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    position: relative;
}

.online-user-avatar .online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid white;
}

.online-user-info {
    flex: 1;
    min-width: 0;
}

.online-user-name {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
}

.online-user-meta {
    font-size: 12px;
    color: #94a3b8;
}

/* Notification Bell Badge */
.notification-bell {
    position: relative;
    text-decoration: none;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    line-height: 1;
}

/* Notification Dropdown */
.notification-dropdown-wrapper {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.notification-dropdown-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.notification-dropdown-count {
    font-size: 12px;
    font-weight: 500;
    color: #4f46e5;
    background: #eef2ff;
    padding: 4px 10px;
    border-radius: 12px;
}

.notification-dropdown-body {
    max-height: 320px;
    overflow-y: auto;
}

.notification-dropdown-empty {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
}

.notification-dropdown-empty svg {
    display: block;
    margin: 0 auto 8px;
}

.notification-dropdown-empty p {
    margin: 0;
    font-size: 14px;
}

.notification-dropdown-loading {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
}

.notification-dropdown-loading p {
    margin: 12px 0 0;
    font-size: 13px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

.notification-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.15s ease;
    position: relative;
}

.notification-dropdown-item:hover {
    background: #f8fafc;
}

.notification-dropdown-item.unread {
    background: #f0f9ff;
}

.notification-dropdown-item.unread:hover {
    background: #e0f2fe;
}

.notification-dropdown-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Notification Icons */
.notif-icon {
    width: 20px;
    height: 20px;
}

.notif-icon-info {
    color: #3b82f6;
}

.notif-icon-success {
    color: #10b981;
}

.notif-icon-warning {
    color: #f59e0b;
}

.notif-icon-error {
    color: #ef4444;
}

/* Small icons inside badges */
.badge .notif-icon {
    width: 14px;
    height: 14px;
}

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

.notification-dropdown-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-dropdown-text {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 4px;
}

.notification-dropdown-time {
    font-size: 11px;
    color: #94a3b8;
}

.notification-dropdown-dot {
    width: 8px;
    height: 8px;
    background: #4f46e5;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.notification-dropdown-footer {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

.notification-dropdown-footer a {
    font-size: 13px;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.notification-dropdown-footer a:hover {
    color: #4338ca;
    text-decoration: underline;
}

/* Notification Overlay */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
}

.notification-overlay.active {
    display: block;
}

/* Notification List */
.notification-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

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

.notification-item.unread {
    background: #f0f9ff;
    border-left: 3px solid #3b82f6;
}

.notification-item.read {
    opacity: 0.8;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon .notif-icon {
    width: 22px;
    height: 22px;
}

.notification-icon.notification-info {
    background: #dbeafe;
}

.notification-icon.notification-success {
    background: #dcfce7;
}

.notification-icon.notification-warning {
    background: #fef3c7;
}

.notification-icon.notification-danger {
    background: #fee2e2;
}

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

.notification-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.notification-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.notification-message {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.notification-meta {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-actions {
    flex-shrink: 0;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.welcome-content h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.welcome-content p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.welcome-date {
    font-size: 14px;
    opacity: 0.8;
    text-align: right;
}

/* Enhanced Stat Cards */
.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card-highlight {
    border: 2px solid #ef4444;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: #ef4444; }
    50% { border-color: #fca5a5; }
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-details {
    flex: 1;
    min-width: 0;
}

.stat-details h3 {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    margin: 0 0 4px 0;
}

.stat-details .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #94a3b8;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

/* Quick List */
.quick-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.quick-list-icon {
    font-size: 20px;
    width: 32px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-list-icon-notif {
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 8px;
}

.quick-list-icon-notif .notif-icon {
    width: 18px;
    height: 18px;
}

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

.quick-list-content strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-list-link {
    display: block;
    font-size: 14px;
    color: #0f172a;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-list-link:hover {
    color: #4f46e5;
}

.quick-list-meta {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Empty State Small */
.empty-state-small {
    text-align: center;
    padding: 24px;
    color: #64748b;
}

.empty-state-small p {
    margin: 0;
}

/* File Grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    transition: all 0.15s ease;
}

.file-card:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.file-card-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
}

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

.file-card-name {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-card-meta {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Quick Actions */
.quick-actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.quick-actions h3 {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    color: #475569;
    transition: all 0.15s ease;
}

.quick-action-btn:hover {
    background: #f1f5f9;
    color: #4f46e5;
    transform: translateY(-2px);
}

.quick-action-icon {
    font-size: 24px;
}

.quick-action-btn span:last-child {
    font-size: 13px;
    font-weight: 500;
}

/* Extra Small Button */
.btn-xs {
    padding: 4px 8px;
    font-size: 12px;
}

/* Badge Types */
.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-primary {
    background: #4f46e5;
    color: white;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* File List */
.file-list {
    list-style: none;
}

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

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

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.file-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.file-actions {
    display: flex;
    gap: 8px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.upload-area input[type="file"] {
    display: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
}

.modal-header {
    margin-bottom: 20px;
    position: relative;
    padding-right: 40px;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.modal-footer {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 16px;
}

.mb-3 {
    margin-bottom: 16px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Filter Form */
.filter-form .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filter-form .filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-form .filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 6px;
}

.filter-form .filter-buttons {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

/* Activity Badges */
.activity-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.activity-login {
    background: #dcfce7;
    color: #166534;
}

.activity-logout {
    background: #e0e7ff;
    color: #3730a3;
}

.activity-login_failed {
    background: #fee2e2;
    color: #991b1b;
}

.activity-file_view {
    background: #dbeafe;
    color: #1e40af;
}

.activity-file_download {
    background: #fef3c7;
    color: #92400e;
}

.activity-page_view {
    background: #f3f4f6;
    color: #374151;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

/* Recent Activity List */
.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: #f1f5f9;
    flex-shrink: 0;
}

.activity-icon.login {
    background: #dcfce7;
}

.activity-icon.logout {
    background: #e0e7ff;
}

.activity-icon.download {
    background: #fef3c7;
}

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

.activity-text {
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 2px;
}

.activity-text strong {
    font-weight: 600;
}

.activity-time {
    font-size: 12px;
    color: #94a3b8;
}

/* Ticket Styles */
.ticket-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
}

.ticket-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ticket-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ticket-description {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
    white-space: pre-wrap;
}

/* Priority Badges */
.priority-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-low {
    background: #f1f5f9;
    color: #64748b;
}

.priority-medium {
    background: #dbeafe;
    color: #1e40af;
}

.priority-high {
    background: #fef3c7;
    color: #92400e;
}

.priority-urgent {
    background: #fee2e2;
    color: #991b1b;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-open {
    background: #fef3c7;
    color: #92400e;
}

.status-in_progress {
    background: #dbeafe;
    color: #1e40af;
}

.status-waiting {
    background: #f3e8ff;
    color: #7c3aed;
}

.status-resolved {
    background: #dcfce7;
    color: #166534;
}

.status-closed {
    background: #f1f5f9;
    color: #64748b;
}

/* Ticket List (Client) */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.ticket-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

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

.ticket-item-subject {
    font-size: 15px;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-item-meta {
    font-size: 13px;
    color: #64748b;
}

.ticket-item-status {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 16px;
}

/* Ticket Replies */
.ticket-replies {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.ticket-reply {
    padding: 16px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.ticket-reply.admin-reply {
    background: #f0f9ff;
    border-color: #bae6fd;
}

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

.reply-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.reply-name {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
}

.reply-role {
    font-size: 12px;
    color: #64748b;
}

.reply-time {
    font-size: 12px;
    color: #94a3b8;
}

.reply-content {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    white-space: pre-wrap;
}

.reply-form {
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

/* Responsive Ticket Layout */
@media (max-width: 1024px) {
    .ticket-layout {
        grid-template-columns: 1fr;
    }
    
    .ticket-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .ticket-sidebar .card {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .ticket-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .ticket-item-status {
        margin-left: 0;
    }
    
    .reply-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

.login-demo-credentials {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.demo-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.demo-item {
    font-size: 14px;
    color: var(--text-secondary);
    font-family: 'Inter', monospace;
    line-height: 1.8;
}

.demo-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 8px;
}

.demo-value {
    color: var(--text-secondary);
}

/* Enhanced Form Controls */
.form-control::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Responsive */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }
    
    .login-left {
        flex: 0 0 50%;
    }
    
    .login-right {
        flex: 0 0 50%;
    }
    
    .login-brand h1 {
        font-size: 40px;
    }
    
    .login-brand p {
        font-size: 18px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content {
        padding: 24px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
    }
    
    /* Login Page Mobile */
    .login-container {
        flex-direction: column;
    }
    
    .login-left {
        flex: 0 0 auto;
        min-height: auto;
        padding: 48px 24px 40px;
    }
    
    .login-left::before {
        opacity: 0.6;
    }
    
    .login-left::after {
        display: none;
    }
    
    .login-logo {
        margin-bottom: 24px;
    }
    
    .login-logo img {
        width: 100px;
        height: 100px;
    }
    
    .login-logo::before {
        width: 150px;
        height: 150px;
    }
    
    .login-tagline {
        font-size: 16px;
        margin-bottom: 8px;
        white-space: nowrap;
    }
    
    .login-brand::after {
        width: 60px;
        height: 2px;
        margin-bottom: 24px;
    }
    
    .login-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }
    
    .login-highlights {
        flex-direction: row;
        gap: 8px;
    }
    
    .login-highlight-item {
        padding: 12px 8px;
        border-radius: 10px;
        gap: 8px;
    }
    
    .login-highlight-item:hover {
        transform: none;
    }
    
    .login-highlight-item svg {
        width: 20px;
        height: 20px;
    }
    
    .login-highlight-item span {
        font-size: 11px;
    }
    
    .login-left-footer {
        display: none;
    }
    
    .login-right {
        flex: 1;
        padding: 40px 24px 48px;
    }
    
    .login-right::before {
        display: none;
    }
    
    .login-box {
        max-width: 100%;
    }
    
    .login-box h2 {
        font-size: 26px;
    }
    
    .login-box-header {
        margin-bottom: 28px;
        text-align: center;
    }
    
    .login-box .form-control {
        padding: 14px 16px;
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    .login-box .btn-primary {
        padding: 14px 20px;
    }
    
    /* Dashboard Mobile */
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 280px;
        max-width: 85vw;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }
    
    /* Close button for mobile sidebar */
    .sidebar-close {
        display: flex;
        position: absolute;
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        border: none;
        background: var(--bg-tertiary, #f1f5f9);
        color: var(--text-muted, #64748b);
        cursor: pointer;
        align-items: center;
        justify-content: center;
        z-index: 10;
        transition: all 0.2s ease;
    }
    
    .sidebar-close:hover {
        background: var(--bg-active, #e2e8f0);
        color: var(--text-primary, #0f172a);
    }
    
    .sidebar-close svg {
        width: 18px;
        height: 18px;
    }
    
    .sidebar-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0);
        z-index: 1000;
        pointer-events: none;
        transition: background 0.3s ease;
        -webkit-backdrop-filter: blur(0);
        backdrop-filter: blur(0);
    }
    
    .sidebar-overlay.open {
        background: rgba(0, 0, 0, 0.5);
        pointer-events: auto;
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .topbar {
        padding: 12px 16px;
    }
    
    .topbar-left {
        gap: 12px;
    }
    
    .topbar-left h1 {
        font-size: 16px;
    }
    
    .mobile-menu-btn {
        display: flex;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        border: 1px solid var(--border-medium, #e2e8f0);
        background: var(--card-bg, #ffffff);
        color: var(--text-muted, #64748b);
        cursor: pointer;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }
    
    .mobile-menu-btn svg {
        width: 22px;
        height: 22px;
    }
    
    .mobile-menu-btn:hover {
        background: var(--bg-hover, #f8fafc);
        color: var(--text-primary, #0f172a);
        border-color: var(--border-color, #d1d5db);
    }
    
    .topbar-right {
        gap: 4px;
    }
    
    .topbar-icon-btn {
        width: 32px;
        height: 32px;
    }
    
    .topbar-icon-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .topbar-divider {
        display: none;
    }
    
    .user-info {
        padding: 4px;
    }
    
    .user-details {
        display: none;
    }

    .content {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card .stat-value {
        font-size: 24px;
    }
    
    /* Cards Mobile */
    .card {
        border-radius: 8px;
    }
    
    .card-header {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .card-header h2 {
        font-size: 16px;
    }
    
    .card-body {
        padding: 16px;
    }
    
    /* Tables Mobile */
    .table-responsive {
        margin: -16px;
        padding: 0 16px;
    }
    
    table th,
    table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    table th:nth-child(4),
    table td:nth-child(4) {
        display: none;
    }
    
    /* Buttons Mobile */
    .btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .btn-sm {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    /* File List Mobile */
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
    }
    
    .file-actions {
        width: 100%;
    }
    
    .file-actions .btn {
        flex: 1;
        text-align: center;
    }
    
    /* Modal Mobile */
    .modal-content {
        width: 95%;
        max-width: 95%;
        padding: 20px;
        margin: 16px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* Forms Mobile */
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Alerts Mobile */
    .alert {
        padding: 12px;
        font-size: 13px;
    }
    
    /* Empty State Mobile */
    .empty-state {
        padding: 40px 20px;
    }
    
    .empty-state-icon {
        font-size: 36px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .login-left {
        padding: 32px 20px;
    }
    
    .login-brand h1 {
        font-size: 24px;
    }
    
    .login-features {
        display: none;
    }
    
    .login-right {
        padding: 24px 20px;
    }
    
    .login-box h2 {
        font-size: 22px;
    }
    
    .content {
        padding: 12px;
    }
    
    .topbar {
        padding: 10px 12px;
    }
    
    .card-header,
    .card-body {
        padding: 12px;
    }
    
    table th:nth-child(3),
    table td:nth-child(3) {
        display: none;
    }
    
    .stats-grid {
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-card h3 {
        font-size: 12px;
    }
    
    .stat-card .stat-value {
        font-size: 20px;
    }
}

/* ========================================
   DARK MODE STYLES
   ======================================== */

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 20px;
    margin: 1px 8px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    width: calc(100% - 16px);
}

.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-heading);
}

.theme-toggle .theme-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.theme-toggle .theme-icon-dark {
    display: block;
}

.theme-toggle .theme-icon-light {
    display: none;
}

[data-theme="dark"] .theme-toggle .theme-icon-dark {
    display: none;
}

[data-theme="dark"] .theme-toggle .theme-icon-light {
    display: block;
}

.theme-toggle-text {
    flex: 1;
    text-align: left;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .toggle-switch {
    background: var(--primary-color);
}

[data-theme="dark"] .toggle-switch::after {
    transform: translateX(20px);
}

/* Login Page Theme Toggle */
.login-theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    z-index: 10;
}

.login-theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-heading);
    border-color: var(--border-medium);
}

.login-theme-toggle .theme-icon {
    width: 20px;
    height: 20px;
}

.login-theme-toggle .theme-icon-dark {
    display: block;
}

.login-theme-toggle .theme-icon-light {
    display: none;
}

[data-theme="dark"] .login-theme-toggle .theme-icon-dark {
    display: none;
}

[data-theme="dark"] .login-theme-toggle .theme-icon-light {
    display: block;
}

.login-right {
    position: relative;
}

/* Dark Mode - Body & Dashboard */
[data-theme="dark"] body {
    background-color: var(--bg-primary);
    color: var(--text-body);
}

[data-theme="dark"] .dashboard {
    background: var(--bg-primary);
}

/* Dark Mode - Login Page */
[data-theme="dark"] .login-container {
    background: var(--bg-primary);
}

[data-theme="dark"] .login-right {
    background: var(--bg-primary);
}

[data-theme="dark"] .login-box h2 {
    color: var(--text-heading);
}

[data-theme="dark"] .login-box p {
    color: var(--text-muted);
}

/* Dark Mode - Sidebar */
[data-theme="dark"] .sidebar {
    background: var(--bg-primary);
    border-right-color: var(--border-medium);
}

[data-theme="dark"] .sidebar-header {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .sidebar-header .sidebar-user {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .sidebar-logo-text h2 {
    color: var(--text-heading);
}

[data-theme="dark"] .sidebar-user-name {
    color: var(--text-heading);
}

[data-theme="dark"] .sidebar-user-role {
    color: var(--text-faint);
}

[data-theme="dark"] .nav-section-title {
    color: var(--text-faint);
}

[data-theme="dark"] .sidebar-nav a {
    color: var(--text-muted);
}

[data-theme="dark"] .sidebar-nav a:hover {
    background: var(--bg-hover);
    color: var(--text-heading);
}

[data-theme="dark"] .sidebar-nav a.active {
    background: var(--bg-active);
    color: var(--text-heading);
}

[data-theme="dark"] .sidebar-user:hover {
    background: var(--bg-hover);
}

/* Dark Mode - Topbar */
[data-theme="dark"] .topbar {
    background: var(--bg-primary);
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .topbar-left h1 {
    color: var(--text-heading);
}

[data-theme="dark"] .topbar-icon-btn {
    color: var(--text-muted);
}

[data-theme="dark"] .topbar-icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-heading);
}

[data-theme="dark"] .topbar-divider {
    background: var(--border-medium);
}

[data-theme="dark"] .mobile-menu-btn {
    color: var(--text-muted);
}

[data-theme="dark"] .mobile-menu-btn:hover {
    background: var(--bg-hover);
    color: var(--text-heading);
}

/* Dark Mode - User Dropdown */
[data-theme="dark"] .user-info:hover {
    background: var(--bg-hover);
}

[data-theme="dark"] .user-details-name {
    color: var(--text-heading);
}

[data-theme="dark"] .user-details-role {
    color: var(--text-faint);
}

[data-theme="dark"] .user-dropdown-chevron {
    color: var(--text-faint);
}

[data-theme="dark"] .user-dropdown {
    background: var(--dropdown-bg);
    box-shadow: 0 10px 40px var(--dropdown-shadow), 0 0 0 1px var(--border-medium);
}

[data-theme="dark"] .user-dropdown-header {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .user-dropdown-name {
    color: var(--text-heading);
}

[data-theme="dark"] .user-dropdown-email {
    color: var(--text-muted);
}

[data-theme="dark"] .user-dropdown-divider {
    background: var(--border-light);
}

[data-theme="dark"] .user-dropdown-item {
    color: var(--text-muted);
}

[data-theme="dark"] .user-dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-heading);
}

[data-theme="dark"] .user-dropdown-item-danger {
    color: var(--danger-color);
}

[data-theme="dark"] .user-dropdown-item-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Dark Mode - Cards */
[data-theme="dark"] .card {
    background: var(--card-bg);
    border-color: var(--border-medium);
}

[data-theme="dark"] .card-header {
    border-bottom-color: var(--border-medium);
}

[data-theme="dark"] .card-header h2 {
    color: var(--text-heading);
}

[data-theme="dark"] .stat-card {
    background: var(--card-bg);
    border-color: var(--border-medium);
}

[data-theme="dark"] .stat-card h3 {
    color: var(--text-muted);
}

[data-theme="dark"] .stat-card .stat-value {
    color: var(--text-heading);
}

/* Dark Mode - Forms */
[data-theme="dark"] .form-group label {
    color: var(--text-heading);
}

[data-theme="dark"] .form-control {
    background: var(--input-bg);
    border-color: var(--border-medium);
    color: var(--text-body);
}

[data-theme="dark"] .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--text-faint);
}

[data-theme="dark"] select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

/* Dark Mode - Tables */
[data-theme="dark"] table thead {
    background: var(--bg-tertiary);
}

[data-theme="dark"] table th {
    color: var(--text-muted);
}

[data-theme="dark"] table th,
[data-theme="dark"] table td {
    border-bottom-color: var(--border-medium);
    color: var(--text-body);
}

[data-theme="dark"] table tbody tr:hover {
    background: var(--bg-hover);
}

/* Dark Mode - Buttons */
[data-theme="dark"] .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-body);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--bg-active);
}

/* Dark Mode - Modals */
[data-theme="dark"] .modal {
    background: var(--modal-overlay);
}

[data-theme="dark"] .modal-content {
    background: var(--card-bg);
    color: var(--text-body);
}

[data-theme="dark"] .modal-header h2 {
    color: var(--text-heading);
}

[data-theme="dark"] .modal-close {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

[data-theme="dark"] .modal-close:hover {
    background: var(--bg-active);
    color: var(--text-heading);
}

/* Dark Mode - Notifications Dropdown */
[data-theme="dark"] .notification-dropdown {
    background: var(--dropdown-bg);
    box-shadow: 0 10px 40px var(--dropdown-shadow), 0 0 0 1px var(--border-medium);
}

[data-theme="dark"] .notification-dropdown-header {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .notification-dropdown-header h3 {
    color: var(--text-heading);
}

[data-theme="dark"] .notification-dropdown-item {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .notification-dropdown-item:hover {
    background: var(--bg-hover);
}

[data-theme="dark"] .notification-dropdown-item.unread {
    background: rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .notification-dropdown-item.unread:hover {
    background: rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .notification-dropdown-icon {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .notification-dropdown-title {
    color: var(--text-heading);
}

[data-theme="dark"] .notification-dropdown-text {
    color: var(--text-muted);
}

[data-theme="dark"] .notification-dropdown-time {
    color: var(--text-faint);
}

[data-theme="dark"] .notification-dropdown-footer {
    background: var(--bg-tertiary);
    border-top-color: var(--border-light);
}

[data-theme="dark"] .notification-dropdown-footer a {
    color: var(--primary-light);
}

[data-theme="dark"] .notification-dropdown-loading p {
    color: var(--text-muted);
}

/* Dark Mode - Notification List (Full Page) */
[data-theme="dark"] .notification-item {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .notification-item:hover {
    background: var(--bg-hover);
}

[data-theme="dark"] .notification-item.unread {
    background: rgba(99, 102, 241, 0.1);
    border-left-color: var(--primary-color);
}

[data-theme="dark"] .notification-title {
    color: var(--text-heading);
}

[data-theme="dark"] .notification-message {
    color: var(--text-muted);
}

[data-theme="dark"] .notification-meta {
    color: var(--text-faint);
}

/* Dark Mode - Tickets */
[data-theme="dark"] .ticket-item {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

[data-theme="dark"] .ticket-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
}

[data-theme="dark"] .ticket-item-subject {
    color: var(--text-heading);
}

[data-theme="dark"] .ticket-item-meta {
    color: var(--text-muted);
}

[data-theme="dark"] .ticket-reply {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

[data-theme="dark"] .ticket-reply.admin-reply {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
}

[data-theme="dark"] .reply-author {
    color: var(--text-heading);
}

[data-theme="dark"] .reply-time {
    color: var(--text-faint);
}

[data-theme="dark"] .reply-content {
    color: var(--text-body);
}

[data-theme="dark"] .ticket-description {
    color: var(--text-body);
}

/* Dark Mode - Files */
[data-theme="dark"] .file-card {
    background: var(--card-bg);
    border-color: var(--border-medium);
}

[data-theme="dark"] .file-card:hover {
    border-color: var(--primary-color);
}

[data-theme="dark"] .file-icon {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .file-card-title {
    color: var(--text-heading);
}

[data-theme="dark"] .file-card-meta {
    color: var(--text-muted);
}

/* Dark Mode - Activity */
[data-theme="dark"] .activity-item {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .activity-icon {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .activity-text {
    color: var(--text-body);
}

[data-theme="dark"] .activity-time {
    color: var(--text-faint);
}

/* Dark Mode - Badges (keep readable in dark mode) */
[data-theme="dark"] .badge-secondary {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

[data-theme="dark"] .priority-low {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

[data-theme="dark"] .status-closed {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* Dark Mode - Empty State */
[data-theme="dark"] .empty-state {
    color: var(--text-muted);
}

/* Dark Mode - Pagination */
[data-theme="dark"] .pagination {
    border-top-color: var(--border-medium);
}

[data-theme="dark"] .pagination a,
[data-theme="dark"] .pagination span {
    color: var(--text-muted);
}

[data-theme="dark"] .pagination a:hover {
    color: var(--text-heading);
}

/* Dark Mode - Filter Form */
[data-theme="dark"] .filter-form .filter-group label {
    color: var(--text-muted);
}

/* Dark Mode - Online Users */
[data-theme="dark"] .online-user-item {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .online-user-name {
    color: var(--text-heading);
}

[data-theme="dark"] .online-user-role {
    color: var(--text-muted);
}

/* Dark Mode - Welcome Banner stays colorful */

/* Dark Mode - Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-faint);
}

/* Dark Mode - Selection */
[data-theme="dark"] ::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-heading);
}

/* Dark Mode - Alerts */
[data-theme="dark"] .alert {
    border-color: var(--border-medium);
}

[data-theme="dark"] .alert-success {
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.3);
    color: #34d399;
}

[data-theme="dark"] .alert-error {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
    color: #f87171;
}

[data-theme="dark"] .alert-info {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.3);
    color: #60a5fa;
}

/* Dark Mode - Login Demo Credentials */
[data-theme="dark"] .login-demo-credentials {
    border-top-color: var(--border-medium);
}

[data-theme="dark"] .demo-title {
    color: var(--text-faint);
}

[data-theme="dark"] .demo-label {
    color: var(--text-heading);
}

[data-theme="dark"] .demo-value {
    color: var(--text-muted);
}

/* ========================================
   DARK MODE - PAGE SPECIFIC OVERRIDES
   ======================================== */

/* Dark Mode - Clients Page */
[data-theme="dark"] .clients-header h1,
[data-theme="dark"] .clients-stat-value {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .clients-stat-label {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .search-box input,
[data-theme="dark"] .filter-select {
    background: var(--input-bg) !important;
    border-color: var(--border-medium) !important;
    color: var(--text-body) !important;
}

[data-theme="dark"] .search-box input:focus,
[data-theme="dark"] .filter-select:focus {
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .search-box input::placeholder {
    color: var(--text-faint) !important;
}

[data-theme="dark"] .client-info h4,
[data-theme="dark"] .client-name {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .client-info p,
[data-theme="dark"] .client-email {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .status-indicator.offline {
    background: var(--bg-tertiary) !important;
    color: var(--text-muted) !important;
}

[data-theme="dark"] .pagination-info {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .pagination a {
    background: var(--bg-secondary) !important;
    border-color: var(--border-medium) !important;
    color: var(--text-muted) !important;
}

[data-theme="dark"] .pagination a:hover {
    background: var(--bg-tertiary) !important;
    color: var(--text-heading) !important;
}

[data-theme="dark"] .pagination a.active {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

[data-theme="dark"] .pagination span.disabled {
    background: var(--bg-secondary) !important;
    border-color: var(--border-medium) !important;
    color: var(--text-faint) !important;
}

[data-theme="dark"] .pagination-wrapper {
    border-top-color: var(--border-medium) !important;
}

[data-theme="dark"] .empty-search {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .empty-search svg {
    color: var(--text-faint) !important;
}

/* Dark Mode - Client View / Profile Page */
[data-theme="dark"] .profile-tabs {
    background: var(--bg-tertiary) !important;
}

[data-theme="dark"] .profile-tab {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .profile-tab:hover {
    color: var(--text-heading) !important;
    background: var(--bg-hover) !important;
}

[data-theme="dark"] .profile-tab.active {
    background: var(--card-bg) !important;
    color: var(--text-heading) !important;
}

[data-theme="dark"] .profile-tab .tab-badge {
    background: var(--bg-active) !important;
    color: var(--text-muted) !important;
}

[data-theme="dark"] .profile-tab.active .tab-badge {
    background: var(--primary-color) !important;
    color: white !important;
}

[data-theme="dark"] .stat-box {
    background: var(--card-bg) !important;
    border-color: var(--border-medium) !important;
}

[data-theme="dark"] .stat-box-value {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .stat-box-label {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .kanban-column {
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] .kanban-column-header {
    border-bottom-color: var(--border-medium) !important;
}

[data-theme="dark"] .kanban-column-title {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .kanban-count {
    background: var(--bg-tertiary) !important;
    color: var(--text-muted) !important;
}

[data-theme="dark"] .file-item,
[data-theme="dark"] .kanban-card {
    background: var(--card-bg) !important;
    border-color: var(--border-medium) !important;
}

[data-theme="dark"] .file-item:hover,
[data-theme="dark"] .kanban-card:hover {
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .file-name,
[data-theme="dark"] .kanban-card-title {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .file-meta,
[data-theme="dark"] .file-size,
[data-theme="dark"] .file-date {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .empty-column {
    color: var(--text-faint) !important;
}

/* Dark Mode - Activity Logs Page */
[data-theme="dark"] .activity-page-view {
    background: var(--bg-tertiary) !important;
    color: var(--text-muted) !important;
}

/* Dark Mode - Settings Page */
[data-theme="dark"] .settings-section {
    background: var(--card-bg) !important;
    border-color: var(--border-medium) !important;
}

[data-theme="dark"] .settings-section-title {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .settings-section-description {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .settings-label {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .settings-hint {
    color: var(--text-faint) !important;
}

[data-theme="dark"] .logo-preview {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-medium) !important;
}

[data-theme="dark"] .current-logo-label {
    color: var(--text-muted) !important;
}

/* Dark Mode - Notifications Page */
[data-theme="dark"] .notification-card {
    background: var(--card-bg) !important;
    border-color: var(--border-medium) !important;
}

[data-theme="dark"] .notification-card:hover {
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .notification-card-title {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .notification-card-message {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .notification-card-meta {
    color: var(--text-faint) !important;
}

/* Dark Mode - Ticket Pages */
[data-theme="dark"] .ticket-header {
    border-bottom-color: var(--border-medium) !important;
}

[data-theme="dark"] .ticket-title {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .ticket-meta {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .ticket-info-row {
    border-bottom-color: var(--border-light) !important;
}

[data-theme="dark"] .ticket-info-label {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .ticket-info-value {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .reply-header {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .reply-author {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .reply-body {
    color: var(--text-body) !important;
}

/* Dark Mode - Client Dashboard */
[data-theme="dark"] .welcome-card {
    color: white !important;
}

[data-theme="dark"] .quick-action-card {
    background: var(--card-bg) !important;
    border-color: var(--border-medium) !important;
}

[data-theme="dark"] .quick-action-card:hover {
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .quick-action-title {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .quick-action-description {
    color: var(--text-muted) !important;
}

/* Dark Mode - Client Files Page */
[data-theme="dark"] .files-header h1 {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .files-count {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .file-grid-item {
    background: var(--card-bg) !important;
    border-color: var(--border-medium) !important;
}

[data-theme="dark"] .file-grid-item:hover {
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .file-icon-wrapper {
    background: var(--bg-tertiary) !important;
}

[data-theme="dark"] .file-title {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .file-info {
    color: var(--text-muted) !important;
}

/* Dark Mode - Client Tickets Page */
[data-theme="dark"] .tickets-header h1 {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .ticket-card {
    background: var(--card-bg) !important;
    border-color: var(--border-medium) !important;
}

[data-theme="dark"] .ticket-card:hover {
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .ticket-card-subject {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .ticket-card-preview {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .ticket-card-meta {
    color: var(--text-faint) !important;
}

/* Dark Mode - Modals (from inline styles) */
[data-theme="dark"] .modal-backdrop {
    background: var(--modal-overlay) !important;
}

[data-theme="dark"] .modal-dialog,
[data-theme="dark"] .modal-box {
    background: var(--card-bg) !important;
}

[data-theme="dark"] .modal-title {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .modal-body {
    color: var(--text-body) !important;
}

/* Dark Mode - General Overrides for inline styles */
[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4 {
    color: var(--text-heading);
}

[data-theme="dark"] p {
    color: var(--text-body);
}

[data-theme="dark"] a {
    color: var(--primary-light);
}

[data-theme="dark"] a:hover {
    color: var(--primary-color);
}

/* Dark Mode - Textarea */
[data-theme="dark"] textarea {
    background: var(--input-bg) !important;
    border-color: var(--border-medium) !important;
    color: var(--text-body) !important;
}

[data-theme="dark"] textarea:focus {
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] textarea::placeholder {
    color: var(--text-faint) !important;
}

/* Dark Mode - Select dropdowns */
[data-theme="dark"] select {
    background-color: var(--input-bg) !important;
    border-color: var(--border-medium) !important;
    color: var(--text-body) !important;
}

[data-theme="dark"] select:focus {
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] select option {
    background: var(--dropdown-bg);
    color: var(--text-body);
}

/* Dark Mode - Links in cards */
[data-theme="dark"] .card a:not(.btn) {
    color: var(--primary-light);
}

[data-theme="dark"] .card a:not(.btn):hover {
    color: var(--primary-color);
}

/* Dark Mode - Code/Pre elements */
[data-theme="dark"] code,
[data-theme="dark"] pre {
    background: var(--bg-tertiary) !important;
    color: var(--text-body) !important;
}

/* Dark Mode - HR elements */
[data-theme="dark"] hr {
    border-color: var(--border-medium) !important;
}

/* Dark Mode - Border overrides for inline styles */
[data-theme="dark"] [style*="border-color: #e2e8f0"],
[data-theme="dark"] [style*="border: 1px solid #e2e8f0"],
[data-theme="dark"] [style*="border-bottom: 1px solid #e2e8f0"] {
    border-color: var(--border-medium) !important;
}

/* Dark Mode - Background overrides for inline styles */
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background: #ffffff"],
[data-theme="dark"] [style*="background-color: white"],
[data-theme="dark"] [style*="background-color: #fff"],
[data-theme="dark"] [style*="background-color: #ffffff"] {
    background: var(--card-bg) !important;
}

[data-theme="dark"] [style*="background: #f8fafc"],
[data-theme="dark"] [style*="background-color: #f8fafc"],
[data-theme="dark"] [style*="background: #f1f5f9"],
[data-theme="dark"] [style*="background-color: #f1f5f9"] {
    background: var(--bg-tertiary) !important;
}

/* Dark Mode - Color overrides for inline styles */
[data-theme="dark"] [style*="color: #0f172a"],
[data-theme="dark"] [style*="color:#0f172a"] {
    color: var(--text-heading) !important;
}

[data-theme="dark"] [style*="color: #64748b"],
[data-theme="dark"] [style*="color:#64748b"],
[data-theme="dark"] [style*="color: #475569"],
[data-theme="dark"] [style*="color:#475569"] {
    color: var(--text-muted) !important;
}

[data-theme="dark"] [style*="color: #94a3b8"],
[data-theme="dark"] [style*="color:#94a3b8"] {
    color: var(--text-faint) !important;
}

/* Dark Mode - Online Users List */
[data-theme="dark"] .online-user-item {
    border-bottom-color: var(--border-light) !important;
}

[data-theme="dark"] .online-user-name {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .online-user-time,
[data-theme="dark"] .online-user-details {
    color: var(--text-muted) !important;
}

/* Dark Mode - File Upload Areas */
[data-theme="dark"] .upload-area,
[data-theme="dark"] .dropzone {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-medium) !important;
}

[data-theme="dark"] .upload-area:hover,
[data-theme="dark"] .dropzone:hover {
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] .upload-text {
    color: var(--text-muted) !important;
}

/* Dark Mode - Info boxes/panels */
[data-theme="dark"] .info-box,
[data-theme="dark"] .info-panel {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-medium) !important;
}

[data-theme="dark"] .info-label {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .info-value {
    color: var(--text-heading) !important;
}

/* Dark Mode - Action buttons row styling */
[data-theme="dark"] .actions-cell a,
[data-theme="dark"] .action-buttons a {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .actions-cell a:hover,
[data-theme="dark"] .action-buttons a:hover {
    color: var(--primary-color) !important;
}

/* Dark Mode - Icon buttons */
[data-theme="dark"] .icon-btn {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .icon-btn:hover {
    background: var(--bg-hover) !important;
    color: var(--text-heading) !important;
}

/* Dark Mode - Tab Content */
[data-theme="dark"] .tab-content {
    background: var(--card-bg) !important;
}

[data-theme="dark"] .tab-pane {
    background: var(--card-bg) !important;
}

/* Dark Mode - Create/Edit Forms */
[data-theme="dark"] .form-section {
    background: var(--card-bg) !important;
    border-color: var(--border-medium) !important;
}

[data-theme="dark"] .form-section-title {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .form-help {
    color: var(--text-faint) !important;
}

/* Dark Mode - Dashboard specific */
[data-theme="dark"] .dashboard-card {
    background: var(--card-bg) !important;
    border-color: var(--border-medium) !important;
}

[data-theme="dark"] .dashboard-card-title {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .dashboard-card-value {
    color: var(--text-heading) !important;
}

[data-theme="dark"] .dashboard-card-label {
    color: var(--text-muted) !important;
}

/* ========================================
   PAGE SPECIFIC STYLES - ADMIN
   ======================================== */

/* Clients Page */
.clients-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.clients-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
    margin: 0;
}

.clients-stats {
    display: flex;
    gap: 24px;
}

.clients-stat {
    text-align: center;
}

.clients-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
}

.clients-stat-value.success { color: #22c55e; }
.clients-stat-value.info { color: #3b82f6; }
[data-theme="dark"] .clients-stat-value.success { color: #4ade80; }
[data-theme="dark"] .clients-stat-value.info { color: #60a5fa; }

.clients-stat-label {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search and Filters */
.search-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 8px;
    font-size: 14px;
    background: var(--input-bg, #fff);
    color: var(--text-body, #374151);
    transition: all 0.15s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-box input::placeholder {
    color: var(--text-faint, #94a3b8);
}

.search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-faint, #94a3b8);
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 8px;
    font-size: 14px;
    background: var(--input-bg, #fff);
    color: var(--text-body, #374151);
    cursor: pointer;
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color, #4f46e5);
}

/* Client Row */
.client-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.client-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin: 0 0 2px 0;
}

.client-info p {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    margin: 0;
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-indicator.online {
    background: #dcfce7;
    color: #166534;
}

.status-indicator.offline {
    background: var(--bg-tertiary, #f1f5f9);
    color: var(--text-muted, #64748b);
}

[data-theme="dark"] .status-indicator.online {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .status-indicator.offline {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online .dot {
    background: #22c55e;
    animation: pulse 2s infinite;
}

.status-indicator.offline .dot {
    background: var(--text-faint, #94a3b8);
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid var(--border-medium, #e2e8f0);
    margin-top: 16px;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-muted, #64748b);
}

/* Empty States */
.empty-search {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted, #64748b);
}

.empty-search svg {
    width: 48px;
    height: 48px;
    color: var(--text-faint, #cbd5e1);
    margin-bottom: 16px;
}

.clear-search {
    color: var(--primary-color, #4f46e5);
    text-decoration: none;
    font-weight: 500;
}

.clear-search:hover {
    text-decoration: underline;
}

/* Actions Cell */
.actions-cell {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ========================================
   CLIENT VIEW / PROFILE PAGE
   ======================================== */

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary, #f1f5f9);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.profile-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    transition: all 0.15s ease;
}

.profile-tab:hover {
    color: var(--text-heading, #0f172a);
    background: rgba(255,255,255,0.5);
}

[data-theme="dark"] .profile-tab:hover {
    background: var(--bg-hover);
}

.profile-tab.active {
    background: var(--card-bg, #fff);
    color: var(--text-heading, #0f172a);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.profile-tab svg {
    width: 18px;
    height: 18px;
}

.profile-tab .tab-badge {
    background: var(--bg-tertiary, #e2e8f0);
    color: var(--text-muted, #64748b);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.profile-tab.active .tab-badge {
    background: var(--primary-color, #4f46e5);
    color: white;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-box {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-box-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
}

.stat-box-label {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    margin-top: 4px;
}

/* Kanban Board */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
}

.kanban-column {
    background: var(--bg-secondary, #f8fafc);
    border-radius: 12px;
    min-width: 250px;
}

.kanban-column-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-medium, #e2e8f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-column-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
}

.kanban-count {
    background: var(--bg-tertiary, #e2e8f0);
    color: var(--text-muted, #64748b);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.kanban-column-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.kanban-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 8px;
    padding: 12px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.kanban-card:hover {
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.kanban-card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-heading, #0f172a);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kanban-card-meta {
    font-size: 11px;
    color: var(--text-muted, #64748b);
}

.empty-column {
    text-align: center;
    padding: 20px;
    color: var(--text-faint, #94a3b8);
    font-size: 13px;
}

/* File Items */
.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.file-item:hover {
    border-color: var(--primary-color, #4f46e5);
}

.file-icon-wrapper {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary, #f1f5f9);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-icon-wrapper svg {
    width: 20px;
    height: 20px;
}

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

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-heading, #0f172a);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 12px;
    color: var(--text-muted, #64748b);
}

/* ========================================
   ACTIVITY LOGS PAGE
   ======================================== */

.activity-table-row {
    border-bottom: 1px solid var(--border-light, #f1f5f9);
}

.activity-date {
    font-size: 12px;
    color: var(--text-muted, #64748b);
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted, #64748b);
}

.activity-user {
    font-size: 12px;
    color: var(--text-muted, #64748b);
}

.activity-description {
    font-size: 14px;
    color: var(--text-heading, #0f172a);
}

/* ========================================
   DASHBOARD PAGE
   ======================================== */

.dashboard-stat-value {
    color: var(--text-heading, #0f172a);
}

.dashboard-stat-value.success {
    color: #10b981;
}

[data-theme="dark"] .dashboard-stat-value.success {
    color: #34d399;
}

/* ========================================
   TICKETS PAGE
   ======================================== */

.ticket-list-item {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.15s ease;
}

.ticket-list-item:hover {
    border-color: var(--primary-color, #4f46e5);
}

.ticket-subject {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin-bottom: 8px;
}

.ticket-preview {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    margin-bottom: 12px;
}

.ticket-meta-row {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

/* ========================================
   NOTIFICATIONS PAGE
   ======================================== */

.notification-page-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--border-light, #f1f5f9);
}

.notification-page-item:hover {
    background: var(--bg-hover, #f8fafc);
}

.notification-page-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin-bottom: 4px;
}

.notification-page-message {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    margin-bottom: 8px;
}

.notification-page-time {
    font-size: 12px;
    color: var(--text-faint, #94a3b8);
}

/* ========================================
   SETTINGS PAGE
   ======================================== */

.settings-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-heading, #0f172a);
    margin-bottom: 6px;
}

.settings-hint {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    margin-top: 6px;
}

.logo-preview {
    background: var(--bg-tertiary, #f1f5f9);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

/* ========================================
   CLIENT PAGES
   ======================================== */

/* Client Dashboard */
.welcome-card {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 16px;
    padding: 32px;
    color: white;
    margin-bottom: 24px;
}

.welcome-card h1 {
    color: white;
}

.quick-action-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    text-decoration: none;
    transition: all 0.15s ease;
    display: block;
}

.quick-action-card:hover {
    border-color: var(--primary-color, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: var(--bg-tertiary, #f1f5f9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color, #4f46e5);
}

.quick-action-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin-bottom: 4px;
}

.quick-action-description {
    font-size: 14px;
    color: var(--text-muted, #64748b);
}

/* Client Files Page */
.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.files-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
    margin: 0;
}

.files-count {
    font-size: 14px;
    color: var(--text-muted, #64748b);
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.file-grid-item {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.file-grid-item:hover {
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.file-grid-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary, #f1f5f9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.file-grid-icon svg {
    width: 24px;
    height: 24px;
}

.file-grid-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-grid-info {
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

/* Client Tickets */
.tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tickets-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
    margin: 0;
}

.ticket-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    text-decoration: none;
    display: block;
    transition: all 0.15s ease;
}

.ticket-card:hover {
    border-color: var(--primary-color, #4f46e5);
}

.ticket-card-subject {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin-bottom: 8px;
}

.ticket-card-preview {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ticket-card-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-faint, #94a3b8);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
    
    .clients-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .clients-stats {
        justify-content: space-around;
    }
    
    .search-filters {
        flex-direction: column;
    }
    
    .search-box {
        max-width: 100%;
    }
}

/* ========================================
   UTILITY CLASSES FOR INLINE STYLE REPLACEMENT
   ======================================== */

/* Text Colors */
.text-success { color: #22c55e !important; }
.text-info { color: #3b82f6 !important; }
.text-warning { color: #f59e0b !important; }
.text-danger { color: #ef4444 !important; }
.text-muted { color: var(--text-muted, #64748b) !important; }
.text-faint { color: var(--text-faint, #94a3b8) !important; }
.text-heading { color: var(--text-heading, #0f172a) !important; }

[data-theme="dark"] .text-success { color: #4ade80 !important; }
[data-theme="dark"] .text-info { color: #60a5fa !important; }
[data-theme="dark"] .text-warning { color: #fbbf24 !important; }
[data-theme="dark"] .text-danger { color: #f87171 !important; }

/* Font Sizes */
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }

/* Font Weights */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Spacing */
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.p-0 { padding: 0 !important; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.gap-2 { gap: 8px; }

/* Flexbox */
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

/* Width */
.w-fit { width: fit-content; }
.w-full { width: 100%; }

/* Icons */
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 18px; height: 18px; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 24px; height: 24px; }
.icon-2xl { width: 32px; height: 32px; }
.icon-3xl { width: 48px; height: 48px; }

/* Code/Badge inline */
.code-inline {
    background: var(--bg-tertiary, #f1f5f9);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-body, #475569);
    font-family: monospace;
}

/* Row number */
.row-number {
    color: var(--text-faint, #94a3b8);
    font-weight: 500;
}

/* Date display */
.date-primary {
    font-weight: 500;
    color: var(--text-heading, #0f172a);
}

.date-secondary {
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

/* Required field marker */
.required {
    color: #ef4444;
}

[data-theme="dark"] .required {
    color: #f87171;
}

/* Optional field marker */
.optional {
    color: var(--text-faint, #94a3b8);
}

/* Help text */
.help-text {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    margin-top: 4px;
}

/* Card body variants */
.card-body-bordered {
    border-bottom: 1px solid var(--border-medium, #e2e8f0);
}

/* Empty state icon */
.empty-state-icon {
    width: 48px;
    height: 48px;
    color: var(--text-faint, #cbd5e1);
    margin-bottom: 16px;
}

/* Action buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    gap: 4px;
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.action-btn-primary {
    background: var(--primary-color, #4f46e5);
    color: white;
}

.action-btn-primary:hover {
    background: var(--primary-dark, #4338ca);
}

.action-btn-secondary {
    background: var(--bg-tertiary, #f1f5f9);
    color: var(--text-muted, #64748b);
}

.action-btn-secondary:hover {
    background: var(--bg-active, #e2e8f0);
    color: var(--text-heading, #0f172a);
}

.action-btn-danger {
    color: var(--danger-color, #ef4444);
}

.action-btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* User agent truncate */
.user-agent-truncate {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    margin-top: 4px;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dash placeholder */
.placeholder-dash {
    color: var(--text-faint, #94a3b8);
}

/* Status columns container */
.status-badges {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Table specific */
.table-col-narrow {
    width: 50px;
}

.table-col-actions {
    text-align: right;
}

/* Additional utility classes */
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.gap-3 { gap: 12px; }

/* Flex utilities */
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* Grid utilities */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-2-sm { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Icon with margin */
.icon-sm-mr { width: 16px; height: 16px; margin-right: 6px; }
.icon-sm-mr-sm { width: 16px; height: 16px; margin-right: 4px; }
.icon-xs { width: 12px; height: 12px; }

/* Avatar */
.avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color, #4f46e5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* Text utilities */
.text-sm-muted {
    color: var(--text-muted, #64748b);
    font-size: 14px;
}

.text-semibold {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
}

.text-lg { font-size: 24px; }

/* Activity/list items */
.list-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light, #f1f5f9);
}

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

/* Empty text centered */
.empty-text {
    color: var(--text-muted, #64748b);
    text-align: center;
    padding: 20px;
}

/* Status tags - different colors */
.status-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-tag-success {
    background: #dcfce7;
    color: #16a34a;
}

.status-tag-info {
    background: #dbeafe;
    color: #2563eb;
}

.status-tag-warning {
    background: #fef3c7;
    color: #d97706;
}

.status-tag-purple {
    background: #f3e8ff;
    color: #9333ea;
}

.status-tag-green {
    background: #dcfce7;
    color: #10b981;
}

[data-theme="dark"] .status-tag-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .status-tag-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .status-tag-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .status-tag-purple {
    background: rgba(147, 51, 234, 0.2);
    color: #c084fc;
}

[data-theme="dark"] .status-tag-green {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

/* Pagination disabled */
.pagination-disabled {
    padding: 8px 16px;
    color: var(--text-muted, #64748b);
}

/* Hidden utility */
.d-none { display: none; }
.d-inline { display: inline; }

/* Max widths */
.max-w-md { max-width: 500px; }
.max-w-lg { max-width: 550px; }
.w-100 { width: 100%; }
.w-auto { width: auto; }

/* Reply avatar */
.reply-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.reply-avatar-admin {
    background: var(--primary-color, #4f46e5);
}

.reply-avatar-client {
    background: #10b981;
}

/* Card footer with border */
.card-footer-bordered {
    padding: 16px 20px;
    border-top: 1px solid var(--border-medium, #e2e8f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Icon colors */
.icon-warning { color: #f59e0b; }
.icon-info { color: #3b82f6; }
.icon-success { color: #10b981; }

[data-theme="dark"] .icon-warning { color: #fbbf24; }
[data-theme="dark"] .icon-info { color: #60a5fa; }
[data-theme="dark"] .icon-success { color: #34d399; }

/* Final utility classes */
.mt-3 { margin-top: 12px; }
.mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.m-0 { margin: 0; }

/* Text truncate */
.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Max widths */
.max-w-xs { max-width: 300px; }
.max-w-sm { max-width: 450px; }

/* Font sizes with margin */
.title-lg {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-heading, #0f172a);
}

.title-md {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-heading, #0f172a);
}

/* File name truncate */
.file-name-truncate {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-heading, #0f172a);
}

/* Description text */
.description-text {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

/* Hint text with margin */
.hint-text {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-faint, #94a3b8);
}

/* Danger text */
.danger-label {
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 4px;
}

[data-theme="dark"] .danger-label {
    color: #f87171;
}

/* Reply avatars - dynamic */
.reply-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.reply-avatar.admin {
    background: var(--primary-color, #4f46e5);
}

.reply-avatar.client {
    background: #10b981;
}

[data-theme="dark"] .reply-avatar.client {
    background: #34d399;
}

/* Min widths */
.min-w-9 { min-width: 36px; }
.w-25 { width: 100px; }

/* ========================================
   DARK MODE - REMAINING INLINE STYLE FIXES
   ======================================== */

/* Modal danger styles */
[data-theme="dark"] .modal-content h2[style*="color: #dc2626"] {
    color: #f87171 !important;
}

[data-theme="dark"] [style*="background: #fef2f2"] {
    background: rgba(239, 68, 68, 0.15) !important;
}

[data-theme="dark"] [style*="color: #7f1d1d"] {
    color: #fca5a5 !important;
}

[data-theme="dark"] [style*="color: #dc2626"] {
    color: #f87171 !important;
}

/* Light background boxes in dark mode */
[data-theme="dark"] [style*="background: #f8fafc"] {
    background: var(--bg-tertiary) !important;
}

[data-theme="dark"] [style*="background: #f1f5f9"] {
    background: var(--bg-tertiary) !important;
}

/* Text colors in remaining inline styles */
[data-theme="dark"] [style*="color: #64748b"] {
    color: var(--text-muted) !important;
}

[data-theme="dark"] [style*="color: #94a3b8"] {
    color: var(--text-faint) !important;
}

/* Border colors */
[data-theme="dark"] [style*="border-bottom: 1px solid #f1f5f9"],
[data-theme="dark"] [style*="border-top: 1px solid #e2e8f0"],
[data-theme="dark"] [style*="border: 1px solid #e2e8f0"] {
    border-color: var(--border-medium) !important;
}

/* Form elements max-width retain visibility */
[data-theme="dark"] input[style*="max-width"],
[data-theme="dark"] select[style*="max-width"] {
    background: var(--input-bg) !important;
    border-color: var(--border-medium) !important;
    color: var(--text-body) !important;
}

/* Ensure flex containers have proper text color */
[data-theme="dark"] div[style*="display: flex"] {
    color: var(--text-body);
}

/* Upload form hint */
[data-theme="dark"] p[style*="margin-top: 12px"][style*="color: #94a3b8"] {
    color: var(--text-faint) !important;
}

/* Notification recipient box */
[data-theme="dark"] .notification-recipient[style*="background: #f8fafc"] {
    background: var(--bg-tertiary) !important;
}

/* File list items */
.file-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: var(--card-bg, white);
    border: 1px solid var(--border-medium, #e2e8f0);
    margin-bottom: 8px;
    transition: all 0.15s ease;
}

.file-list-item:hover {
    border-color: var(--primary-color);
}

.file-list-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-heading, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-list-meta {
    font-size: 12px;
    color: var(--text-muted, #64748b);
}

/* ========================================
   CLIENT FILES PAGE - PROFESSIONAL TABLE DESIGN
   ======================================== */

/* Files Header */
.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.files-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
    margin: 0;
}

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

.files-stats-inline {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--text-muted, #64748b);
}

.files-stats-inline strong {
    color: var(--text-heading, #0f172a);
    font-weight: 600;
}

/* Files Table Container */
.files-table-container {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
}

/* Files Table */
.files-table {
    width: 100%;
    border-collapse: collapse;
}

.files-table thead {
    background: var(--bg-tertiary, #f8fafc);
}

.files-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #64748b);
    border-bottom: 1px solid var(--border-medium, #e2e8f0);
}

.files-table th:first-child {
    width: 50px;
    text-align: center;
}

.files-table th.col-rows {
    width: 80px;
    text-align: right;
}

.files-table td.col-rows {
    text-align: right;
    color: var(--text-muted, #6b7280);
    font-size: 13px;
}

.files-table th.col-size {
    width: 100px;
}

.files-table th.col-date {
    width: 120px;
}

.files-table th.col-actions {
    width: 120px;
}

.files-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light, #f1f5f9);
    font-size: 14px;
    color: var(--text-body, #374151);
}

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

/* Today's file shimmer effect */
.files-table tbody tr.file-today {
    position: relative;
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.05) 0%, 
        rgba(99, 102, 241, 0.12) 50%, 
        rgba(59, 130, 246, 0.05) 100%);
    background-size: 200% 100%;
    animation: fileShimmer 3s ease-in-out infinite;
}

.files-table tbody tr.file-today td {
    border-bottom-color: rgba(59, 130, 246, 0.2);
}

.files-table tbody tr.file-today td:first-child {
    position: relative;
}

.files-table tbody tr.file-today td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #3b82f6, #6366f1);
}

@keyframes fileShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.files-table tbody tr.file-today:hover {
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        rgba(99, 102, 241, 0.18) 50%, 
        rgba(59, 130, 246, 0.1) 100%);
    background-size: 200% 100%;
    animation: fileShimmer 3s ease-in-out infinite;
}

[data-theme="dark"] .files-table tbody tr.file-today {
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.08) 0%, 
        rgba(99, 102, 241, 0.18) 50%, 
        rgba(59, 130, 246, 0.08) 100%);
    background-size: 200% 100%;
}

[data-theme="dark"] .files-table tbody tr.file-today td {
    border-bottom-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .files-table tbody tr.file-today:hover {
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.12) 0%, 
        rgba(99, 102, 241, 0.22) 50%, 
        rgba(59, 130, 246, 0.12) 100%);
    background-size: 200% 100%;
}

.files-table tbody tr:hover {
    background: var(--bg-hover, #f8fafc);
}

/* Month Row Separator */
.month-row td {
    background: var(--bg-tertiary, #f1f5f9);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-medium, #e2e8f0);
}

.month-row:hover td {
    background: var(--bg-tertiary, #f1f5f9);
}

/* Row Number */
.row-num {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-faint, #94a3b8);
}

/* File Name Cell */
.file-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary, #f1f5f9);
    border-radius: 6px;
    flex-shrink: 0;
}

.file-icon svg {
    width: 20px;
    height: 20px;
}

.file-name {
    font-weight: 500;
    color: var(--text-heading, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.file-ext {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-faint, #94a3b8);
    background: var(--bg-tertiary, #f1f5f9);
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* File Size & Date */
.file-size {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    font-weight: 500;
}

.file-date {
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

/* Download Button */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-color, #4f46e5);
    background: transparent;
    border: 1px solid var(--primary-color, #4f46e5);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.download-btn:hover {
    background: var(--primary-color, #4f46e5);
    color: white;
}

.download-btn svg {
    width: 16px;
    height: 16px;
}

/* Empty State */
.files-table-container .empty-state {
    padding: 80px 20px;
    text-align: center;
}

.files-table-container .empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--text-faint, #cbd5e1);
    margin-bottom: 16px;
}

.files-table-container .empty-state p {
    font-size: 15px;
    color: var(--text-muted, #64748b);
    margin: 0;
}

/* Search Box in Files Header */
.files-header .search-box {
    min-width: 200px;
    max-width: 280px;
}

.files-header .search-box input {
    width: 100%;
    padding: 8px 14px 8px 38px;
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 8px;
    font-size: 14px;
    background: var(--input-bg, #fff);
    color: var(--text-body, #374151);
    transition: all 0.15s ease;
}

.files-header .search-box input:focus {
    outline: none;
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.files-header .search-box input::placeholder {
    color: var(--text-faint, #94a3b8);
}

.files-header .search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-faint, #94a3b8);
}

/* Dark Mode - Files Page */
[data-theme="dark"] .files-header h1 {
    color: var(--text-heading);
}

[data-theme="dark"] .files-stats-inline {
    color: var(--text-muted);
}

[data-theme="dark"] .files-stats-inline strong {
    color: var(--text-heading);
}

[data-theme="dark"] .files-table-container {
    background: var(--card-bg);
    border-color: var(--border-medium);
}

[data-theme="dark"] .files-table thead {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .files-table th {
    color: var(--text-muted);
    border-bottom-color: var(--border-medium);
}

[data-theme="dark"] .files-table td {
    color: var(--text-body);
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .files-table tbody tr:hover {
    background: var(--bg-hover);
}

[data-theme="dark"] .month-row td {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border-bottom-color: var(--border-medium);
}

[data-theme="dark"] .month-row:hover td {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .row-num {
    color: var(--text-faint);
}

[data-theme="dark"] .file-icon {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .file-name {
    color: var(--text-heading);
}

[data-theme="dark"] .file-ext {
    color: var(--text-faint);
    background: var(--bg-tertiary);
}

[data-theme="dark"] .file-size,
[data-theme="dark"] .file-date {
    color: var(--text-muted);
}

[data-theme="dark"] .download-btn {
    color: var(--primary-light);
    border-color: var(--primary-light);
}

[data-theme="dark"] .download-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

[data-theme="dark"] .files-table-container .empty-state svg {
    color: var(--text-faint);
}

[data-theme="dark"] .files-table-container .empty-state p {
    color: var(--text-muted);
}

[data-theme="dark"] .files-header .search-box input {
    background: var(--input-bg);
    border-color: var(--border-medium);
    color: var(--text-body);
}

[data-theme="dark"] .files-header .search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .files-header .search-box input::placeholder {
    color: var(--text-faint);
}

[data-theme="dark"] .files-header .search-box svg {
    color: var(--text-faint);
}

/* Responsive - Files Page */
@media (max-width: 768px) {
    .files-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .files-header-right {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .files-stats-inline {
        justify-content: center;
    }
    
    .files-header .search-box {
        max-width: 100%;
    }
    
    .files-table th.col-rows,
    .files-table td.col-rows,
    .files-table th.col-size,
    .files-table td.col-size,
    .files-table th.col-date,
    .files-table td.col-date {
        display: none;
    }
    
    .file-name {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .files-table th:first-child,
    .files-table td:first-child {
        display: none;
    }
    
    .file-name-cell {
        gap: 8px;
    }
    
    .file-icon {
        width: 28px;
        height: 28px;
    }
    
    .file-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .download-btn span {
        display: none;
    }
    
    .download-btn {
        padding: 8px;
    }
}

/* ========================================
   CLIENT TICKETS PAGE
   ======================================== */

.stat-box-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-box-icon svg {
    width: 24px;
    height: 24px;
}

.stat-box-icon-success {
    background: #d1fae5;
    color: #059669;
}

.stat-box-icon-info {
    background: #dbeafe;
    color: #2563eb;
}

.stat-box-icon-warning {
    background: #fef3c7;
    color: #d97706;
}

.stat-box-icon-danger {
    background: #fee2e2;
    color: #dc2626;
}

[data-theme="dark"] .stat-box-icon-success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

[data-theme="dark"] .stat-box-icon-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .stat-box-icon-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .stat-box-icon-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* ========================================
   ADMIN NOTIFICATIONS PAGE
   ======================================== */

.notification-card-wrapper {
    margin-bottom: 24px;
}

.notification-card-wrapper.hidden {
    display: none;
}

.empty-state-action {
    margin-top: 12px;
}

/* ========================================
   ADMIN CLIENT VIEW PAGE
   ======================================== */

/* File list item in overview */
.file-list-content {
    flex: 1;
    min-width: 0;
}

.file-list-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-heading, #0f172a);
}

.file-list-meta {
    font-size: 12px;
    color: var(--text-faint, #94a3b8);
}

/* Activity content in overview */
.activity-content-wrapper {
    flex: 1;
}

/* Upload section */
.upload-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.upload-input {
    max-width: 300px;
}

.upload-hint {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-faint, #94a3b8);
    text-align: center;
}

/* File actions */
.file-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Pagination inline */
.pagination-inline {
    display: flex;
    gap: 4px;
}

.pagination-btn {
    min-width: 36px;
}

/* No tickets text */
.no-items-text {
    font-size: 13px;
    margin: 0;
    color: var(--text-muted, #64748b);
}

/* User agent truncate */
.user-agent-cell {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-muted, #64748b);
}

/* Delete Modal */
.modal-danger .modal-header h2 {
    color: #dc2626;
}

[data-theme="dark"] .modal-danger .modal-header h2 {
    color: #f87171;
}

.modal-sm {
    max-width: 450px;
}

/* Warning box in modal */
.warning-box {
    background: #fef2f2;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

[data-theme="dark"] .warning-box {
    background: rgba(239, 68, 68, 0.1);
}

.warning-box-content {
    flex: 1;
}

.warning-box-title {
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 4px;
}

[data-theme="dark"] .warning-box-title {
    color: #f87171;
}

.warning-box-text {
    font-size: 14px;
    color: #7f1d1d;
}

[data-theme="dark"] .warning-box-text {
    color: #fca5a5;
}

/* Info box in modal */
.info-box {
    background: var(--bg-tertiary, #f8fafc);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-box-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color, #4f46e5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

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

.info-box-name {
    font-weight: 600;
    color: var(--text-heading, #0f172a);
}

.info-box-meta {
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

/* Notification recipient */
.notification-recipient {
    background: var(--bg-tertiary, #f8fafc);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ========================================
   ADMIN SETTINGS PAGE
   ======================================== */

.settings-section {
    margin-top: 24px;
}

.settings-section:first-child {
    margin-top: 0;
}

.settings-section-header {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
}

.settings-section-description {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

.settings-form-inline {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.settings-form-inline .form-group {
    margin: 0;
}

.settings-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}

/* Empty state small */
.empty-state-small {
    text-align: center;
    padding: 24px;
    color: var(--text-muted, #64748b);
}

.empty-state-small-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.empty-state-small p {
    margin: 0;
    font-size: 14px;
}

/* Grid layout */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .upload-form {
        flex-direction: column;
    }
    
    .upload-input {
        max-width: 100%;
        width: 100%;
    }
    
    .settings-form-inline {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ========================================
   CLIENT TICKETS PAGE - COMPLETE STYLES
   ======================================== */

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
    margin: 0;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Stat Box */
.stat-box {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-box-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-box-icon svg {
    width: 24px;
    height: 24px;
}

.stat-box-icon-success {
    background: #d1fae5;
    color: #059669;
}

.stat-box-icon-info {
    background: #dbeafe;
    color: #2563eb;
}

.stat-box-icon-warning {
    background: #fef3c7;
    color: #d97706;
}

.stat-box-icon-danger {
    background: #fee2e2;
    color: #dc2626;
}

.stat-box-icon-purple {
    background: #f3e8ff;
    color: #7c3aed;
}

[data-theme="dark"] .stat-box-icon-success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

[data-theme="dark"] .stat-box-icon-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .stat-box-icon-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .stat-box-icon-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

[data-theme="dark"] .stat-box-icon-purple {
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
}

.stat-box-content {
    flex: 1;
}

.stat-box-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
    line-height: 1.2;
}

.stat-box-label {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    margin-top: 4px;
}

/* Badge Priority */
.badge-priority {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-priority.low {
    background: #f1f5f9;
    color: #64748b;
}

.badge-priority.medium {
    background: #dbeafe;
    color: #1e40af;
}

.badge-priority.high {
    background: #fef3c7;
    color: #92400e;
}

.badge-priority.urgent {
    background: #fee2e2;
    color: #991b1b;
}

[data-theme="dark"] .badge-priority.low {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

[data-theme="dark"] .badge-priority.medium {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .badge-priority.high {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .badge-priority.urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Badge Status */
.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-status.open {
    background: #fef3c7;
    color: #92400e;
}

.badge-status.in_progress {
    background: #dbeafe;
    color: #1e40af;
}

.badge-status.waiting {
    background: #f3e8ff;
    color: #7c3aed;
}

.badge-status.resolved {
    background: #dcfce7;
    color: #166534;
}

.badge-status.closed {
    background: #f1f5f9;
    color: #64748b;
}

[data-theme="dark"] .badge-status.open {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .badge-status.in_progress {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .badge-status.waiting {
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
}

[data-theme="dark"] .badge-status.resolved {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .badge-status.closed {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* Status Tag */
.status-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-tag-success {
    background: #dcfce7;
    color: #16a34a;
}

.status-tag-info {
    background: #dbeafe;
    color: #2563eb;
}

.status-tag-warning {
    background: #fef3c7;
    color: #d97706;
}

.status-tag-danger {
    background: #fee2e2;
    color: #dc2626;
}

.status-tag-purple {
    background: #f3e8ff;
    color: #9333ea;
}

[data-theme="dark"] .status-tag-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .status-tag-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .status-tag-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .status-tag-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

[data-theme="dark"] .status-tag-purple {
    background: rgba(147, 51, 234, 0.2);
    color: #c084fc;
}

/* Empty Tickets */
.empty-tickets {
    text-align: center;
    padding: 60px 20px;
}

.empty-tickets svg {
    width: 64px;
    height: 64px;
    color: var(--text-faint, #cbd5e1);
    margin-bottom: 16px;
}

.empty-tickets p {
    font-size: 15px;
    color: var(--text-muted, #64748b);
    margin: 0 0 16px 0;
}

/* Tickets List */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    display: block;
    transition: all 0.15s ease;
}

.ticket-card:hover {
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ticket-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

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

.ticket-card-badges {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.ticket-card-preview {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ticket-card-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-faint, #94a3b8);
}

.ticket-card-meta svg {
    width: 14px;
    height: 14px;
    margin-right: 4px;
}

/* ========================================
   ADMIN CLIENT VIEW PAGE - COMPLETE STYLES
   ======================================== */

/* Client Profile Header */
.client-profile-header {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.profile-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    min-width: 200px;
}

.profile-info h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
    margin: 0 0 8px 0;
}

.profile-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted, #64748b);
}

.profile-meta-item svg {
    width: 16px;
    height: 16px;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.profile-status.active {
    background: #dcfce7;
    color: #166534;
}

.profile-status.suspended {
    background: #fee2e2;
    color: #991b1b;
}

[data-theme="dark"] .profile-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .profile-status.suspended {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.profile-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary, #f1f5f9);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
}

.profile-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.profile-tab:hover {
    color: var(--text-heading, #0f172a);
    background: rgba(255,255,255,0.5);
}

[data-theme="dark"] .profile-tab:hover {
    background: var(--bg-hover);
}

.profile-tab.active {
    background: var(--card-bg, #fff);
    color: var(--text-heading, #0f172a);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.profile-tab svg {
    width: 18px;
    height: 18px;
}

.tab-badge {
    background: var(--bg-tertiary, #e2e8f0);
    color: var(--text-muted, #64748b);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.profile-tab.active .tab-badge {
    background: var(--primary-color, #4f46e5);
    color: white;
}

/* Upload Section */
.upload-section {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.upload-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.upload-input {
    max-width: 300px;
}

.upload-hint {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-faint, #94a3b8);
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-tertiary, #f8fafc);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #64748b);
    border-bottom: 1px solid var(--border-medium, #e2e8f0);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light, #f1f5f9);
    font-size: 14px;
    color: var(--text-body, #374151);
}

.data-table tbody tr:hover {
    background: var(--bg-hover, #f8fafc);
}

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

/* File Actions */
.file-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Kanban Board */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.kanban-column {
    background: var(--bg-secondary, #f8fafc);
    border-radius: 12px;
    overflow: hidden;
}

.kanban-column-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-medium, #e2e8f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-column-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
}

.kanban-count {
    background: var(--bg-tertiary, #e2e8f0);
    color: var(--text-muted, #64748b);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.kanban-column-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 350px;
    overflow-y: auto;
}

.kanban-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 8px;
    padding: 12px;
    text-decoration: none;
    transition: all 0.15s ease;
    display: block;
}

.kanban-card:hover {
    border-color: var(--primary-color, #4f46e5);
}

.kanban-card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-heading, #0f172a);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kanban-card-meta {
    font-size: 11px;
    color: var(--text-muted, #64748b);
}

/* Empty State Small */
.empty-state-small {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-muted, #64748b);
}

.empty-state-small-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.empty-state-small p {
    margin: 0;
    font-size: 14px;
}

/* List Item Row */
.list-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light, #f1f5f9);
}

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

/* File List Content */
.file-list-content {
    flex: 1;
    min-width: 0;
}

.file-list-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-heading, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Activity Content Wrapper */
.activity-content-wrapper {
    flex: 1;
}

/* Warning Box */
.warning-box {
    background: #fef2f2;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

[data-theme="dark"] .warning-box {
    background: rgba(239, 68, 68, 0.1);
}

.warning-box-title {
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 4px;
}

[data-theme="dark"] .warning-box-title {
    color: #f87171;
}

.warning-box-text {
    font-size: 14px;
    color: #7f1d1d;
}

[data-theme="dark"] .warning-box-text {
    color: #fca5a5;
}

/* Info Box */
.info-box {
    background: var(--bg-tertiary, #f8fafc);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Modal Small */
.modal-sm {
    max-width: 450px !important;
}

/* Notification Recipient */
.notification-recipient {
    background: var(--bg-tertiary, #f8fafc);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Card Footer Bordered */
.card-footer-bordered {
    padding: 16px 20px;
    border-top: 1px solid var(--border-medium, #e2e8f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Pagination Inline */
.pagination-inline {
    display: flex;
    gap: 4px;
}

.pagination-btn {
    min-width: 36px;
}

/* User Agent Cell */
.user-agent-cell {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-muted, #64748b);
}

/* No Items Text */
.no-items-text {
    font-size: 13px;
    margin: 0;
    color: var(--text-muted, #64748b);
}

/* ========================================
   ADMIN NOTIFICATIONS PAGE - STYLES
   ======================================== */

.notification-card-wrapper {
    margin-bottom: 24px;
}

.notification-card-wrapper.hidden {
    display: none;
}

.empty-state-action {
    margin-top: 12px;
}

.empty-notif {
    text-align: center;
    padding: 60px 20px;
}

.empty-notif svg {
    width: 64px;
    height: 64px;
    color: var(--text-faint, #cbd5e1);
    margin-bottom: 16px;
}

.empty-notif p {
    font-size: 15px;
    color: var(--text-muted, #64748b);
    margin: 0 0 16px 0;
}

/* ========================================
   ADMIN SETTINGS PAGE - STYLES
   ======================================== */

.settings-section {
    margin-top: 24px;
}

.settings-section:first-child {
    margin-top: 0;
}

.settings-section-header {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
}

.settings-section-description {
    margin: 0 0 16px 0;
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

.settings-form-inline {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.settings-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}

.logo-preview {
    background: var(--bg-tertiary, #f1f5f9);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin-bottom: 16px;
}

.logo-preview img {
    max-height: 60px;
    max-width: 200px;
    object-fit: contain;
}

.logo-actions {
    margin-top: 16px;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Display */
.d-inline { display: inline; }
.d-flex { display: flex; }
.d-none { display: none; }

/* Flex */
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }

/* Gap */
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* Margin */
.m-0 { margin: 0 !important; }
.mb-6 { margin-bottom: 24px; }
.mr-2 { margin-right: 8px; }

/* Padding */
.p-5 { padding: 20px; }
.py-5 { padding-top: 20px; padding-bottom: 20px; }

/* Text */
.text-sm { font-size: 12px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-heading { color: var(--text-heading, #0f172a); }
.text-muted { color: var(--text-muted, #64748b); }
.text-faint { color: var(--text-faint, #94a3b8); }
.text-danger { color: #dc2626 !important; }
[data-theme="dark"] .text-danger { color: #f87171 !important; }

.font-medium { font-weight: 500; }

/* Icons */
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 18px; height: 18px; }
.icon-sm-mr-sm { width: 16px; height: 16px; margin-right: 4px; }

/* Table Column Actions */
.table-col-actions {
    text-align: right;
    width: 120px;
}

/* Avatar */
.avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color, #4f46e5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .profile-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-info {
        text-align: center;
    }
    
    .profile-meta {
        justify-content: center;
    }
    
    .profile-actions {
        justify-content: center;
    }
    
    .profile-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .upload-form {
        flex-direction: column;
    }
    
    .upload-input {
        max-width: 100%;
        width: 100%;
    }
    
    .settings-form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ICON SIZE FIXES
   ======================================== */

/* File Icons - Used in client-view.php */
.file-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.file-icon-pdf { color: #dc2626; }
.file-icon-doc { color: #2563eb; }
.file-icon-xls { color: #16a34a; }
.file-icon-img { color: #d97706; }
.file-icon-zip { color: #7c3aed; }
.file-icon-txt { color: #64748b; }
.file-icon-default { color: #64748b; }

/* Stat Box Icons - Keep them at 24px inside the 48px container */
.stat-box-icon svg {
    width: 24px;
    height: 24px;
}

/* Profile Tab Icons */
.profile-tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Profile Meta Icons */
.profile-meta-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Card Header Icons */
.card-header svg {
    width: 18px;
    height: 18px;
}

/* Empty State Icons */
.empty-state svg,
.empty-tickets svg,
.empty-notif svg {
    width: 48px;
    height: 48px;
}

/* Button Icons */
.btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

/* Activity Icon emoji container */
.activity-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

/* List Item Row - limit icon size */
.list-item-row svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.list-item-row .text-lg {
    font-size: 20px;
    line-height: 1;
}

/* Kanban Card Icons */
.kanban-card svg {
    width: 14px;
    height: 14px;
}

/* Table Icons */
.data-table svg {
    width: 16px;
    height: 16px;
}

/* Ticket Card Icons */
.ticket-card svg,
.ticket-card-meta svg {
    width: 14px;
    height: 14px;
}

/* Search Box Icon */
.search-box svg {
    width: 16px;
    height: 16px;
}

/* Page Header Icons */
.page-header svg {
    width: 20px;
    height: 20px;
}

/* Modal Icons */
.modal-content svg {
    width: 20px;
    height: 20px;
}

/* Warning Box Emoji */
.warning-box .text-lg {
    font-size: 20px;
    line-height: 1;
}

/* Notification Icons */
.notification-recipient svg {
    width: 16px;
    height: 16px;
}

/* Settings Page Icons */
.logo-preview svg {
    width: 32px;
    height: 32px;
}

/* Download Button Icons */
.download-btn svg {
    width: 16px;
    height: 16px;
}

/* File Actions Icons */
.file-actions svg {
    width: 14px;
    height: 14px;
}

/* Icon utility classes - override any inherited sizes */
.icon-xs { width: 12px !important; height: 12px !important; }
.icon-sm { width: 16px !important; height: 16px !important; }
.icon-md { width: 18px !important; height: 18px !important; }
.icon-lg { width: 20px !important; height: 20px !important; }
.icon-xl { width: 24px !important; height: 24px !important; }
.icon-2xl { width: 32px !important; height: 32px !important; }

/* ========================================
   GLOBAL SVG SIZE CONSTRAINTS
   ======================================== */

/* Default SVG size - prevent oversized icons */
svg {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

/* Status tag icons - inside badges */
.status-tag svg,
.badge-status svg,
.badge-priority svg,
.status-tag-success svg,
.status-tag-info svg,
.status-tag-warning svg,
.status-tag-danger svg,
.status-tag-purple svg {
    width: 14px;
    height: 14px;
}

/* Stat box icons */
.stat-box-icon svg {
    width: 24px;
    height: 24px;
}

/* Notification type icons in forms/selects */
.notif-type-icon svg,
.notification-type svg,
select option svg {
    width: 16px;
    height: 16px;
}

/* Icons inside buttons - constrain properly */
.btn svg,
button svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

/* Card and table body icons */
.card-body svg,
.data-table svg,
table svg {
    width: 16px;
    height: 16px;
}

/* Profile and navigation icons */
.profile-tab svg,
.sidebar-nav svg,
.nav-icon svg {
    width: 18px;
    height: 18px;
}

/* Topbar icons */
.topbar svg,
.topbar-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Empty state icons - can be larger */
.empty-state svg,
.empty-tickets svg,
.empty-notif svg,
.empty-state-small svg {
    width: 48px;
    height: 48px;
}

/* File icons in lists */
.file-icon,
.file-icon svg {
    width: 20px;
    height: 20px;
}

/* Notification dropdown icons */
.notification-dropdown-icon svg {
    width: 20px;
    height: 20px;
}

/* Ticket meta icons */
.ticket-card-meta svg,
.ticket-meta svg {
    width: 14px;
    height: 14px;
    margin-right: 4px;
}

/* Form icons */
.form-group svg,
.input-group svg {
    width: 16px;
    height: 16px;
}

/* Kanban card icons */
.kanban-card svg {
    width: 12px;
    height: 12px;
}

/* Activity icons */
.activity-icon svg {
    width: 16px;
    height: 16px;
}

/* List item icons */
.list-item-row svg {
    width: 18px;
    height: 18px;
}

/* Modal icons */
.modal-header svg,
.modal-close svg {
    width: 20px;
    height: 20px;
}

/* Alert icons */
.alert svg {
    width: 18px;
    height: 18px;
}

/* Search icons */
.search-box svg {
    width: 16px;
    height: 16px;
}

/* User dropdown icons */
.user-dropdown svg,
.user-dropdown-item svg {
    width: 18px;
    height: 18px;
}

/* Profile header icons */
.profile-meta-item svg {
    width: 16px;
    height: 16px;
}

/* Pagination icons */
.pagination svg {
    width: 14px;
    height: 14px;
}

/* Icon utility classes with higher specificity */
svg.icon-xs { width: 12px !important; height: 12px !important; }
svg.icon-sm { width: 16px !important; height: 16px !important; }
svg.icon-md { width: 18px !important; height: 18px !important; }
svg.icon-lg { width: 20px !important; height: 20px !important; }
svg.icon-xl { width: 24px !important; height: 24px !important; }
svg.icon-2xl { width: 32px !important; height: 32px !important; }
svg.icon-3xl { width: 48px !important; height: 48px !important; }

/* ========================================
   CLIENT TICKETS PAGE - MODERN SAAS DESIGN
   ======================================== */

/* Tickets Page Header */
.tickets-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.tickets-page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tickets-page-header h1 svg {
    width: 28px;
    height: 28px;
    color: var(--primary-color, #4f46e5);
}

/* Stats Cards Grid */
.tickets-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.ticket-stat-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.ticket-stat-card:hover {
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}

.ticket-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ticket-stat-icon svg {
    width: 26px;
    height: 26px;
}

.ticket-stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
}

.ticket-stat-icon.amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.ticket-stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.ticket-stat-icon.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.ticket-stat-content {
    flex: 1;
}

.ticket-stat-content h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted, #64748b);
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-stat-content .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
    line-height: 1;
}

/* Tickets Container */
.tickets-container {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 16px;
    overflow: hidden;
}

.tickets-container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-medium, #e2e8f0);
}

.tickets-container-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin: 0;
}

.tickets-count {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    background: var(--bg-tertiary, #f1f5f9);
    padding: 4px 12px;
    border-radius: 20px;
}

/* Ticket Row */
.ticket-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light, #f1f5f9);
    text-decoration: none;
    transition: all 0.15s ease;
}

.ticket-row:last-child {
    border-bottom: none;
}

.ticket-row:hover {
    background: var(--bg-hover, #f8fafc);
}

/* Ticket Status Icon */
.ticket-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ticket-icon svg {
    width: 22px;
    height: 22px;
}

.ticket-icon.open {
    background: #fef3c7;
    color: #d97706;
}

.ticket-icon.in_progress {
    background: #dbeafe;
    color: #2563eb;
}

.ticket-icon.waiting {
    background: #f3e8ff;
    color: #7c3aed;
}

.ticket-icon.resolved {
    background: #dcfce7;
    color: #16a34a;
}

.ticket-icon.closed {
    background: var(--bg-tertiary, #f1f5f9);
    color: var(--text-muted, #64748b);
}

[data-theme="dark"] .ticket-icon.open {
    background: rgba(217, 119, 6, 0.15);
    color: #fbbf24;
}

[data-theme="dark"] .ticket-icon.in_progress {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
}

[data-theme="dark"] .ticket-icon.waiting {
    background: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
}

[data-theme="dark"] .ticket-icon.resolved {
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
}

[data-theme="dark"] .ticket-icon.closed {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* Ticket Info */
.ticket-info {
    flex: 1;
    min-width: 0;
}

.ticket-subject {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ticket-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

.ticket-meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Ticket Badges */
.ticket-badges {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Empty Tickets State */
.tickets-empty {
    padding: 80px 40px;
    text-align: center;
}

.tickets-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--bg-tertiary, #f1f5f9);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tickets-empty-icon svg {
    width: 40px;
    height: 40px;
    color: var(--text-faint, #94a3b8);
}

.tickets-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin: 0 0 8px 0;
}

.tickets-empty p {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    margin: 0 0 24px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Create Ticket Button */
.btn-create-ticket {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-create-ticket:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.btn-create-ticket svg {
    width: 20px;
    height: 20px;
}

/* Modern Modal */
.tickets-modal .modal-content {
    max-width: 520px;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
}

.tickets-modal .modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-medium, #e2e8f0);
    margin: 0;
}

.tickets-modal .modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.tickets-modal .modal-body {
    padding: 28px;
}

.tickets-modal .modal-footer {
    padding: 20px 28px;
    background: var(--bg-tertiary, #f8fafc);
    border-top: 1px solid var(--border-medium, #e2e8f0);
    margin: 0;
}

/* Form Enhancements */
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin-bottom: 8px;
}

.form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 10px;
    font-size: 15px;
    background: var(--input-bg, #fff);
    color: var(--text-body, #374151);
    transition: all 0.15s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
    color: var(--text-faint, #94a3b8);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

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

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

/* Responsive */
@media (max-width: 1024px) {
    .tickets-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tickets-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .tickets-page-header h1 {
        font-size: 24px;
    }
    
    .btn-create-ticket {
        width: 100%;
        justify-content: center;
    }
    
    .tickets-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .ticket-stat-card {
        padding: 16px;
    }
    
    .ticket-stat-icon {
        width: 44px;
        height: 44px;
    }
    
    .ticket-stat-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .ticket-stat-content .stat-value {
        font-size: 24px;
    }
    
    .ticket-row {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .ticket-badges {
        width: 100%;
        justify-content: flex-start;
    }
    
    .ticket-meta {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .tickets-stats {
        grid-template-columns: 1fr;
    }
    
    .ticket-meta-item:nth-child(3) {
        display: none;
    }
}

/* ========================================
   ADMIN NOTIFICATIONS PAGE - MODERN SAAS DESIGN
   ======================================== */

/* Notifications Page Header */
.notif-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    gap: 24px;
    flex-wrap: wrap;
}

.notif-page-header-left h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notif-page-header-left h1 svg {
    width: 28px;
    height: 28px;
    color: var(--primary-color, #4f46e5);
}

.notif-page-header-left p {
    font-size: 15px;
    color: var(--text-muted, #64748b);
    margin: 0;
}

/* Send Notification Button */
.btn-send-notif {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-send-notif:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.btn-send-notif svg {
    width: 20px;
    height: 20px;
}

/* Notification Stats Row */
.notif-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.notif-stat-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.notif-stat-card:hover {
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.notif-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-stat-icon svg {
    width: 24px;
    height: 24px;
}

.notif-stat-icon.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.notif-stat-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.notif-stat-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.notif-stat-icon.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.notif-stat-content h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notif-stat-content .notif-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
    line-height: 1;
}

/* Notifications Container */
.notif-container {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 16px;
    overflow: hidden;
}

/* Filters Bar */
.notif-filters-bar {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-medium, #e2e8f0);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.notif-search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.notif-search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-faint, #94a3b8);
}

.notif-search-box input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 10px;
    font-size: 14px;
    background: var(--input-bg, #fff);
    color: var(--text-body, #374151);
    transition: all 0.15s ease;
}

.notif-search-box input:focus {
    outline: none;
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.notif-search-box input::placeholder {
    color: var(--text-faint, #94a3b8);
}

.notif-filter-select {
    padding: 10px 36px 10px 14px;
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 10px;
    font-size: 14px;
    background: var(--input-bg, #fff);
    color: var(--text-body, #374151);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 16px;
    min-width: 140px;
}

.notif-filter-select:focus {
    outline: none;
    border-color: var(--primary-color, #4f46e5);
}

.notif-filter-btn {
    padding: 10px 16px;
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-tertiary, #f8fafc);
    color: var(--text-body, #374151);
    cursor: pointer;
    transition: all 0.15s ease;
}

.notif-filter-btn:hover {
    background: var(--bg-hover, #f1f5f9);
    border-color: var(--text-faint, #94a3b8);
}

.notif-clear-filters {
    color: var(--primary-color, #4f46e5);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.notif-clear-filters:hover {
    text-decoration: underline;
}

/* Notification List */
.notif-list {
    display: flex;
    flex-direction: column;
}

/* Notification Item */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light, #f1f5f9);
    transition: all 0.15s ease;
}

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

.notif-item:hover {
    background: var(--bg-hover, #f8fafc);
}

/* Notification Type Icon */
.notif-type-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-type-badge svg {
    width: 22px;
    height: 22px;
}

.notif-type-badge.info {
    background: #dbeafe;
    color: #2563eb;
}

.notif-type-badge.success {
    background: #dcfce7;
    color: #16a34a;
}

.notif-type-badge.warning {
    background: #fef3c7;
    color: #d97706;
}

.notif-type-badge.error {
    background: #fee2e2;
    color: #dc2626;
}

[data-theme="dark"] .notif-type-badge.info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

[data-theme="dark"] .notif-type-badge.success {
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
}

[data-theme="dark"] .notif-type-badge.warning {
    background: rgba(217, 119, 6, 0.15);
    color: #fbbf24;
}

[data-theme="dark"] .notif-type-badge.error {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
}

/* Notification Content */
.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin: 0 0 6px 0;
}

.notif-item-message {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    margin: 0 0 10px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.notif-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted, #64748b);
}

.notif-meta-tag svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.notif-recipient-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: var(--bg-tertiary, #f1f5f9);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted, #64748b);
}

.notif-recipient-tag svg {
    width: 12px;
    height: 12px;
}

.notif-recipient-tag.global {
    background: #dbeafe;
    color: #2563eb;
}

[data-theme="dark"] .notif-recipient-tag {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

[data-theme="dark"] .notif-recipient-tag.global {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

/* Notification Actions */
.notif-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.notif-delete-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-faint, #94a3b8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.notif-delete-btn svg {
    width: 18px;
    height: 18px;
}

.notif-delete-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

[data-theme="dark"] .notif-delete-btn:hover {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
}

/* Empty Notifications State */
.notif-empty {
    padding: 80px 40px;
    text-align: center;
}

.notif-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--bg-tertiary, #f1f5f9);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-empty-icon svg {
    width: 40px;
    height: 40px;
    color: var(--text-faint, #94a3b8);
}

.notif-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin: 0 0 8px 0;
}

.notif-empty p {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    margin: 0 0 24px 0;
}

/* Pagination */
.notif-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--border-medium, #e2e8f0);
    background: var(--bg-secondary, #f8fafc);
}

.notif-pagination-info {
    font-size: 14px;
    color: var(--text-muted, #64748b);
}

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

.notif-pagination-links a,
.notif-pagination-links span {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.notif-pagination-links a {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    color: var(--text-body, #374151);
}

.notif-pagination-links a:hover {
    border-color: var(--primary-color, #4f46e5);
    color: var(--primary-color, #4f46e5);
}

.notif-pagination-links a.active {
    background: var(--primary-color, #4f46e5);
    border-color: var(--primary-color, #4f46e5);
    color: white;
}

.notif-pagination-links span.disabled {
    background: var(--bg-tertiary, #f1f5f9);
    border: 1px solid var(--border-medium, #e2e8f0);
    color: var(--text-faint, #94a3b8);
    cursor: not-allowed;
}

/* Send Modal Enhancements */
.notif-modal .modal-content {
    max-width: 540px;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
}

.notif-modal .modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-medium, #e2e8f0);
}

.notif-modal .modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notif-modal .modal-header h2 svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color, #4f46e5);
}

.notif-modal .modal-body {
    padding: 28px;
}

.notif-modal .modal-footer {
    padding: 20px 28px;
    background: var(--bg-tertiary, #f8fafc);
    border-top: 1px solid var(--border-medium, #e2e8f0);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Form Row (2 columns) */
.notif-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Type Preview in Select */
.notif-type-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive */
@media (max-width: 1024px) {
    .notif-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .notif-page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-send-notif {
        width: 100%;
        justify-content: center;
    }
    
    .notif-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .notif-stat-card {
        padding: 16px;
    }
    
    .notif-stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .notif-stat-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .notif-stat-content .notif-stat-value {
        font-size: 22px;
    }
    
    .notif-filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .notif-search-box {
        max-width: 100%;
    }
    
    .notif-filter-select {
        width: 100%;
    }
    
    .notif-item {
        flex-wrap: wrap;
    }
    
    .notif-item-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }
    
    .notif-form-row {
        grid-template-columns: 1fr;
    }
    
    .notif-pagination {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .notif-stats-row {
        grid-template-columns: 1fr;
    }
    
    .notif-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ========================================
   ADMIN SETTINGS PAGE - MODERN SAAS DESIGN
   ======================================== */

/* Settings Page Header */
.settings-page-header {
    margin-bottom: 32px;
}

.settings-page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-page-header h1 svg {
    width: 28px;
    height: 28px;
    color: var(--primary-color, #4f46e5);
}

.settings-page-header p {
    font-size: 15px;
    color: var(--text-muted, #64748b);
    margin: 0;
}

/* Settings Layout */
.settings-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
}

/* Settings Sidebar Navigation */
.settings-sidebar {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 16px;
    padding: 8px;
    position: sticky;
    top: 24px;
}

.settings-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.settings-nav-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.settings-nav-link:hover {
    background: var(--bg-hover, #f8fafc);
    color: var(--text-heading, #0f172a);
}

.settings-nav-link.active {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.settings-nav-link.active svg {
    color: white;
}

.settings-nav-divider {
    height: 1px;
    background: var(--border-light, #f1f5f9);
    margin: 8px 12px;
}

/* Settings Main Content */
.settings-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Settings Card */
.settings-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 16px;
    overflow: hidden;
}

.settings-card-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-medium, #e2e8f0);
}

.settings-card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-card-header h2 svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color, #4f46e5);
}

.settings-card-header p {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    margin: 0;
}

.settings-card-body {
    padding: 28px;
}

.settings-card-footer {
    padding: 20px 28px;
    background: var(--bg-secondary, #f8fafc);
    border-top: 1px solid var(--border-medium, #e2e8f0);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Settings Form */
.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

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

.settings-form-group {
    display: flex;
    flex-direction: column;
}

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

.settings-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.settings-label .required {
    color: #ef4444;
}

.settings-label .optional {
    font-weight: 400;
    color: var(--text-faint, #94a3b8);
    font-size: 13px;
}

.settings-input {
    padding: 12px 16px;
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 10px;
    font-size: 15px;
    background: var(--input-bg, #fff);
    color: var(--text-body, #374151);
    transition: all 0.15s ease;
    width: 100%;
}

.settings-input:focus {
    outline: none;
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.settings-input::placeholder {
    color: var(--text-faint, #94a3b8);
}

.settings-input-hint {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    margin-top: 6px;
}

.settings-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* Logo Upload Section */
.logo-upload-section {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 24px;
    background: var(--bg-tertiary, #f8fafc);
    border-radius: 12px;
    margin-bottom: 24px;
}

.logo-preview-box {
    width: 160px;
    height: 80px;
    background: var(--card-bg, #fff);
    border: 2px dashed var(--border-medium, #e2e8f0);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-preview-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-preview-box.has-logo {
    border-style: solid;
    border-color: var(--border-medium, #e2e8f0);
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-faint, #94a3b8);
}

.logo-placeholder svg {
    width: 24px;
    height: 24px;
}

.logo-placeholder span {
    font-size: 11px;
}

.logo-upload-info {
    flex: 1;
}

.logo-upload-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin: 0 0 6px 0;
}

.logo-upload-info p {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.logo-upload-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* File Input Custom */
.file-input-wrapper {
    position: relative;
    display: inline-block;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--primary-color, #4f46e5);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.file-input-btn:hover {
    background: var(--primary-dark, #4338ca);
}

.file-input-btn svg {
    width: 18px;
    height: 18px;
}

/* Settings Save Button */
.btn-settings-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-settings-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.btn-settings-save:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-settings-save svg {
    width: 18px;
    height: 18px;
}

.btn-settings-save.saving .btn-text {
    display: none;
}

.btn-settings-save .btn-loading {
    display: none;
}

.btn-settings-save.saving .btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Test Connection Button */
.btn-test-connection {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-tertiary, #f1f5f9);
    color: var(--text-body, #374151);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-test-connection:hover {
    background: var(--bg-hover, #e2e8f0);
    border-color: var(--text-faint, #94a3b8);
}

.btn-test-connection svg {
    width: 18px;
    height: 18px;
}

/* Delete Logo Button */
.btn-delete-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-delete-logo:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.btn-delete-logo svg {
    width: 18px;
    height: 18px;
}

[data-theme="dark"] .btn-delete-logo {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
}

[data-theme="dark"] .btn-delete-logo:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Toast Notification */
.settings-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.settings-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.settings-toast.success {
    background: #059669;
    color: white;
}

.settings-toast.error {
    background: #dc2626;
    color: white;
}

.settings-toast svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.settings-toast-close {
    background: transparent;
    border: none;
    color: white;
    opacity: 0.7;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
}

.settings-toast-close:hover {
    opacity: 1;
}

.settings-toast-close svg {
    width: 16px;
    height: 16px;
}

/* Loading Spinner */
.settings-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: settings-spin 0.8s linear infinite;
}

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

/* Status Badge */
.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.connection-status.connected {
    background: #dcfce7;
    color: #166534;
}

.connection-status.disconnected {
    background: #fee2e2;
    color: #991b1b;
}

.connection-status.unknown {
    background: var(--bg-tertiary, #f1f5f9);
    color: var(--text-muted, #64748b);
}

.connection-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.connection-status.connected .connection-status-dot {
    background: #22c55e;
}

.connection-status.disconnected .connection-status-dot {
    background: #ef4444;
}

.connection-status.unknown .connection-status-dot {
    background: var(--text-faint, #94a3b8);
}

[data-theme="dark"] .connection-status.connected {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

[data-theme="dark"] .connection-status.disconnected {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Section Visible/Hidden */
.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

/* Responsive */
@media (max-width: 900px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }
    
    .settings-sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }
    
    .settings-nav-link {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        padding: 12px 14px;
    }
    
    .settings-nav-divider {
        display: none;
    }
}

@media (max-width: 768px) {
    .settings-form-grid {
        grid-template-columns: 1fr;
    }
    
    .logo-upload-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .logo-preview-box {
        width: 100%;
        height: 100px;
    }
    
    .settings-card-footer {
        flex-direction: column;
    }
    
    .btn-settings-save {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   CLIENT TICKET VIEW PAGE - MODERN SAAS DESIGN
   ======================================== */

/* Back Button */
.ticket-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 10px;
    color: var(--text-muted, #64748b);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    margin-bottom: 24px;
}

.ticket-back-btn:hover {
    background: var(--bg-hover, #f8fafc);
    color: var(--text-heading, #0f172a);
    border-color: var(--text-faint, #94a3b8);
}

.ticket-back-btn svg {
    width: 18px;
    height: 18px;
}

/* Ticket Header Card */
.ticket-header-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
}

.ticket-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.ticket-header-info {
    flex: 1;
    min-width: 200px;
}

.ticket-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.ticket-meta-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ticket-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted, #64748b);
}

.ticket-meta-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.ticket-badges-group {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Priority Badge Redesign */
.ticket-priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ticket-priority-badge.low {
    background: #f1f5f9;
    color: #64748b;
}

.ticket-priority-badge.medium {
    background: #dbeafe;
    color: #1e40af;
}

.ticket-priority-badge.high {
    background: #fef3c7;
    color: #92400e;
}

.ticket-priority-badge.urgent {
    background: #fee2e2;
    color: #991b1b;
}

[data-theme="dark"] .ticket-priority-badge.low {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

[data-theme="dark"] .ticket-priority-badge.medium {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .ticket-priority-badge.high {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .ticket-priority-badge.urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Status Badge Redesign */
.ticket-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ticket-status-badge .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.ticket-status-badge.open {
    background: #fef3c7;
    color: #92400e;
}

.ticket-status-badge.open .status-dot {
    background: #f59e0b;
}

.ticket-status-badge.in_progress {
    background: #dbeafe;
    color: #1e40af;
}

.ticket-status-badge.in_progress .status-dot {
    background: #3b82f6;
    animation: pulse-dot 2s infinite;
}

.ticket-status-badge.waiting {
    background: #f3e8ff;
    color: #7c3aed;
}

.ticket-status-badge.waiting .status-dot {
    background: #8b5cf6;
}

.ticket-status-badge.resolved {
    background: #dcfce7;
    color: #166534;
}

.ticket-status-badge.resolved .status-dot {
    background: #22c55e;
}

.ticket-status-badge.closed {
    background: var(--bg-tertiary, #f1f5f9);
    color: var(--text-muted, #64748b);
}

.ticket-status-badge.closed .status-dot {
    background: var(--text-faint, #94a3b8);
}

[data-theme="dark"] .ticket-status-badge.open {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

[data-theme="dark"] .ticket-status-badge.in_progress {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

[data-theme="dark"] .ticket-status-badge.waiting {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

[data-theme="dark"] .ticket-status-badge.resolved {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Original Message Card */
.ticket-message-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 16px;
    margin-bottom: 24px;
    overflow: hidden;
}

.ticket-message-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-medium, #e2e8f0);
    background: var(--bg-secondary, #f8fafc);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-message-header svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color, #4f46e5);
}

.ticket-message-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin: 0;
}

.ticket-message-body {
    padding: 24px;
}

.ticket-description-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-body, #374151);
    white-space: pre-wrap;
}

/* Conversation Card */
.ticket-conversation-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 16px;
    overflow: hidden;
}

.ticket-conversation-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-medium, #e2e8f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-conversation-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-conversation-header h2 svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color, #4f46e5);
}

.ticket-reply-count {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    background: var(--bg-tertiary, #f1f5f9);
    padding: 4px 12px;
    border-radius: 20px;
}

.ticket-conversation-body {
    padding: 24px;
}

/* Reply Thread */
.ticket-reply-thread {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

/* Single Reply */
.ticket-reply-item {
    display: flex;
    gap: 16px;
}

.ticket-reply-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.ticket-reply-avatar.admin {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
}

.ticket-reply-avatar.client {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.ticket-reply-bubble {
    flex: 1;
    min-width: 0;
}

.ticket-reply-bubble-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.ticket-reply-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticket-reply-author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
}

.ticket-reply-author-role {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.ticket-reply-author-role.admin {
    background: #dbeafe;
    color: #1e40af;
}

.ticket-reply-author-role.client {
    background: #dcfce7;
    color: #166534;
}

[data-theme="dark"] .ticket-reply-author-role.admin {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

[data-theme="dark"] .ticket-reply-author-role.client {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.ticket-reply-time {
    font-size: 12px;
    color: var(--text-faint, #94a3b8);
}

.ticket-reply-content {
    background: var(--bg-secondary, #f8fafc);
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-body, #374151);
    white-space: pre-wrap;
}

.ticket-reply-item.admin .ticket-reply-content {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 1px solid rgba(79, 70, 229, 0.15);
}

[data-theme="dark"] .ticket-reply-content {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .ticket-reply-item.admin .ticket-reply-content {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

/* Empty Replies */
.ticket-empty-replies {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 32px;
}

.ticket-empty-replies-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--bg-tertiary, #f1f5f9);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticket-empty-replies-icon svg {
    width: 32px;
    height: 32px;
    color: var(--text-faint, #94a3b8);
}

.ticket-empty-replies p {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    margin: 0;
}

/* Reply Form */
.ticket-reply-form {
    border-top: 1px solid var(--border-medium, #e2e8f0);
    padding-top: 24px;
}

.ticket-reply-form-header {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticket-reply-form-header svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color, #4f46e5);
}

.ticket-reply-textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.6;
    background: var(--input-bg, #fff);
    color: var(--text-body, #374151);
    resize: vertical;
    min-height: 120px;
    transition: all 0.15s ease;
    font-family: inherit;
}

.ticket-reply-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.ticket-reply-textarea::placeholder {
    color: var(--text-faint, #94a3b8);
}

.ticket-reply-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.ticket-reply-hint {
    font-size: 13px;
    color: var(--text-faint, #94a3b8);
}

.btn-send-reply {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-send-reply:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.btn-send-reply:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-send-reply svg {
    width: 18px;
    height: 18px;
}

.btn-send-reply .btn-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-send-reply .btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

.btn-send-reply.sending .btn-text {
    display: none;
}

.btn-send-reply.sending .btn-loading {
    display: flex;
}

/* Closed Ticket Banner */
.ticket-closed-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-tertiary, #f1f5f9);
    border-radius: 12px;
    margin-top: 24px;
}

.ticket-closed-banner svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted, #64748b);
    flex-shrink: 0;
}

.ticket-closed-banner p {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-header-top {
        flex-direction: column;
    }
    
    .ticket-badges-group {
        width: 100%;
    }
    
    .ticket-reply-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .ticket-reply-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .ticket-reply-form-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-send-reply {
        width: 100%;
        justify-content: center;
    }
}

/* ===========================================
   CLIENT TICKET VIEW - MODERN SAAS REDESIGN
   =========================================== */

/* Back Navigation */
.ticket-view-nav {
    margin-bottom: 24px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 10px;
    color: var(--text-body, #374151);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: var(--bg-hover, #f8fafc);
    border-color: var(--primary-color, #4f46e5);
    color: var(--primary-color, #4f46e5);
    transform: translateX(-2px);
}

.btn-back svg {
    width: 16px;
    height: 16px;
}

/* Ticket Header Card */
.ticket-header-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
}

.ticket-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.ticket-header-info {
    flex: 1;
    min-width: 0;
}

.ticket-id-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 8px;
    color: var(--primary-color, #4f46e5);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.ticket-id-badge svg {
    width: 16px;
    height: 16px;
}

.ticket-subject {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading, #0f172a);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.ticket-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.ticket-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

.ticket-meta-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.ticket-badges-group {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* Priority Badge Redesign */
.ticket-priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-priority-badge svg {
    width: 14px;
    height: 14px;
}

.ticket-priority-badge.low {
    background: #f1f5f9;
    color: #64748b;
}

.ticket-priority-badge.medium {
    background: #dbeafe;
    color: #1e40af;
}

.ticket-priority-badge.high {
    background: #fef3c7;
    color: #92400e;
}

.ticket-priority-badge.urgent {
    background: #fee2e2;
    color: #991b1b;
    animation: urgent-pulse 2s infinite;
}

@keyframes urgent-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* Alert Enhancements */
.alert-dismissible {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    animation: slideIn 0.3s ease;
}

.alert-dismissible svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert-dismissible span {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0;
    margin-left: auto;
}

.alert-close:hover {
    opacity: 1;
}

.alert-animate {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reply Highlight Animation */
.reply-highlight {
    animation: highlightReply 2s ease;
}

@keyframes highlightReply {
    0% {
        background: rgba(79, 70, 229, 0.1);
        border-radius: 12px;
    }
    100% {
        background: transparent;
    }
}

/* Spinner Animation */
.spinner {
    animation: spin 1s linear infinite;
    width: 18px;
    height: 18px;
}

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

/* Dark Mode Enhancements for Client Ticket View */
[data-theme="dark"] .btn-back {
    background: var(--card-bg);
    border-color: var(--border-medium);
    color: var(--text-body);
}

[data-theme="dark"] .btn-back:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

[data-theme="dark"] .ticket-header-card {
    background: var(--card-bg);
    border-color: var(--border-medium);
}

[data-theme="dark"] .ticket-id-badge {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
}

[data-theme="dark"] .ticket-subject {
    color: var(--text-heading);
}

[data-theme="dark"] .ticket-meta-item {
    color: var(--text-muted);
}

[data-theme="dark"] .ticket-priority-badge.low {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

[data-theme="dark"] .ticket-priority-badge.medium {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .ticket-priority-badge.high {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .ticket-priority-badge.urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

[data-theme="dark"] .ticket-message-card,
[data-theme="dark"] .ticket-conversation-card {
    background: var(--card-bg);
    border-color: var(--border-medium);
}

[data-theme="dark"] .ticket-message-header {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

[data-theme="dark"] .ticket-message-header h3,
[data-theme="dark"] .ticket-conversation-header h2 {
    color: var(--text-heading);
}

[data-theme="dark"] .ticket-description-text {
    color: var(--text-body);
}

[data-theme="dark"] .ticket-reply-count {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

[data-theme="dark"] .ticket-empty-replies-icon {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .ticket-empty-replies-icon svg {
    color: var(--text-faint);
}

[data-theme="dark"] .ticket-empty-replies p {
    color: var(--text-muted);
}

[data-theme="dark"] .ticket-reply-form {
    border-color: var(--border-medium);
}

[data-theme="dark"] .ticket-reply-form-header {
    color: var(--text-heading);
}

[data-theme="dark"] .ticket-reply-textarea {
    background: var(--input-bg);
    border-color: var(--border-medium);
    color: var(--text-body);
}

[data-theme="dark"] .ticket-reply-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .ticket-reply-textarea::placeholder {
    color: var(--text-faint);
}

[data-theme="dark"] .ticket-reply-hint {
    color: var(--text-faint);
}

[data-theme="dark"] .ticket-closed-banner {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .ticket-closed-banner svg,
[data-theme="dark"] .ticket-closed-banner p {
    color: var(--text-muted);
}

[data-theme="dark"] .alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

[data-theme="dark"] .alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

[data-theme="dark"] .alert-close {
    color: inherit;
}

/* Responsive Adjustments for Ticket View */
@media (max-width: 768px) {
    .ticket-header-card {
        padding: 20px;
    }
    
    .ticket-header-top {
        flex-direction: column;
        gap: 16px;
    }
    
    .ticket-subject {
        font-size: 20px;
    }
    
    .ticket-badges-group {
        width: 100%;
    }
    
    .ticket-meta-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .ticket-message-card,
    .ticket-conversation-card {
        border-radius: 12px;
    }
    
    .ticket-message-body,
    .ticket-conversation-body {
        padding: 16px;
    }
    
    .ticket-message-header,
    .ticket-conversation-header {
        padding: 14px 16px;
    }
}

/* ===========================================
   PROFESSIONAL TICKET CHAT SYSTEM
   =========================================== */

/* Chat Page Layout */
.ticket-chat-page {
    padding: 0 !important;
    height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
}

.ticket-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-primary, #fff);
    border-left: 1px solid var(--border-medium, #e2e8f0);
}

/* Chat Header */
.ticket-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--card-bg, #fff);
    border-bottom: 1px solid var(--border-medium, #e2e8f0);
    flex-shrink: 0;
    gap: 16px;
}

.ticket-chat-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1;
}

.ticket-chat-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-body, #374151);
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ticket-chat-back:hover {
    background: var(--bg-tertiary, #f1f5f9);
    color: var(--primary-color, #4f46e5);
}

.ticket-chat-back svg {
    width: 20px;
    height: 20px;
}

.ticket-chat-title-group {
    min-width: 0;
}

.ticket-chat-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.ticket-chat-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

.ticket-chat-id {
    font-weight: 500;
    color: var(--primary-color, #4f46e5);
}

.ticket-chat-dot {
    opacity: 0.4;
}

.ticket-chat-header-right {
    flex-shrink: 0;
}

.ticket-chat-badges {
    display: flex;
    gap: 8px;
}

.ticket-chat-priority {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ticket-chat-priority .priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.ticket-chat-priority.low {
    background: #f1f5f9;
    color: #64748b;
}
.ticket-chat-priority.low .priority-dot { background: #94a3b8; }

.ticket-chat-priority.medium {
    background: #dbeafe;
    color: #1e40af;
}
.ticket-chat-priority.medium .priority-dot { background: #3b82f6; }

.ticket-chat-priority.high {
    background: #fef3c7;
    color: #92400e;
}
.ticket-chat-priority.high .priority-dot { background: #f59e0b; }

.ticket-chat-priority.urgent {
    background: #fee2e2;
    color: #991b1b;
}
.ticket-chat-priority.urgent .priority-dot { 
    background: #ef4444;
    animation: pulse-urgent 1.5s infinite;
}

@keyframes pulse-urgent {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.ticket-chat-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.ticket-chat-status svg {
    width: 14px;
    height: 14px;
}

.ticket-chat-status.open {
    background: #fef3c7;
    color: #92400e;
}

.ticket-chat-status.in_progress {
    background: #dbeafe;
    color: #1e40af;
}

.ticket-chat-status.waiting {
    background: #f3e8ff;
    color: #7c3aed;
}

.ticket-chat-status.resolved {
    background: #dcfce7;
    color: #166534;
}

.ticket-chat-status.closed {
    background: var(--bg-tertiary, #f1f5f9);
    color: var(--text-muted, #64748b);
}

/* Chat Alerts */
.ticket-chat-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ticket-chat-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ticket-chat-alert span {
    flex: 1;
}

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

.ticket-chat-alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-dismiss {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0;
}

.alert-dismiss:hover {
    opacity: 1;
}

.alert-dismiss svg {
    width: 16px;
    height: 16px;
}

/* Chat Messages Area */
.ticket-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-secondary, #f8fafc);
}

/* Date Divider */
.ticket-chat-date-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
}

.ticket-chat-date-divider span {
    padding: 6px 16px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted, #64748b);
}

/* Chat Message */
.chat-message {
    display: flex;
    gap: 12px;
    max-width: 85%;
    animation: fadeInUp 0.3s ease;
}

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

.chat-message.client {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message.admin {
    align-self: flex-start;
}

.chat-message.new-message {
    animation: popIn 0.4s ease;
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.9) translateY(10px); }
    50% { transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.chat-message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.chat-message-avatar.client,
.chat-message.client .chat-message-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.chat-message-avatar.admin,
.chat-message.admin .chat-message-avatar {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.chat-message-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.chat-message.client .chat-message-content {
    align-items: flex-end;
}

.chat-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.chat-message.client .chat-message-header {
    flex-direction: row-reverse;
}

.chat-message-author {
    font-weight: 600;
    color: var(--text-heading, #0f172a);
}

.chat-message-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-message-badge.original {
    background: #dbeafe;
    color: #1e40af;
}

.chat-message-badge.support {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
}

.chat-message-time {
    color: var(--text-faint, #94a3b8);
    font-size: 12px;
}

.chat-message-bubble {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chat-message.client .chat-message-bubble {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.admin .chat-message-bubble {
    border-bottom-left-radius: 4px;
}

.chat-message-text {
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
}

.chat-message.client .chat-message-text {
    color: white;
}

/* Waiting for Response */
.chat-waiting-response {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

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

.chat-waiting-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--card-bg, #fff);
    border: 2px solid var(--border-medium, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

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

.chat-waiting-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary-color, #4f46e5);
}

.chat-waiting-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading, #0f172a);
    margin-bottom: 4px;
}

.chat-waiting-text p {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    margin: 0;
}

/* Chat Input Area */
.ticket-chat-input-area {
    padding: 16px 24px;
    background: var(--card-bg, #fff);
    border-top: 1px solid var(--border-medium, #e2e8f0);
    flex-shrink: 0;
}

.ticket-chat-form {
    max-width: 100%;
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.chat-input-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.chat-input-field {
    flex: 1;
    background: var(--bg-secondary, #f8fafc);
    border: 1px solid var(--border-medium, #e2e8f0);
    border-radius: 16px;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.chat-input-field:focus-within {
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.chat-input-field textarea {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-body, #374151);
    resize: none;
    outline: none;
    font-family: inherit;
    min-height: 24px;
    max-height: 150px;
}

.chat-input-field textarea::placeholder {
    color: var(--text-faint, #94a3b8);
}

.chat-input-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light, #f1f5f9);
}

.chat-input-hint {
    font-size: 12px;
    color: var(--text-faint, #94a3b8);
}

.chat-send-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.chat-send-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.chat-send-btn svg {
    width: 16px;
    height: 16px;
}

.chat-send-btn .btn-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-send-btn .btn-loading {
    display: none;
    align-items: center;
    gap: 6px;
}

.chat-send-btn.loading .btn-content {
    display: none;
}

.chat-send-btn.loading .btn-loading {
    display: flex;
}

.chat-send-btn .spinner {
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

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

/* Closed Ticket Banner */
.ticket-chat-closed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: var(--bg-tertiary, #f1f5f9);
    border-top: 1px solid var(--border-medium, #e2e8f0);
    font-size: 14px;
    color: var(--text-muted, #64748b);
    flex-shrink: 0;
}

.ticket-chat-closed svg {
    width: 18px;
    height: 18px;
}

.ticket-chat-closed a {
    color: var(--primary-color, #4f46e5);
    text-decoration: none;
    font-weight: 500;
}

.ticket-chat-closed a:hover {
    text-decoration: underline;
}

/* Dark Mode */
[data-theme="dark"] .ticket-chat-container {
    background: var(--bg-primary);
    border-color: var(--border-medium);
}

[data-theme="dark"] .ticket-chat-header {
    background: var(--card-bg);
    border-color: var(--border-medium);
}

[data-theme="dark"] .ticket-chat-back {
    background: var(--bg-secondary);
    color: var(--text-body);
}

[data-theme="dark"] .ticket-chat-back:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .ticket-chat-title {
    color: var(--text-heading);
}

[data-theme="dark"] .ticket-chat-subtitle {
    color: var(--text-muted);
}

[data-theme="dark"] .ticket-chat-priority.low {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

[data-theme="dark"] .ticket-chat-priority.medium {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .ticket-chat-priority.high {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .ticket-chat-priority.urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

[data-theme="dark"] .ticket-chat-status.open {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .ticket-chat-status.in_progress {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .ticket-chat-status.waiting {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

[data-theme="dark"] .ticket-chat-status.resolved {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .ticket-chat-status.closed {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

[data-theme="dark"] .ticket-chat-alert.success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

[data-theme="dark"] .ticket-chat-alert.error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

[data-theme="dark"] .ticket-chat-messages {
    background: var(--bg-secondary);
}

[data-theme="dark"] .ticket-chat-date-divider span {
    background: var(--card-bg);
    border-color: var(--border-medium);
    color: var(--text-muted);
}

[data-theme="dark"] .chat-message-author {
    color: var(--text-heading);
}

[data-theme="dark"] .chat-message-badge.original {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .chat-message-bubble {
    background: var(--card-bg);
    border-color: var(--border-medium);
}

[data-theme="dark"] .chat-message-text {
    color: var(--text-body);
}

[data-theme="dark"] .chat-message.client .chat-message-text {
    color: white;
}

[data-theme="dark"] .chat-waiting-icon {
    background: var(--card-bg);
    border-color: var(--border-medium);
}

[data-theme="dark"] .chat-waiting-text h4 {
    color: var(--text-heading);
}

[data-theme="dark"] .chat-waiting-text p {
    color: var(--text-muted);
}

[data-theme="dark"] .ticket-chat-input-area {
    background: var(--card-bg);
    border-color: var(--border-medium);
}

[data-theme="dark"] .chat-input-field {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

[data-theme="dark"] .chat-input-field:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .chat-input-field textarea {
    color: var(--text-body);
}

[data-theme="dark"] .chat-input-field textarea::placeholder {
    color: var(--text-faint);
}

[data-theme="dark"] .chat-input-actions {
    border-color: var(--border-light);
}

[data-theme="dark"] .chat-input-hint {
    color: var(--text-faint);
}

[data-theme="dark"] .ticket-chat-closed {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-chat-header {
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    
    .ticket-chat-header-left {
        width: 100%;
    }
    
    .ticket-chat-header-right {
        width: 100%;
        padding-left: 56px;
    }
    
    .ticket-chat-badges {
        flex-wrap: wrap;
    }
    
    .ticket-chat-messages {
        padding: 16px;
    }
    
    .chat-message {
        max-width: 95%;
    }
    
    .ticket-chat-input-area {
        padding: 12px 16px;
    }
    
    .chat-input-avatar {
        display: none;
    }
    
    .chat-input-hint {
        display: none;
    }
}

/* ===========================================
   DATA SOURCES STYLES
   =========================================== */

/* Placeholder Help Grid */
.placeholder-help {
    padding: 12px 0;
}

.placeholder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.placeholder-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.placeholder-item code {
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    color: var(--primary-color);
}

.placeholder-help-compact {
    background: var(--bg-alt);
    padding: 12px;
    border-radius: 8px;
}

.placeholder-help-compact code {
    background: var(--card-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
}

/* URL Template Cell */
.url-template-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.url-template-cell code {
    background: var(--bg-alt);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    word-break: break-all;
}

/* Data Sources Grid (Client View) */
.data-sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.data-source-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.data-source-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.data-source-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.data-source-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.data-source-icon svg {
    width: 24px;
    height: 24px;
}

.data-source-info h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-heading);
}

.data-source-info p {
    margin: 0;
    color: var(--text-muted);
}

.data-source-url {
    background: var(--bg-alt);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.data-source-url label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.url-display {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.url-display code {
    flex: 1;
    background: var(--card-bg);
    padding: 10px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
    line-height: 1.5;
    border: 1px solid var(--border-color);
}

.url-display .btn-icon {
    flex-shrink: 0;
    padding: 8px;
}

.data-source-actions {
    margin-bottom: 16px;
}

.data-source-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-faint);
}

.data-source-meta svg {
    width: 14px;
    height: 14px;
}

/* Page Header with Date */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 24px;
}

.page-header-content h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-heading);
}

.page-header-content h1 svg {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.current-date-box {
    background: var(--primary-light);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 16px 24px;
    text-align: center;
    min-width: 180px;
}

.current-date-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.current-date-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: monospace;
}

.current-date-full {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Info Card */
.info-card {
    display: flex;
    gap: 16px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.info-card-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-card-icon svg {
    width: 20px;
    height: 20px;
}

.info-card-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading);
}

.info-card-content p {
    margin: 0;
    color: var(--text-body);
    line-height: 1.6;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--bg-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon svg {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
}

.empty-state h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-heading);
}

.empty-state p {
    margin: 0;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
}

/* Utility Classes */
.mt-3 { margin-top: 12px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.btn-block { display: block; width: 100%; text-align: center; }
.icon-xs { width: 12px; height: 12px; }
.text-xs { font-size: 11px; }

/* Responsive Data Sources */
@media (max-width: 768px) {
    .data-sources-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
    }
    
    .current-date-box {
        width: 100%;
    }
    
    .placeholder-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode Adjustments */
[data-theme="dark"] .data-source-card {
    background: var(--card-bg);
}

[data-theme="dark"] .data-source-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .url-display code {
    background: var(--bg-alt);
}

[data-theme="dark"] .placeholder-item code {
    background: var(--card-bg);
}

[data-theme="dark"] .current-date-box {
    background: rgba(79, 70, 229, 0.1);
}

/* ===========================================
   COMPACT ACTIVITY LOG STYLES
   =========================================== */

/* Activity Filters */
.activity-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    background: var(--card-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Compact Activity List */
.activity-list-compact {
    max-height: 500px;
    overflow-y: auto;
}

.activity-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.activity-row:last-child {
    border-bottom: none;
}

.activity-row:hover {
    background: var(--bg-alt);
}

.activity-icon-compact {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon-compact svg {
    width: 16px;
    height: 16px;
}

.activity-icon-compact.login {
    background: #dcfce7;
    color: #16a34a;
}

.activity-icon-compact.logout {
    background: #fef3c7;
    color: #d97706;
}

.activity-icon-compact.file {
    background: #dbeafe;
    color: #2563eb;
}

.activity-icon-compact.ticket {
    background: #f3e8ff;
    color: #9333ea;
}

.activity-icon-compact.view {
    background: #e0e7ff;
    color: #4f46e5;
}

.activity-icon-compact.default {
    background: var(--bg-alt);
    color: var(--text-muted);
}

.activity-details {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.activity-desc {
    font-size: 13px;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-ip {
    font-size: 11px;
    color: var(--text-faint);
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.activity-timestamp {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Empty Icon for Activity */
.empty-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.empty-state-small .empty-icon {
    display: block;
    margin: 0 auto 12px;
}

/* Dark Mode Adjustments for Activity */
[data-theme="dark"] .activity-icon-compact.login {
    background: rgba(22, 163, 74, 0.15);
}

[data-theme="dark"] .activity-icon-compact.logout {
    background: rgba(217, 119, 6, 0.15);
}

[data-theme="dark"] .activity-icon-compact.file {
    background: rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .activity-icon-compact.ticket {
    background: rgba(147, 51, 234, 0.15);
}

[data-theme="dark"] .activity-icon-compact.view {
    background: rgba(79, 70, 229, 0.15);
}

[data-theme="dark"] .filter-btn {
    background: var(--card-bg);
}

[data-theme="dark"] .filter-btn:hover {
    background: var(--bg-alt);
}

[data-theme="dark"] .activity-ip {
    background: var(--card-bg);
}

/* Responsive Activity */
@media (max-width: 768px) {
    .activity-filters {
        width: 100%;
        justify-content: flex-start;
        margin-top: 12px;
    }
    
    .card-header:has(.activity-filters) {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .activity-row {
        padding: 8px 12px;
    }
    
    .activity-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .activity-desc {
        white-space: normal;
    }
}

/* ===========================================
   COMPACT NOTIFICATIONS PAGE STYLES
   =========================================== */

/* Compact Page Header */
.page-header-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.page-header-compact h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-count {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 4px 10px;
    border-radius: 12px;
}

/* Stats Pills */
.stats-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.stat-pill:hover {
    border-color: var(--primary-color);
}

.stat-pill.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.stat-pill.active .stat-pill-count,
.stat-pill.active .stat-pill-label {
    color: white;
}

.stat-pill-count {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-heading);
}

.stat-pill-label {
    font-size: 12px;
    color: var(--text-muted);
}

.stat-pill.info:not(.active):hover { border-color: #3b82f6; }
.stat-pill.success:not(.active):hover { border-color: #22c55e; }
.stat-pill.warning:not(.active):hover { border-color: #f59e0b; }
.stat-pill.error:not(.active):hover { border-color: #ef4444; }

.stat-pill.info.active { background: #3b82f6; border-color: #3b82f6; }
.stat-pill.success.active { background: #22c55e; border-color: #22c55e; }
.stat-pill.warning.active { background: #f59e0b; border-color: #f59e0b; }
.stat-pill.error.active { background: #ef4444; border-color: #ef4444; }

/* Card Header Compact */
.card-header-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.search-input-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 300px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
}

.search-input-compact svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input-compact input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: var(--text-body);
    width: 100%;
}

.results-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

/* Compact Table */
.compact-table {
    font-size: 13px;
}

.compact-table th {
    padding: 10px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.compact-table td {
    padding: 10px 12px;
    vertical-align: middle;
}

.compact-table tbody tr {
    transition: background 0.1s ease;
}

.compact-table tbody tr:hover {
    background: var(--bg-alt);
}

/* Type Badge Compact */
.type-badge-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.type-badge-compact svg {
    width: 16px;
    height: 16px;
}

.type-badge-compact.info { background: #dbeafe; color: #2563eb; }
.type-badge-compact.success { background: #dcfce7; color: #16a34a; }
.type-badge-compact.warning { background: #fef3c7; color: #d97706; }
.type-badge-compact.error { background: #fee2e2; color: #dc2626; }

/* Notification Cell Content */
.notif-cell-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notif-title-compact {
    font-weight: 500;
    color: var(--text-heading);
}

.notif-message-compact {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Recipient Badge */
.recipient-badge {
    display: inline-block;
    font-size: 12px;
    padding: 3px 8px;
    background: var(--bg-alt);
    border-radius: 4px;
    color: var(--text-body);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipient-badge.global {
    background: #dbeafe;
    color: #2563eb;
}

/* Time Badge */
.time-badge {
    font-size: 12px;
    color: var(--text-muted);
}

/* Delete Icon Button */
.btn-icon-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-icon-delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

.btn-icon-delete svg {
    width: 16px;
    height: 16px;
}

/* Pagination Bar */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-alt);
}

.pagination-info {
    font-size: 12px;
    color: var(--text-muted);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
    color: var(--text-body);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.pagination-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination-ellipsis {
    padding: 0 4px;
    color: var(--text-muted);
}

/* Empty State Compact */
.empty-state-compact {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-compact svg {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.empty-state-compact p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .type-badge-compact.info { background: rgba(37, 99, 235, 0.2); }
[data-theme="dark"] .type-badge-compact.success { background: rgba(22, 163, 74, 0.2); }
[data-theme="dark"] .type-badge-compact.warning { background: rgba(217, 119, 6, 0.2); }
[data-theme="dark"] .type-badge-compact.error { background: rgba(220, 38, 38, 0.2); }

[data-theme="dark"] .recipient-badge.global { background: rgba(37, 99, 235, 0.2); }

[data-theme="dark"] .btn-icon-delete:hover { background: rgba(220, 38, 38, 0.2); }

[data-theme="dark"] .pagination-bar { background: var(--card-bg); }

[data-theme="dark"] .search-input-compact { background: var(--card-bg); }

/* Responsive */
@media (max-width: 768px) {
    .page-header-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .stats-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }
    
    .card-header-compact {
        flex-wrap: wrap;
    }
    
    .search-input-compact {
        max-width: 100%;
        order: 3;
        width: 100%;
    }
    
    .pagination-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .compact-table th:nth-child(3),
    .compact-table td:nth-child(3) {
        display: none;
    }
}

/* ===========================================
   AUTOMATOR PAGE STYLES
   =========================================== */

/* Automator Stats */
.automator-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.auto-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
}

.auto-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auto-stat-icon svg {
    width: 20px;
    height: 20px;
}

.auto-stat-icon.total { background: #e0e7ff; color: #4f46e5; }
.auto-stat-icon.success { background: #dcfce7; color: #16a34a; }
.auto-stat-icon.failed { background: #fee2e2; color: #dc2626; }
.auto-stat-icon.size { background: #dbeafe; color: #2563eb; }
.auto-stat-icon.time { background: #fef3c7; color: #d97706; }

.auto-stat-info {
    display: flex;
    flex-direction: column;
}

.auto-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.2;
}

.auto-stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* Log Filters */
.log-filters {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.filter-select {
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-body);
    cursor: pointer;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Log List */
.log-list {
    max-height: 600px;
    overflow-y: auto;
}

.log-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.1s ease;
}

.log-row:last-child {
    border-bottom: none;
}

.log-row:hover {
    background: var(--bg-alt);
}

.log-status {
    flex-shrink: 0;
    padding-top: 2px;
}

.status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.status-icon svg {
    width: 18px;
    height: 18px;
}

.status-icon.success { color: #16a34a; }
.status-icon.failed { color: #dc2626; }
.status-icon.running { color: #2563eb; }
.status-icon.skipped { color: #6b7280; }

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

.log-message {
    font-size: 13px;
    color: var(--text-heading);
    margin-bottom: 4px;
    word-break: break-word;
}

.log-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.log-tag {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-alt);
    color: var(--text-muted);
}

.log-tag.user { background: #e0e7ff; color: #4f46e5; }
.log-tag.source { background: #dcfce7; color: #16a34a; }
.log-tag.file { background: #dbeafe; color: #2563eb; }
.log-tag.size { background: #fef3c7; color: #d97706; }

.log-time {
    flex-shrink: 0;
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
}

.log-date {
    display: block;
    font-size: 10px;
    color: var(--text-faint);
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 8px;
}

/* Dark Mode */
[data-theme="dark"] .auto-stat-icon.total { background: rgba(79, 70, 229, 0.2); }
[data-theme="dark"] .auto-stat-icon.success { background: rgba(22, 163, 74, 0.2); }
[data-theme="dark"] .auto-stat-icon.failed { background: rgba(220, 38, 38, 0.2); }
[data-theme="dark"] .auto-stat-icon.size { background: rgba(37, 99, 235, 0.2); }
[data-theme="dark"] .auto-stat-icon.time { background: rgba(217, 119, 6, 0.2); }

[data-theme="dark"] .log-tag.user { background: rgba(79, 70, 229, 0.2); }
[data-theme="dark"] .log-tag.source { background: rgba(22, 163, 74, 0.2); }
[data-theme="dark"] .log-tag.file { background: rgba(37, 99, 235, 0.2); }
[data-theme="dark"] .log-tag.size { background: rgba(217, 119, 6, 0.2); }

[data-theme="dark"] .filter-select {
    background: var(--bg-alt);
    border-color: var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .automator-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .log-filters {
        flex-wrap: wrap;
    }
    
    .filter-select {
        min-width: 100px;
    }
    
    .header-actions {
        flex-wrap: wrap;
    }
    
    .log-time {
        display: none;
    }
}

@media (max-width: 480px) {
    .automator-stats {
        grid-template-columns: 1fr;
    }
}

/* Activity Meta Tags for Automator */
.activity-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.activity-icon-compact.success { background: #dcfce7; color: #16a34a; }
.activity-icon-compact.failed { background: #fee2e2; color: #dc2626; }
.activity-icon-compact.running { background: #dbeafe; color: #2563eb; }
.activity-icon-compact.skipped { background: #f3f4f6; color: #6b7280; }

[data-theme="dark"] .activity-icon-compact.success { background: rgba(22, 163, 74, 0.15); }
[data-theme="dark"] .activity-icon-compact.failed { background: rgba(220, 38, 38, 0.15); }
[data-theme="dark"] .activity-icon-compact.running { background: rgba(37, 99, 235, 0.15); }
[data-theme="dark"] .activity-icon-compact.skipped { background: rgba(107, 114, 128, 0.15); }

/* ===========================================
   AUTOMATOR GROUPED RUNS STYLES
   =========================================== */

/* Run Groups Container */
.run-groups {
    border-top: 1px solid var(--border-color);
}

/* Individual Run Group */
.run-group {
    border-bottom: 1px solid var(--border-color);
}

.run-group:last-child {
    border-bottom: none;
}

/* Run Group Header */
.run-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.run-group-header:hover {
    background: var(--bg-alt);
}

.run-group-status {
    flex-shrink: 0;
}

.status-dot {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.success { background: #22c55e; }
.status-dot.warning { background: #f59e0b; }
.status-dot.failed { background: #ef4444; }

.run-group-info {
    flex: 1;
    min-width: 0;
}

.run-group-time {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-heading);
    margin-bottom: 4px;
}

.run-group-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.run-stat {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.run-stat.success { background: #dcfce7; color: #16a34a; }
.run-stat.failed { background: #fee2e2; color: #dc2626; }
.run-stat.skipped { background: #f3f4f6; color: #6b7280; }
.run-stat.size { background: #dbeafe; color: #2563eb; }

.run-group-toggle {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.run-group-toggle svg {
    width: 16px;
    height: 16px;
}

.run-group.expanded .run-group-toggle {
    transform: rotate(180deg);
}

/* Run Group Body (Logs) */
.run-group-body {
    display: none;
    background: var(--bg-alt);
    border-top: 1px solid var(--border-color);
}

.run-group.expanded .run-group-body {
    display: block;
}

/* Individual Log Item */
.run-log-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px 10px 38px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

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

.run-log-status {
    flex-shrink: 0;
    padding-top: 1px;
}

.status-icon-sm {
    width: 16px;
    height: 16px;
}

.status-icon-sm.success { color: #22c55e; }
.status-icon-sm.failed { color: #ef4444; }
.status-icon-sm.running { color: #3b82f6; }
.status-icon-sm.skipped { color: #9ca3af; }

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

.run-log-message {
    color: var(--text-body);
    word-break: break-word;
}

.run-log-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.run-log-time {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
}

/* Dark Mode */
[data-theme="dark"] .run-stat.success { background: rgba(34, 197, 94, 0.15); }
[data-theme="dark"] .run-stat.failed { background: rgba(239, 68, 68, 0.15); }
[data-theme="dark"] .run-stat.skipped { background: rgba(156, 163, 175, 0.15); }
[data-theme="dark"] .run-stat.size { background: rgba(59, 130, 246, 0.15); }

[data-theme="dark"] .run-group-body {
    background: var(--card-bg);
}

[data-theme="dark"] .run-log-item {
    border-color: var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .run-group-header {
        padding: 12px;
    }
    
    .run-log-item {
        padding: 8px 12px 8px 28px;
    }
    
    .run-log-time {
        display: none;
    }
    
    .run-group-summary {
        gap: 4px;
    }
    
    .run-stat {
        font-size: 11px;
        padding: 2px 6px;
    }
}

/* ===========================================
   CLIENTS PAGE REDESIGN
   =========================================== */

/* Search Form Inline */
.search-form-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

/* Client List */
.client-list {
    display: flex;
    flex-direction: column;
}

.client-row-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.client-row-card:last-child {
    border-bottom: none;
}

.client-row-card:hover {
    background: var(--bg-alt);
}

.client-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.client-avatar-status {
    position: relative;
    flex-shrink: 0;
}

.client-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.online-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9ca3af;
    border: 2px solid var(--card-bg);
}

.online-dot.online {
    background: #22c55e;
}

.client-info-block {
    min-width: 0;
    flex: 1;
}

.client-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-heading);
    text-decoration: none;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-name:hover {
    color: var(--primary-color);
}

.client-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.client-username {
    color: var(--text-faint);
}

.client-email {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.client-row-details {
    display: flex;
    align-items: center;
    gap: 24px;
}

.client-detail {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.detail-label {
    font-size: 10px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 12px;
    color: var(--text-body);
}

.detail-value.mono {
    font-family: monospace;
    font-size: 11px;
}

.client-row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Badge Small */
.badge-sm {
    font-size: 10px;
    padding: 3px 8px;
}

/* Stat Pill Info */
.stat-pill.info:not(.active):hover { border-color: #3b82f6; }
.stat-pill.info.active { background: #3b82f6; border-color: #3b82f6; }

/* Dark Mode */
[data-theme="dark"] .client-avatar {
    background: rgba(79, 70, 229, 0.2);
}

[data-theme="dark"] .online-dot {
    border-color: var(--card-bg);
}

[data-theme="dark"] .client-row-card:hover {
    background: var(--bg-alt);
}

/* Responsive */
@media (max-width: 992px) {
    .client-row-details {
        gap: 16px;
    }
    
    .hide-mobile {
        display: none !important;
    }
    
    .client-email {
        display: none;
    }
}

@media (max-width: 768px) {
    .client-row-card {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px;
    }
    
    .client-row-main {
        width: 100%;
    }
    
    .client-row-details {
        flex: 1;
        gap: 12px;
    }
    
    .client-row-actions {
        margin-left: auto;
    }
    
    .client-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .stats-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .client-row-details {
        display: none;
    }
    
    .client-row-card {
        justify-content: space-between;
    }
}

/* ===========================================
   TICKETS PAGE REDESIGN
   =========================================== */

/* Ticket Filters */
.ticket-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

/* Ticket List */
.ticket-list {
    display: flex;
    flex-direction: column;
}

.ticket-row-card {
    display: flex;
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.ticket-row-card:last-child {
    border-bottom: none;
}

.ticket-row-card:hover {
    background: var(--bg-alt);
}

.ticket-priority-bar {
    width: 4px;
    flex-shrink: 0;
}

.ticket-priority-bar.priority-low { background: #9ca3af; }
.ticket-priority-bar.priority-medium { background: #3b82f6; }
.ticket-priority-bar.priority-high { background: #f59e0b; }
.ticket-priority-bar.priority-urgent { background: #ef4444; }

.ticket-row-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    flex: 1;
    min-width: 0;
}

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

.ticket-info {
    min-width: 0;
}

.ticket-subject {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-heading);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-meta-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.ticket-id {
    color: var(--text-faint);
    font-family: monospace;
}

.ticket-client {
    color: var(--text-body);
}

.ticket-time {
    color: var(--text-faint);
}

.ticket-row-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Priority & Status Pills */
.priority-pill, .status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: capitalize;
}

.priority-pill.priority-low { background: #f3f4f6; color: #6b7280; }
.priority-pill.priority-medium { background: #dbeafe; color: #2563eb; }
.priority-pill.priority-high { background: #fef3c7; color: #d97706; }
.priority-pill.priority-urgent { background: #fee2e2; color: #dc2626; }

.status-pill.status-open { background: #fef3c7; color: #d97706; }
.status-pill.status-in_progress { background: #dbeafe; color: #2563eb; }
.status-pill.status-waiting { background: #f3e8ff; color: #9333ea; }
.status-pill.status-resolved { background: #dcfce7; color: #16a34a; }
.status-pill.status-closed { background: #f3f4f6; color: #6b7280; }

.reply-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 4px 8px;
    border-radius: 10px;
}

.reply-count svg {
    width: 14px;
    height: 14px;
}

.ticket-row-arrow {
    color: var(--text-faint);
    flex-shrink: 0;
}

.ticket-row-arrow svg {
    width: 18px;
    height: 18px;
}

/* Stat Pill Warning */
.stat-pill.warning:not(.active):hover { border-color: #f59e0b; }
.stat-pill.warning.active { background: #f59e0b; border-color: #f59e0b; }

/* Dark Mode */
[data-theme="dark"] .priority-pill.priority-low { background: rgba(156, 163, 175, 0.15); }
[data-theme="dark"] .priority-pill.priority-medium { background: rgba(59, 130, 246, 0.15); }
[data-theme="dark"] .priority-pill.priority-high { background: rgba(245, 158, 11, 0.15); }
[data-theme="dark"] .priority-pill.priority-urgent { background: rgba(239, 68, 68, 0.15); }

[data-theme="dark"] .status-pill.status-open { background: rgba(245, 158, 11, 0.15); }
[data-theme="dark"] .status-pill.status-in_progress { background: rgba(59, 130, 246, 0.15); }
[data-theme="dark"] .status-pill.status-waiting { background: rgba(147, 51, 234, 0.15); }
[data-theme="dark"] .status-pill.status-resolved { background: rgba(34, 197, 94, 0.15); }
[data-theme="dark"] .status-pill.status-closed { background: rgba(156, 163, 175, 0.15); }

[data-theme="dark"] .reply-count { background: var(--card-bg); }

/* Responsive */
@media (max-width: 768px) {
    .ticket-row-content {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
    }
    
    .ticket-row-main {
        width: 100%;
    }
    
    .ticket-row-badges {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .ticket-row-arrow {
        display: none;
    }
    
    .ticket-filters {
        flex-wrap: wrap;
    }
    
    .ticket-meta-line {
        flex-wrap: wrap;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .priority-pill, .status-pill {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .ticket-subject {
        font-size: 13px;
    }
}

/* =====================================================
   ADMIN DASHBOARD - Professional Redesign
   ===================================================== */

/* Welcome Header */
.dash-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 16px;
    color: white;
}

.dash-welcome-text h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: white;
}

.dash-welcome-text p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.dash-welcome-actions {
    display: flex;
    gap: 12px;
}

.dash-welcome-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

.dash-welcome-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dash-welcome-actions .btn-primary {
    background: white;
    color: #4f46e5 !important;
    border-color: white;
}

.dash-welcome-actions .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #4f46e5 !important;
}

.dash-welcome-actions .btn-primary svg {
    color: #4f46e5 !important;
    stroke: #4f46e5 !important;
}

/* Stats Cards Grid */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.dash-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    transition: all 0.2s ease;
}

.dash-stat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.dash-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dash-stat-icon svg {
    width: 24px;
    height: 24px;
}

.dash-stat-icon.clients {
    background: #e0e7ff;
    color: #4f46e5;
}

.dash-stat-icon.online {
    background: #dcfce7;
    color: #16a34a;
}

.dash-stat-icon.tickets {
    background: #fef3c7;
    color: #d97706;
}

.dash-stat-icon.files {
    background: #dbeafe;
    color: #2563eb;
}

.dash-stat-icon.activity {
    background: #f3e8ff;
    color: #9333ea;
}

.dash-stat-icon.automator {
    background: #fce7f3;
    color: #db2777;
}

.dash-stat-pulse {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.dash-stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.dash-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.dash-stat-link {
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-top: auto;
}

.dash-stat-link:hover {
    text-decoration: underline;
}

.dash-stat-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: auto;
}

/* Automator Status Card */
.dash-automator-status {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
}

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

.dash-automator-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-automator-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.dash-automator-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.dash-automator-body {
    padding: 20px;
}

.dash-automator-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.dash-auto-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-auto-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.dash-auto-stat-value.success {
    color: #16a34a;
}

.dash-auto-stat-value.danger {
    color: #dc2626;
}

.dash-auto-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.dash-automator-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 16px;
    background: #fef3c7;
    border-radius: 8px;
    color: #92400e;
    font-size: 13px;
}

.dash-automator-warning svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Online Users Section */
.dash-online-users {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
}

.dash-section-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.dash-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-online-pulse {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.dash-online-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px;
}

.dash-online-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 220px;
    flex: 1;
    max-width: 300px;
}

.dash-online-user:hover {
    background: var(--bg-hover);
}

.dash-online-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    flex-shrink: 0;
}

.dash-online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

.dash-online-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-online-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-online-meta {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-online-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Main Content Grid */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.dash-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.dash-card-wide {
    grid-column: span 2;
}

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

.dash-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-card-header h3 svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.dash-card-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.dash-card-link:hover {
    text-decoration: underline;
}

.dash-card-body {
    padding: 16px 20px;
}

/* Empty State */
.dash-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.dash-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.dash-empty p {
    margin: 0;
    font-size: 14px;
}

/* Ticket List */
.dash-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-ticket-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dash-ticket-item:hover {
    background: var(--bg-hover);
}

.dash-ticket-priority {
    width: 4px;
    height: 36px;
    border-radius: 2px;
    flex-shrink: 0;
}

.dash-ticket-priority.low { background: #94a3b8; }
.dash-ticket-priority.medium { background: #3b82f6; }
.dash-ticket-priority.high { background: #f59e0b; }
.dash-ticket-priority.urgent { background: #ef4444; }

.dash-ticket-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-ticket-subject {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.dash-ticket-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    white-space: nowrap;
}

.dash-ticket-status.open { background: #dbeafe; color: #1d4ed8; }
.dash-ticket-status.in_progress { background: #fef3c7; color: #92400e; }
.dash-ticket-status.waiting { background: #f3e8ff; color: #7c3aed; }
.dash-ticket-status.resolved { background: #dcfce7; color: #166534; }
.dash-ticket-status.closed { background: #f1f5f9; color: #475569; }

/* Client List */
.dash-client-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-client-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dash-client-item:hover {
    background: var(--bg-hover);
}

.dash-client-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    position: relative;
}

.dash-client-avatar.online::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

.dash-client-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-client-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.dash-client-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.dash-client-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.dash-client-status.active { background: #dcfce7; color: #166534; }
.dash-client-status.suspended { background: #fee2e2; color: #991b1b; }

/* Activity List */
.dash-activity-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.dash-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.dash-activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: #f1f5f9;
    flex-shrink: 0;
}

.dash-activity-icon.login { background: #dcfce7; }
.dash-activity-icon.logout { background: #fee2e2; }
.dash-activity-icon.file_download { background: #dbeafe; }
.dash-activity-icon.file_view { background: #f3e8ff; }

.dash-activity-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-activity-text {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-activity-text strong {
    font-weight: 600;
}

.dash-activity-time {
    font-size: 11px;
    color: var(--text-muted);
}

/* Dark Mode Adjustments */
[data-theme="dark"] .dash-welcome {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
}

[data-theme="dark"] .dash-stat-icon.clients { background: rgba(99, 102, 241, 0.2); }
[data-theme="dark"] .dash-stat-icon.online { background: rgba(34, 197, 94, 0.2); }
[data-theme="dark"] .dash-stat-icon.tickets { background: rgba(245, 158, 11, 0.2); }
[data-theme="dark"] .dash-stat-icon.files { background: rgba(59, 130, 246, 0.2); }
[data-theme="dark"] .dash-stat-icon.activity { background: rgba(168, 85, 247, 0.2); }
[data-theme="dark"] .dash-stat-icon.automator { background: rgba(236, 72, 153, 0.2); }

[data-theme="dark"] .dash-automator-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

[data-theme="dark"] .dash-ticket-status.open { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
[data-theme="dark"] .dash-ticket-status.in_progress { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
[data-theme="dark"] .dash-ticket-status.waiting { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
[data-theme="dark"] .dash-ticket-status.resolved { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
[data-theme="dark"] .dash-ticket-status.closed { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }

[data-theme="dark"] .dash-client-status.active { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
[data-theme="dark"] .dash-client-status.suspended { background: rgba(239, 68, 68, 0.2); color: #f87171; }

[data-theme="dark"] .dash-activity-icon.login { background: rgba(34, 197, 94, 0.2); }
[data-theme="dark"] .dash-activity-icon.logout { background: rgba(239, 68, 68, 0.2); }
[data-theme="dark"] .dash-activity-icon.file_download { background: rgba(59, 130, 246, 0.2); }
[data-theme="dark"] .dash-activity-icon.file_view { background: rgba(168, 85, 247, 0.2); }

/* Responsive Design */
@media (max-width: 1400px) {
    .dash-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dash-grid {
        grid-template-columns: 1fr;
    }
    
    .dash-card-wide {
        grid-column: span 1;
    }
    
    .dash-activity-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dash-welcome {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .dash-welcome-actions {
        width: 100%;
    }
    
    .dash-welcome-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .dash-stats {
        grid-template-columns: 1fr;
    }
    
    .dash-automator-stats {
        gap: 20px;
    }
    
    .dash-online-user {
        min-width: 100%;
        max-width: 100%;
    }
}

/* =====================================================
   ADMIN TICKET VIEW - Controls Panel
   ===================================================== */

.admin-ticket-chat {
    display: flex;
    flex-direction: column;
}

.admin-ticket-controls {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.admin-control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-control-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-client-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.admin-client-link:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.admin-client-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.admin-client-username {
    color: var(--text-muted);
    font-weight: 400;
}

.admin-control-select {
    padding: 6px 28px 6px 12px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    min-width: 130px;
}

.admin-control-select:hover {
    border-color: var(--primary);
}

.admin-control-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.admin-delete-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #dc2626;
    background: transparent;
    border: 1px solid #fecaca;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-delete-btn svg {
    width: 16px;
    height: 16px;
}

.admin-delete-btn:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

/* Chat message badge for client */
.chat-message-badge.client-badge {
    background: #e0e7ff;
    color: #4f46e5;
}

/* Admin avatar in chat input */
.chat-input-avatar.admin {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Admin message bubble */
.chat-message.admin .chat-message-avatar.admin {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Ticket chat client info in subtitle */
.ticket-chat-client {
    font-weight: 500;
    color: var(--text-primary);
}

/* Dark mode adjustments */
[data-theme="dark"] .admin-ticket-controls {
    background: var(--bg-secondary);
}

[data-theme="dark"] .admin-client-link {
    background: var(--card-bg);
}

[data-theme="dark"] .admin-control-select {
    background-color: var(--card-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}

[data-theme="dark"] .admin-delete-btn {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
}

[data-theme="dark"] .admin-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #f87171;
}

[data-theme="dark"] .chat-message-badge.client-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-ticket-controls {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .admin-control-group {
        flex: 1;
        min-width: calc(50% - 6px);
    }
    
    .admin-control-group:first-child {
        flex: 100%;
    }
    
    .admin-control-select {
        width: 100%;
    }
}

/* =====================================================
   CLIENT DASHBOARD - Professional Redesign
   ===================================================== */

/* Hero Section */
.client-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%);
    border-radius: 20px;
    margin-bottom: 24px;
    color: white;
    overflow: hidden;
    position: relative;
}

.client-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.client-hero-content {
    position: relative;
    z-index: 1;
    flex: 1;
}

.client-hero-text h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
}

.client-hero-text p {
    font-size: 15px;
    margin: 0;
    opacity: 0.9;
}

.client-hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    color: #4f46e5 !important;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-hero-primary svg {
    width: 18px;
    height: 18px;
    color: #4f46e5 !important;
}

.btn-hero-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.btn-hero-secondary svg {
    width: 18px;
    height: 18px;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.client-hero-illustration {
    width: 180px;
    height: 180px;
    color: white;
    opacity: 0.8;
    flex-shrink: 0;
    margin-left: 32px;
}

.client-hero-illustration svg {
    width: 100%;
    height: 100%;
}

/* Stats Grid */
.client-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.client-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.2s ease;
}

.client-stat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.client-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.client-stat-icon svg {
    width: 24px;
    height: 24px;
}

.client-stat-icon.files {
    background: #dbeafe;
    color: #2563eb;
}

.client-stat-icon.tickets {
    background: #fef3c7;
    color: #d97706;
}

.client-stat-icon.notifications {
    background: #fce7f3;
    color: #db2777;
}

.client-stat-icon.notifications.has-unread {
    background: #fee2e2;
    color: #dc2626;
}

.client-stat-icon.resolved {
    background: #dcfce7;
    color: #16a34a;
}

.notification-pulse {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #dc2626;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
    animation: pulse 2s infinite;
}

.client-stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.client-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

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

.client-stat-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.client-stat-detail {
    font-size: 13px;
    color: var(--text-muted);
}

.client-stat-detail.highlight {
    color: #d97706;
    font-weight: 600;
}

.client-stat-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.client-stat-link:hover {
    text-decoration: underline;
}

/* Dashboard Grid */
.client-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

/* Cards */
.client-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

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

.client-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-card-title svg {
    width: 22px;
    height: 22px;
    color: var(--text-muted);
}

.client-card-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.client-card-action {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.client-card-action:hover {
    background: rgba(99, 102, 241, 0.1);
}

.client-card-body {
    padding: 16px 24px 24px;
}

/* Empty State */
.client-empty-state {
    text-align: center;
    padding: 40px 20px;
}

.client-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: var(--text-muted);
    opacity: 0.5;
}

.client-empty-icon svg {
    width: 100%;
    height: 100%;
}

.client-empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.client-empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 16px 0;
}

/* File List */
.client-file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.client-file-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.client-file-item:hover {
    background: var(--bg-hover);
}

.client-file-item:hover .client-file-download {
    opacity: 1;
    color: var(--primary);
}

.client-file-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #e0e7ff;
    color: #4f46e5;
}

.client-file-icon.pdf {
    background: #fee2e2;
    color: #dc2626;
}

.client-file-icon.doc {
    background: #dbeafe;
    color: #2563eb;
}

.client-file-icon.xls {
    background: #dcfce7;
    color: #16a34a;
}

.client-file-icon.img {
    background: #fce7f3;
    color: #db2777;
}

.client-file-icon.zip {
    background: #fef3c7;
    color: #d97706;
}

.client-file-icon svg {
    width: 20px;
    height: 20px;
}

.client-file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.client-file-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-file-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.client-file-dot {
    opacity: 0.5;
}

.client-file-download {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0;
    transition: all 0.2s ease;
}

.client-file-download svg {
    width: 18px;
    height: 18px;
}

/* Ticket List */
.client-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.client-ticket-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.client-ticket-item:hover {
    background: var(--bg-hover);
}

.client-ticket-priority {
    width: 4px;
    height: 40px;
    border-radius: 2px;
    flex-shrink: 0;
}

.client-ticket-priority.low { background: #94a3b8; }
.client-ticket-priority.medium { background: #3b82f6; }
.client-ticket-priority.high { background: #f59e0b; }
.client-ticket-priority.urgent { background: #ef4444; }

.client-ticket-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.client-ticket-subject {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-ticket-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.client-ticket-dot {
    opacity: 0.5;
}

.client-ticket-status {
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.client-ticket-status.open { background: #dbeafe; color: #1d4ed8; }
.client-ticket-status.in_progress { background: #fef3c7; color: #92400e; }
.client-ticket-status.waiting { background: #f3e8ff; color: #7c3aed; }
.client-ticket-status.resolved { background: #dcfce7; color: #166534; }
.client-ticket-status.closed { background: #f1f5f9; color: #475569; }

/* Help Section */
.client-help-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

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

.client-help-card:hover {
    border-color: var(--primary);
}

.client-help-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e7ff;
    color: #4f46e5;
    flex-shrink: 0;
}

.client-help-icon svg {
    width: 24px;
    height: 24px;
}

.client-help-content {
    flex: 1;
}

.client-help-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.client-help-content p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

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

/* Dark Mode Adjustments */
[data-theme="dark"] .client-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 50%, #3730a3 100%);
}

[data-theme="dark"] .client-stat-icon.files { background: rgba(37, 99, 235, 0.2); }
[data-theme="dark"] .client-stat-icon.tickets { background: rgba(217, 119, 6, 0.2); }
[data-theme="dark"] .client-stat-icon.notifications { background: rgba(219, 39, 119, 0.2); }
[data-theme="dark"] .client-stat-icon.notifications.has-unread { background: rgba(220, 38, 38, 0.2); }
[data-theme="dark"] .client-stat-icon.resolved { background: rgba(22, 163, 74, 0.2); }

[data-theme="dark"] .client-file-icon { background: rgba(99, 102, 241, 0.2); }
[data-theme="dark"] .client-file-icon.pdf { background: rgba(220, 38, 38, 0.2); }
[data-theme="dark"] .client-file-icon.doc { background: rgba(37, 99, 235, 0.2); }
[data-theme="dark"] .client-file-icon.xls { background: rgba(22, 163, 74, 0.2); }
[data-theme="dark"] .client-file-icon.img { background: rgba(219, 39, 119, 0.2); }
[data-theme="dark"] .client-file-icon.zip { background: rgba(217, 119, 6, 0.2); }

[data-theme="dark"] .client-ticket-status.open { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
[data-theme="dark"] .client-ticket-status.in_progress { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
[data-theme="dark"] .client-ticket-status.waiting { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
[data-theme="dark"] .client-ticket-status.resolved { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
[data-theme="dark"] .client-ticket-status.closed { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }

[data-theme="dark"] .client-help-icon {
    background: rgba(99, 102, 241, 0.2);
}

/* Responsive */
@media (max-width: 1200px) {
    .client-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .client-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .client-help-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .client-hero {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    
    .client-hero-illustration {
        display: none;
    }
    
    .client-hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        justify-content: center;
        width: 100%;
    }
    
    .client-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .client-stat-card {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .client-stat-icon {
        order: 1;
    }
    
    .client-stat-info {
        order: 2;
        flex: 1;
    }
    
    .client-stat-footer {
        order: 3;
        width: 100%;
        margin-top: 12px;
        padding-top: 12px;
    }
    
    .client-help-card {
        flex-direction: column;
        text-align: center;
    }
}

/* =====================================================
   FILE READY POPUP - Enhanced Design
   ===================================================== */

.file-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: popupFadeIn 0.3s ease;
}

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

.file-popup {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 0;
    max-width: 440px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: popupSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(40px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Confetti Animation */
.file-popup-confetti {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    pointer-events: none;
    overflow: hidden;
}

.file-popup-confetti span {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confettiFall 3s ease-in-out infinite;
}

.file-popup-confetti span:nth-child(1) { left: 10%; background: #3b82f6; animation-delay: 0s; }
.file-popup-confetti span:nth-child(2) { left: 20%; background: #6366f1; animation-delay: 0.2s; }
.file-popup-confetti span:nth-child(3) { left: 30%; background: #38bdf8; animation-delay: 0.4s; }
.file-popup-confetti span:nth-child(4) { left: 40%; background: #818cf8; animation-delay: 0.1s; }
.file-popup-confetti span:nth-child(5) { left: 50%; background: #2563eb; animation-delay: 0.3s; }
.file-popup-confetti span:nth-child(6) { left: 60%; background: #8b5cf6; animation-delay: 0.5s; }
.file-popup-confetti span:nth-child(7) { left: 70%; background: #60a5fa; animation-delay: 0.15s; }
.file-popup-confetti span:nth-child(8) { left: 80%; background: #a5b4fc; animation-delay: 0.35s; }
.file-popup-confetti span:nth-child(9) { left: 85%; background: #3b82f6; animation-delay: 0.25s; }
.file-popup-confetti span:nth-child(10) { left: 15%; background: #6366f1; animation-delay: 0.45s; }

@keyframes confettiFall {
    0% {
        transform: translateY(-20px) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(0) rotate(45deg) scale(1);
    }
    100% {
        transform: translateY(200px) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

.file-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-popup-close svg {
    width: 18px;
    height: 18px;
}

.file-popup-close:hover {
    background: white;
    color: #1e293b;
    transform: rotate(90deg);
}

/* Header Section */
.file-popup-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 50%, #1e1b4b 100%);
    padding: 40px 32px 50px;
    position: relative;
    overflow: hidden;
}

/* Animated gradient overlay - matching hero */
.file-popup-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 10% 20%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(99, 102, 241, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(56, 189, 248, 0.12) 0%, transparent 60%);
    pointer-events: none;
    animation: popupPulseGlow 8s ease-in-out infinite;
}

@keyframes popupPulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* Grid pattern - matching hero */
.file-popup-header .file-popup-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

/* Floating particles - matching hero */
.file-popup-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.file-popup-particles span {
    position: absolute;
    width: 5px;
    height: 5px;
    background: rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    animation: popupFloatUp 10s infinite ease-in-out;
}

.file-popup-particles span:nth-child(1) {
    left: 15%;
    bottom: 0;
    animation-delay: 0s;
    animation-duration: 12s;
}

.file-popup-particles span:nth-child(2) {
    left: 35%;
    bottom: 0;
    width: 4px;
    height: 4px;
    background: rgba(99, 102, 241, 0.5);
    animation-delay: 1.5s;
    animation-duration: 10s;
}

.file-popup-particles span:nth-child(3) {
    left: 55%;
    bottom: 0;
    width: 4px;
    height: 4px;
    background: rgba(56, 189, 248, 0.45);
    animation-delay: 3s;
    animation-duration: 14s;
}

.file-popup-particles span:nth-child(4) {
    left: 70%;
    bottom: 0;
    width: 3px;
    height: 3px;
    background: rgba(59, 130, 246, 0.4);
    animation-delay: 4.5s;
    animation-duration: 11s;
}

.file-popup-particles span:nth-child(5) {
    left: 85%;
    bottom: 0;
    width: 4px;
    height: 4px;
    background: rgba(99, 102, 241, 0.45);
    animation-delay: 6s;
    animation-duration: 13s;
}

@keyframes popupFloatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-150px) scale(0.5);
        opacity: 0;
    }
}

.file-popup-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--card-bg);
    border-radius: 24px 24px 0 0;
}

.file-popup-icon-wrapper {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto;
}

.file-popup-icon-ring {
    position: absolute;
    inset: -8px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: ringPulse 2s ease-in-out infinite;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.file-popup-icon {
    width: 88px;
    height: 88px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: iconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes iconBounce {
    from { transform: scale(0) rotate(-45deg); }
    to { transform: scale(1) rotate(0deg); }
}

.file-popup-icon svg {
    width: 48px;
    height: 48px;
    color: #3b82f6;
}

.file-popup-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-popup-badge svg {
    width: 16px;
    height: 16px;
}

/* Content Section */
.file-popup-content {
    padding: 8px 32px 0;
    position: relative;
    z-index: 1;
}

.file-popup-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.file-popup-content p {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* Files List */
.file-popup-files {
    padding: 20px 24px;
    margin: 20px 24px;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.file-popup-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    animation: fileSlideIn 0.4s ease both;
}

@keyframes fileSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.file-popup-file:last-child,
.file-popup-file:last-of-type {
    margin-bottom: 0;
}

.file-popup-file-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #e0e7ff;
    color: #4f46e5;
}

.file-popup-file-icon.pdf { background: #fee2e2; color: #dc2626; }
.file-popup-file-icon.doc { background: #dbeafe; color: #2563eb; }
.file-popup-file-icon.xls { background: #dcfce7; color: #16a34a; }
.file-popup-file-icon.img { background: #fce7f3; color: #db2777; }

.file-popup-file-icon svg {
    width: 22px;
    height: 22px;
}

.file-popup-file-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.file-popup-file-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.file-popup-file-size {
    font-size: 12px;
    color: var(--text-muted);
}

.file-popup-file-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-popup-file-check svg {
    width: 14px;
    height: 14px;
    color: white;
}

.file-popup-file-download {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.file-popup-file-download:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: scale(1.1);
}

.file-popup-file-download svg {
    width: 16px;
    height: 16px;
    color: white;
}

.file-popup-more {
    text-align: center;
    padding: 12px;
    margin-top: 10px;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px dashed var(--border-color);
}

.file-popup-more span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Actions */
.file-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 24px 28px;
}

.file-popup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.file-popup-btn.primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.file-popup-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.file-popup-btn.primary svg {
    width: 20px;
    height: 20px;
}

.file-popup-btn.secondary {
    background: transparent;
    color: var(--text-muted);
    padding: 12px 24px;
}

.file-popup-btn.secondary:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

/* Dark Mode */
[data-theme="dark"] .file-popup-close {
    background: rgba(30, 41, 59, 0.9);
    color: #94a3b8;
}

[data-theme="dark"] .file-popup-close:hover {
    background: #334155;
    color: white;
}

[data-theme="dark"] .file-popup-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 50%, #1e1b4b 100%);
}

[data-theme="dark"] .file-popup-icon {
    background: #1e293b;
}

[data-theme="dark"] .file-popup-icon svg {
    color: #60a5fa;
}

[data-theme="dark"] .file-popup-file-icon { background: rgba(99, 102, 241, 0.2); }
[data-theme="dark"] .file-popup-file-icon.pdf { background: rgba(220, 38, 38, 0.2); }
[data-theme="dark"] .file-popup-file-icon.doc { background: rgba(37, 99, 235, 0.2); }
[data-theme="dark"] .file-popup-file-icon.xls { background: rgba(22, 163, 74, 0.2); }
[data-theme="dark"] .file-popup-file-icon.img { background: rgba(219, 39, 119, 0.2); }

/* Responsive */
@media (max-width: 480px) {
    .file-popup {
        border-radius: 20px;
        margin: 10px;
    }
    
    .file-popup-header {
        padding: 32px 24px 44px;
    }
    
    .file-popup-icon-wrapper {
        width: 72px;
        height: 72px;
    }
    
    .file-popup-icon {
        width: 72px;
        height: 72px;
    }
    
    .file-popup-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .file-popup-content {
        padding: 8px 24px 0;
    }
    
    .file-popup-content h3 {
        font-size: 20px;
    }
    
    .file-popup-files {
        margin: 16px;
        padding: 16px;
    }
    
    .file-popup-actions {
        padding: 0 16px 20px;
    }
}

/* =====================================================
   NOTIFICATIONS - Improved Dropdown & Page Styles
   ===================================================== */

/* Improved Dropdown Header */
.notification-dropdown-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-dropdown-header-left svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.notification-dropdown-header-left h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Improved Dropdown Footer */
.notification-dropdown-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.notification-view-all,
.notification-mark-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.notification-view-all:hover,
.notification-mark-all:hover {
    background: rgba(99, 102, 241, 0.1);
}

.notification-view-all svg,
.notification-mark-all svg {
    width: 16px;
    height: 16px;
}

/* Improved Notification Items in Dropdown */
.notification-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

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

.notification-dropdown-item:hover {
    background: var(--bg-hover);
}

.notification-dropdown-item.unread {
    background: rgba(99, 102, 241, 0.05);
}

.notification-dropdown-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
}

.notification-dropdown-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    background: #e0e7ff;
    color: #4f46e5;
}

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

.notification-dropdown-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.notification-dropdown-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 6px;
}

.notification-dropdown-time {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.8;
}

.notification-dropdown-dot {
    position: absolute;
    top: 18px;
    right: 16px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

/* Empty State */
.notification-dropdown-empty {
    padding: 40px 20px;
    text-align: center;
}

.notification-dropdown-empty svg {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    opacity: 0.4;
    margin-bottom: 12px;
}

.notification-dropdown-empty p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* =====================================================
   NOTIFICATIONS PAGE STYLES
   ===================================================== */

.notif-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.notif-page-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notif-page-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-page-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.notif-page-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.notif-page-title p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.notif-mark-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notif-mark-all-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.notif-mark-all-btn svg {
    width: 18px;
    height: 18px;
}

/* Notifications Content */
.notif-page-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Date Group */
.notif-date-group {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.notif-date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.notif-date-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.notif-date-count {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--card-bg);
    padding: 4px 10px;
    border-radius: 20px;
}

/* Notification Items */
.notif-group-list {
    display: flex;
    flex-direction: column;
}

.notif-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    position: relative;
}

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

.notif-item:hover {
    background: var(--bg-hover);
}

.notif-item.unread {
    background: rgba(99, 102, 241, 0.04);
}

.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
}

.notif-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-item-icon svg {
    width: 22px;
    height: 22px;
}

.notif-item-icon.info {
    background: #dbeafe;
    color: #2563eb;
}

.notif-item-icon.success {
    background: #dcfce7;
    color: #16a34a;
}

.notif-item-icon.warning {
    background: #fef3c7;
    color: #d97706;
}

.notif-item-icon.error {
    background: #fee2e2;
    color: #dc2626;
}

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

.notif-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.notif-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.notif-unread-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.notif-item-message {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.notif-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-item-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.notif-item-time svg {
    width: 14px;
    height: 14px;
}

.notif-mark-read-btn {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.notif-mark-read-btn:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Empty State */
.notif-empty-state {
    text-align: center;
    padding: 80px 40px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.notif-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-empty-icon svg {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    opacity: 0.5;
}

.notif-empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.notif-empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .notification-dropdown-item.unread {
    background: rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .notification-dropdown-icon {
    background: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .notif-item.unread {
    background: rgba(99, 102, 241, 0.08);
}

[data-theme="dark"] .notif-item-icon.info {
    background: rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .notif-item-icon.success {
    background: rgba(22, 163, 74, 0.2);
}

[data-theme="dark"] .notif-item-icon.warning {
    background: rgba(217, 119, 6, 0.2);
}

[data-theme="dark"] .notif-item-icon.error {
    background: rgba(220, 38, 38, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .notif-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .notif-mark-all-btn {
        width: 100%;
        justify-content: center;
    }
    
    .notif-page-icon {
        width: 48px;
        height: 48px;
    }
    
    .notif-page-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .notif-page-title h1 {
        font-size: 20px;
    }
    
    .notif-item {
        padding: 16px;
    }
    
    .notif-item-icon {
        width: 40px;
        height: 40px;
    }
    
    .notif-item-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
