/* Support styles v1793544118514 */
/* ==========================================================================
   CODEWRIGHT SUPPORT PLATFORM - UNIFIED DESIGN SYSTEM
   Modern Cyber-Obsidian UI for Customer, Staff & Admin Portals
   ========================================================================== */

/* --- ROOT VARIABLES & DESIGN TOKENS --- */
:root {
    --sp-bg: #070a12;
    --sp-surface: rgba(12, 17, 29, 0.85);
    --sp-surface-elevated: rgba(16, 23, 40, 0.95);
    --sp-surface-card: rgba(13, 19, 34, 0.75);
    --sp-border: rgba(0, 240, 255, 0.18);
    --sp-border-subtle: rgba(255, 255, 255, 0.08);
    --sp-border-hover: rgba(0, 240, 255, 0.45);
    --sp-cyan: #00f0ff;
    --sp-cyan-glow: rgba(0, 240, 255, 0.25);
    --sp-blue: #3b82f6;
    --sp-purple: #8b5cf6;
    --sp-success: #10b981;
    --sp-warning: #f59e0b;
    --sp-danger: #ef4444;
    --sp-text: #f8fafc;
    --sp-text-muted: #94a3b8;
    --sp-text-dim: #64748b;
    --sp-font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --sp-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --sp-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --sp-font-mono: 'JetBrains Mono', monospace;
    --sp-radius-sm: 8px;
    --sp-radius-md: 14px;
    --sp-radius-lg: 20px;
    --sp-shadow-card: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 240, 255, 0.08);
    --sp-shadow-glow: 0 0 30px rgba(0, 240, 255, 0.35);
    --sp-scrollbar-track: rgba(12, 17, 29, 0.5);
    --sp-scrollbar-thumb: rgba(255, 255, 255, 0.18);
    --sp-scrollbar-thumb-hover: var(--sp-cyan);
}

[data-theme="light"] {
    --sp-bg: #f8fafc;
    --sp-surface: rgba(255, 255, 255, 0.95);
    --sp-surface-elevated: #ffffff;
    --sp-surface-card: #ffffff;
    --sp-border: #e2e8f0;
    --sp-border-subtle: #f1f5f9;
    --sp-border-hover: #0284c7;
    --sp-cyan: #0284c7;
    --sp-cyan-glow: rgba(2, 132, 199, 0.15);
    --sp-blue: #2563eb;
    --sp-text: #0f172a;
    --sp-text-muted: #475569;
    --sp-text-dim: #94a3b8;
    --sp-shadow-card: 0 10px 30px rgba(15, 23, 42, 0.07);
    --sp-shadow-glow: 0 0 25px rgba(2, 132, 199, 0.2);
    --sp-scrollbar-track: rgba(241, 245, 249, 0.9);
    --sp-scrollbar-thumb: rgba(148, 163, 184, 0.5);
    --sp-scrollbar-thumb-hover: var(--sp-cyan);
}

/* --- THEME-AWARE SCROLLBAR SYSTEM --- */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--sp-scrollbar-thumb) var(--sp-scrollbar-track);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--sp-scrollbar-track);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--sp-scrollbar-thumb);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sp-scrollbar-thumb-hover);
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* --- CORE PORTAL WRAPPERS --- */
.support-container {
    width: 100%;
    max-width: 1260px;
    margin: 0 auto;
    padding: 105px 24px 60px;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    color: var(--sp-text);
    position: relative;
    z-index: 2;
    font-family: var(--sp-font-body);
}

.login-loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 160px);
    padding: 110px 20px 50px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* --- AUTH WRAPPER & MODERN GLASS CARD --- */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 20px 0;
    width: 100%;
}

.auth-box {
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    padding: 42px 38px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--sp-shadow-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-sizing: border-box;
    position: relative;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--sp-cyan), transparent);
    border-radius: 2px;
}

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

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 20px;
    color: var(--sp-cyan);
    font-size: 0.75rem;
    font-family: var(--sp-font-mono);
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.auth-title {
    font-family: var(--sp-font-display);
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--sp-text);
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: var(--sp-text-muted);
    margin: 0;
}

/* --- FORM CONTROLS & INPUTS --- */
.form-group {
    margin-bottom: 20px;
    text-align: left;
    box-sizing: border-box;
}

.form-group label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sp-text-muted);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--sp-text);
    font-size: 0.95rem;
    font-family: var(--sp-font-body);
    box-sizing: border-box;
    outline: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-control:focus {
    border-color: var(--sp-cyan);
    background: rgba(0, 240, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.18);
}

.form-control::placeholder {
    color: var(--sp-text-dim);
}

select.form-control,
select {
    cursor: pointer;
    background-color: #0b101c;
    color-scheme: dark;
    border-radius: 10px !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300f0ff'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 18px !important;
    padding-right: 38px !important;
}
select.form-control option {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 10px;
}

[data-theme="light"] .form-control {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}
[data-theme="light"] .form-control:focus {
    background: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}
[data-theme="light"] select.form-control,
[data-theme="light"] select {
    background-color: #ffffff !important;
    color-scheme: light;
    border-radius: 10px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230284c7'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 18px !important;
    padding-right: 38px !important;
}
[data-theme="light"] select.form-control option {
    background-color: #ffffff;
    color: #0f172a;
}

.error-msg,
.invalid-feedback {
    display: none;
    color: var(--sp-danger);
    font-size: 0.8rem;
    margin-top: 6px;
    font-weight: 500;
}

/* --- BUTTONS & CTA --- */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #00f0ff 0%, #3b82f6 100%);
    color: #04121e;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 0.92rem;
    font-family: var(--sp-font-body);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.28);
    box-sizing: border-box;
}

.cta-button:hover {
    box-shadow: 0 0 32px rgba(0, 240, 255, 0.6);
    transform: translateY(-2px);
    color: #04121e;
}

[data-theme="light"] .cta-button {
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.2);
}

[data-theme="light"] .cta-button:hover {
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.32);
}

.cta-button.btn-full-width {
    width: 100%;
}

.cta-button.btn-small,
.cta-button.btn-sm {
    padding: 7px 16px;
    font-size: 0.82rem;
    border-radius: 8px;
}

.cta-button.btn-ghost-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    box-shadow: none;
}
.cta-button.btn-ghost-danger:hover {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.cta-button.btn-primary-ghost {
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.35);
    color: var(--sp-cyan);
    box-shadow: none;
}
.cta-button.btn-primary-ghost:hover {
    background: var(--sp-cyan);
    color: #04121e;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.cta-button.btn-ghost-muted {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--sp-text-muted);
    box-shadow: none;
}
.cta-button.btn-ghost-muted:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--sp-text);
}

.auth-box a,
.link-primary {
    color: var(--sp-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.auth-box a:hover,
.link-primary:hover {
    text-decoration: underline;
    color: #38bdf8;
}

[data-theme="light"] .auth-box a,
[data-theme="light"] .link-primary {
    color: #0284c7;
}
[data-theme="light"] .auth-box a:hover,
[data-theme="light"] .link-primary:hover {
    color: #0369a1;
}

/* Helper utility */
.d-none {
    display: none !important;
}

/* --- CLIENT DASHBOARD: TOP BAR & GREETING --- */
.dash-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding: 20px 28px;
    background: var(--sp-surface-card);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-md);
    box-shadow: var(--sp-shadow-card);
    backdrop-filter: blur(14px);
    box-sizing: border-box;
    position: relative;
    z-index: 50;
}

.dash-heading-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dash-avatar-circle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(59, 130, 246, 0.2));
    border: 1px solid var(--sp-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sp-cyan);
    font-size: 1.25rem;
}

.dash-heading {
    font-family: var(--sp-font-display);
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--sp-text);
    margin: 0;
    letter-spacing: -0.01em;
}

.dash-subheading {
    font-size: 0.85rem;
    color: var(--sp-text-muted);
    margin-top: 2px;
}

.dash-user-meta {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 0.95rem;
}

.profile-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.profile-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    height: 38px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 8px;
    color: var(--sp-text);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s;
}

.profile-pill-btn:hover {
    border-color: var(--sp-cyan);
    background: rgba(0, 240, 255, 0.08);
}

.profile-pill-btn.sound-toggle-btn {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.profile-pill-btn.sound-toggle-btn i {
    font-size: 0.95rem;
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    width: max-content;
    white-space: nowrap;
    background: #0d1424;
    border: 1px solid var(--sp-border);
    border-radius: 8px;
    padding: 6px;
    z-index: 1000;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .profile-pill-btn {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .profile-pill-btn:hover {
    background: #f8fafc;
    border-color: rgba(2, 132, 199, 0.4);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .profile-dropdown {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.16);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--sp-text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(0, 240, 255, 0.12);
    color: var(--sp-cyan);
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

/* --- CLIENT DASHBOARD GRID --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
    width: 100%;
}

.dash-sidebar {
    background: var(--sp-surface-card);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-md);
    padding: 24px 20px;
    backdrop-filter: blur(14px);
    box-shadow: var(--sp-shadow-card);
    box-sizing: border-box;
}

.dash-sidebar-title {
    font-family: var(--sp-font-display);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--sp-cyan);
    margin: 0 0 16px;
    text-transform: uppercase;
}

.sidebar-info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.sidebar-info-label {
    font-size: 0.75rem;
    color: var(--sp-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.sidebar-info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sp-text);
}

.dash-main {
    background: var(--sp-surface-card);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-md);
    padding: 28px;
    backdrop-filter: blur(14px);
    box-shadow: var(--sp-shadow-card);
    min-height: 520px;
    box-sizing: border-box;
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 14px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.25s;
}

.stat-card:hover,
.stat-card.active {
    border-color: var(--sp-cyan);
    background: rgba(0, 240, 255, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.stat-card.active::before {
    background: var(--sp-cyan);
}

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

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-icon {
    font-size: 1rem;
    color: var(--sp-cyan);
    opacity: 0.8;
}

.stat-number {
    font-family: var(--sp-font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--sp-text);
    line-height: 1;
}

/* --- TICKET TOOLBAR & ACTION HEADER --- */
.admin-toolbar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.toolbar-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.toolbar-search-wrap {
    position: relative;
    flex: 1;
    max-width: 450px;
}

.toolbar-search-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sp-text-dim);
    font-size: 0.9rem;
}

.toolbar-search-wrap input {
    padding-left: 38px;
}

/* --- TICKETS LIST & MODERN CARDS --- */
.ticket-grid-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 14px;
    padding: 16px 20px;
    cursor: pointer;
    transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
    position: relative;
}

.ticket-row:hover {
    border-color: rgba(0, 240, 255, 0.35);
    background: rgba(0, 240, 255, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.ticket-id {
    font-family: var(--sp-font-mono);
    font-size: 0.85rem;
    color: var(--sp-cyan);
    font-weight: 700;
}

.ticket-separator {
    color: var(--sp-border-subtle);
    margin: 0 8px;
}

.ticket-topic {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sp-text);
}

.ticket-meta {
    font-size: 0.8rem;
    color: var(--sp-text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- STATUS & PRIORITY BADGES --- */
.status-badge,
.ticket-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: var(--sp-font-mono);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-new,
.status-badge.status-new {
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid rgba(0, 240, 255, 0.4);
    color: var(--sp-cyan);
}

.status-in_progress,
.status-open,
.status-badge.status-in_progress {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}

.status-completed,
.status-resolved,
.status-badge.status-completed {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.status-canceled,
.status-badge.status-canceled {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ef4444;
}

.priority-pill {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--sp-font-mono);
}
.priority-urgent,
.priority-high {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.priority-standard,
.priority-medium {
    background: rgba(0, 240, 255, 0.12);
    color: var(--sp-cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
}
.priority-low {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* --- MODALS (CRITICAL: HIDDEN BY DEFAULT) --- */
.support-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 7, 14, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 24px;
    box-sizing: border-box;
    overflow-y: auto;
}

.support-modal-content {
    background: #0c121e;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-lg);
    padding: 36px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 240, 255, 0.12);
    position: relative;
    box-sizing: border-box;
    max-height: 90vh;
    overflow-y: auto;
    color: var(--sp-text);
    margin: auto;
}

.support-modal-content.max-w-700 {
    max-width: 760px;
}

.support-modal-content.max-w-900 {
    max-width: 960px;
}

.close-support-modal {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 26px;
    line-height: 1;
    color: var(--sp-text-muted);
    cursor: pointer;
    transition: color 0.15s ease;
    z-index: 10;
}

.close-support-modal:hover {
    color: var(--sp-cyan);
}

[data-theme="light"] .close-support-modal:hover {
    color: #0284c7;
}

.modal-header-title {
    font-family: var(--sp-font-display);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--sp-text);
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}

/* --- VIEW TICKET COLLABORATION WORKSPACE (vt-modal-content) --- */
.vt-modal-content {
    width: min(1260px, 96vw) !important;
    max-width: 1260px !important;
    height: min(900px, 92vh) !important;
    max-height: 92vh !important;
    padding: 0 !important;
    display: flex;
    overflow: hidden;
    border-radius: var(--sp-radius-lg);
}

.vt-left-col {
    flex: 7;
    padding: 22px 26px;
    border-right: 1px solid var(--sp-border-subtle);
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-sizing: border-box;
}

.vt-right-col {
    flex: 3;
    padding: 24px 22px;
    background: rgba(0, 0, 0, 0.25);
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

/* --- INQUIRY & GENERIC MODAL SIZING & STRUCTURE --- */
.inquiry-modal-content {
    width: min(980px, 95vw) !important;
    max-width: 980px !important;
    max-height: 90vh;
    overflow-y: auto;
    padding: 36px 40px !important;
    box-sizing: border-box;
}

.inquiry-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .inquiry-meta-grid {
        grid-template-columns: 1fr;
    }
}

.inquiry-val-bold {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sp-text);
    word-break: break-word;
    margin-top: 4px;
}

.inquiry-email-link a {
    color: var(--sp-cyan);
    text-decoration: none;
    transition: color 0.15s;
}

.inquiry-email-link a:hover {
    text-decoration: underline;
}

.inquiry-message-card {
    margin-bottom: 20px;
}

.inquiry-message-content {
    font-size: 0.98rem;
    line-height: 1.7;
    padding: 16px 20px;
    border-radius: 10px;
    white-space: pre-wrap;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--sp-border-subtle);
    color: var(--sp-text);
}

.inquiry-reply-card {
    margin-bottom: 20px;
    border-left: 4px solid var(--sp-success);
}

.inquiry-reply-content {
    font-size: 0.98rem;
    line-height: 1.7;
    padding: 16px 20px;
    border-radius: 10px;
    white-space: pre-wrap;
    margin-top: 8px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--sp-text);
}

.inquiry-reply-composer {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--sp-border-subtle);
}


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

.vt-title {
    font-family: var(--sp-font-display);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--sp-text);
    margin: 0;
}

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

.vt-meta-row {
    font-size: 0.88rem;
    color: var(--sp-text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.vt-message-box {
    background: rgba(16, 22, 37, 0.95);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 10px;
    padding: 14px 18px 16px;
    margin-bottom: 14px;
    position: relative;
    transition: all 0.2s ease;
}

[data-theme="light"] .vt-message-box {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.vt-message-wrapper {
    position: relative;
    transition: max-height 0.25s ease-out;
}

/* Collapsed ONLY when it has overflow beyond 6 rows */
.vt-message-wrapper.has-overflow.collapsed {
    max-height: 140px;
    overflow: hidden;
    position: relative;
    padding-bottom: 14px;
}

.vt-message-wrapper.has-overflow.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: linear-gradient(to bottom, rgba(16, 22, 37, 0) 0%, rgba(16, 22, 37, 0.9) 65%, rgba(16, 22, 37, 1) 100%);
    pointer-events: none;
    z-index: 1;
}

[data-theme="light"] .vt-message-wrapper.has-overflow.collapsed::after {
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, 0.9) 65%, #f8fafc 100%);
}

.vt-message-wrapper.expanded {
    max-height: none !important;
    overflow: visible;
}

.vt-message-text {
    white-space: pre-wrap;
    color: var(--sp-text);
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0;
}

[data-theme="light"] .vt-message-text {
    color: #334155;
}

/* Centered More / Less toggle in fading area */
.msg-more-wrap {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    pointer-events: auto;
}

.msg-more-wrap.is-expanded {
    position: static;
    margin-top: 10px;
    transform: none;
}

.btn-more-toggle {
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.35);
    color: var(--sp-cyan);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 14px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.btn-more-toggle:hover {
    background: rgba(0, 240, 255, 0.24);
    border-color: var(--sp-cyan);
    transform: translateY(-1px);
}

[data-theme="light"] .btn-more-toggle {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0284c7;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .btn-more-toggle:hover {
    background: #bae6fd;
    border-color: #0284c7;
}

/* --- ATTACHMENTS AREA & PILLS --- */
#vt_attachments_area {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.att-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--sp-border-subtle);
    font-size: 0.82rem;
    font-family: var(--sp-font-body);
    transition: all 0.2s ease;
}

[data-theme="light"] .att-pill {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.att-pill.new {
    border-color: rgba(0, 240, 255, 0.4);
    background: rgba(0, 240, 255, 0.08);
}

[data-theme="light"] .att-pill.new {
    border-color: #38bdf8;
    background: #e0f2fe;
}

.att-link {
    color: var(--sp-cyan);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s;
}

.att-link:hover {
    text-decoration: underline;
    opacity: 0.85;
}

[data-theme="light"] .att-link {
    color: #0284c7;
}

.new-file-label {
    color: var(--sp-cyan);
    font-weight: 600;
}

[data-theme="light"] .new-file-label {
    color: #0284c7;
}

.del-att-btn,
.del-new-btn,
.del-reply-file {
    color: #ef4444;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    margin-left: 4px;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.1s;
}

.del-att-btn:hover,
.del-new-btn:hover,
.del-reply-file:hover {
    opacity: 1;
    transform: scale(1.15);
}

.reply-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.25);
    color: var(--sp-cyan);
    font-size: 0.78rem;
    margin-right: 6px;
    margin-bottom: 6px;
}

[data-theme="light"] .reply-file-pill {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #0284c7;
}

/* --- TIMELINE SPEECH BUBBLES --- */
.ticket-history-section {
    margin-top: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 170px;
    overflow: hidden;
}

.vt-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--sp-border-subtle);
    padding-bottom: 10px;
    margin-bottom: 18px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--sp-border-subtle);
    color: var(--sp-text-muted);
    border-radius: 8px;
    padding: 7px 16px;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 600;
    transition: all 0.2s;
}

.tab-btn.active,
.tab-btn:hover {
    background: rgba(0, 240, 255, 0.12);
    border-color: var(--sp-cyan);
    color: #ffffff;
}

.timeline-item {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    position: relative;
}

.timeline-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--sp-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.timeline-body {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 12px;
    padding: 14px 18px;
    box-sizing: border-box;
}

.timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--sp-text-dim);
    margin-bottom: 6px;
}

.timeline-author {
    color: var(--sp-cyan);
    font-weight: 700;
}

.timeline-content {
    font-size: 0.92rem;
    color: #cbd5e1;
    line-height: 1.55;
    white-space: pre-wrap;
}

/* --- ATTACHMENTS & UPLOAD ZONE --- */
.attachment-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 8px;
    color: var(--sp-cyan);
    text-decoration: none;
    font-size: 0.85rem;
    font-family: var(--sp-font-mono);
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.attachment-card:hover {
    border-color: var(--sp-cyan);
    background: rgba(0, 240, 255, 0.1);
}

.reply-box {
    margin-top: 14px;
    border-top: 1px solid var(--sp-border-subtle);
    padding-top: 14px;
    flex-shrink: 0;
}

.reply-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    gap: 12px;
}

/* --- ADMIN MANAGEMENT PORTAL (support-mng.php) --- */
body.admin-dashboard-active .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.admin-dashboard-active .nav-header {
    border-radius: 0 !important;
    width: calc(100% - 260px) !important;
    max-width: none !important;
    left: 260px !important;
    top: 0 !important;
    height: 64px !important;
    transform: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid var(--sp-border-subtle) !important;
    padding: 0 28px !important;
    background: rgba(9, 14, 24, 0.94) !important;
    backdrop-filter: blur(16px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    z-index: 950 !important;
    box-sizing: border-box !important;
}

[data-theme="light"] body.admin-dashboard-active .nav-header {
    background: rgba(255, 255, 255, 0.94) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04) !important;
}

body.admin-dashboard-active .nav-header .brand-wrap {
    display: none !important;
}

.admin-topbar-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}

.admin-topbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.admin-topbar-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: var(--sp-cyan) !important;
    background: rgba(0, 240, 255, 0.08) !important;
    border: 1px solid rgba(0, 240, 255, 0.25) !important;
    padding: 5px 12px !important;
    border-radius: 20px !important;
}

[data-theme="light"] .admin-topbar-pill {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.08) !important;
    border-color: rgba(2, 132, 199, 0.25) !important;
}

.admin-topbar-right {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-left: auto !important;
}

.admin-clock-display {
    color: var(--sp-text-muted) !important;
    font-family: var(--sp-font-mono, monospace) !important;
    font-size: 0.86rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
}

[data-theme="light"] .admin-clock-display {
    color: #475569 !important;
}

.admin-topbar-divider {
    width: 1px !important;
    height: 22px !important;
    background: var(--sp-border-subtle) !important;
}

[data-theme="light"] .admin-topbar-divider {
    background: #e2e8f0 !important;
}

/* Single Icon Toggle Buttons */
.admin-icon-toggle {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--sp-border-subtle) !important;
    color: var(--sp-text-muted) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    outline: none !important;
    padding: 0 !important;
}

.admin-icon-toggle:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
}

[data-theme="light"] .admin-icon-toggle {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}

[data-theme="light"] .admin-icon-toggle:hover {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
}

/* Sound Toggle states */
.admin-icon-toggle.sound-active {
    color: var(--sp-cyan) !important;
    background: rgba(0, 240, 255, 0.1) !important;
    border-color: rgba(0, 240, 255, 0.35) !important;
}
[data-theme="light"] .admin-icon-toggle.sound-active {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.1) !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
}

.admin-icon-toggle.sound-muted {
    color: var(--sp-text-dim) !important;
    opacity: 0.65 !important;
}

/* Theme Toggle active light state */
.admin-icon-toggle.theme-light-active {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
}

/* Logout Toggle Button in Topbar */
.admin-logout-toggle {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
}

.admin-logout-toggle:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
}

.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: #090e18;
    border-right: 1px solid var(--sp-border-subtle);
    padding: 24px 16px 20px;
    box-sizing: border-box;
    z-index: 900;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.admin-brand-header {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--sp-border-subtle);
    text-align: center;
}

[data-theme="light"] .admin-brand-header {
    border-bottom: 1px solid #f1f5f9;
}

.admin-brand-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-decoration: none !important;
}

.admin-brand-link .brand-cw {
    color: var(--sp-cyan) !important;
    font-family: var(--sp-font-display, inherit) !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
}

.admin-brand-link .admin-brand-title {
    font-family: var(--sp-font-display, inherit) !important;
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
}

[data-theme="light"] .admin-brand-link .admin-brand-title {
    color: #0f172a !important;
}

.admin-brand-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-family: var(--sp-font-mono);
    color: var(--sp-cyan);
    letter-spacing: 0.15em;
    margin-top: 4px;
    background: rgba(0, 240, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.admin-nav-item {
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--sp-text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    box-sizing: border-box;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.admin-nav-item.active {
    background: rgba(0, 240, 255, 0.14);
    color: var(--sp-cyan);
    border: 1px solid rgba(0, 240, 255, 0.35);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.admin-logout-area {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--sp-border-subtle);
}

.admin-user-bar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.2s ease;
}

[data-theme="light"] .admin-user-bar {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.user-bar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.user-bar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.12);
    color: var(--sp-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
}

[data-theme="light"] .user-bar-avatar {
    background: #e0f2fe;
    color: #0284c7;
}

.user-bar-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.user-bar-caption {
    font-size: 0.68rem;
    text-transform: uppercase;
    color: var(--sp-text-dim);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.04em;
}

.user-bar-username {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--sp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.btn-logout-compact {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.btn-logout-compact:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

.role-card-clickable {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.role-card-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .role-card-clickable:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.admin-user-info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: var(--sp-text-muted);
}

.admin-content {
    margin-left: 260px;
    padding: 92px 36px 40px;
    min-height: 100vh;
    box-sizing: border-box;
}

.admin-section-header {
    font-family: var(--sp-font-display);
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 24px;
    letter-spacing: -0.01em;
}

/* --- ADMIN TABLES --- */
.adm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--sp-border-subtle);
    border-radius: var(--sp-radius-md) var(--sp-radius-md) 0 0;
    overflow: hidden;
    margin-top: 16px;
    background: var(--sp-surface-card);
}

.adm-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--sp-text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--sp-border-subtle);
}

.adm-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--sp-border-subtle);
    color: var(--sp-text);
    font-size: 0.92rem;
    transition: background 0.15s;
    vertical-align: middle;
}

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

.adm-ticket-row:hover,
.adm-client-row:hover,
.adm-inquiry-row:hover,
.adm-staff-row:hover {
    background: rgba(0, 240, 255, 0.04);
}

/* --- UNIFIED ROW ACTION BUTTONS & BADGES --- */
.btn-row-action,
.view-ticket-btn,
.view-inquiry-btn,
.edit-client-btn,
.edit-staff-btn,
.edit-user-btn {
    height: 34px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--sp-font-body);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    border: 1px solid rgba(0, 240, 255, 0.35);
    background: rgba(0, 240, 255, 0.12);
    color: var(--sp-cyan);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.btn-row-action:hover,
.view-ticket-btn:hover,
.view-inquiry-btn:hover,
.edit-client-btn:hover,
.edit-staff-btn:hover,
.edit-user-btn:hover {
    background: var(--sp-cyan);
    color: #04121e;
    box-shadow: 0 0 16px var(--sp-cyan-glow);
    transform: translateY(-1px);
}

/* Status Badges & Priority Pills Uniformity */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--sp-font-mono);
    white-space: nowrap;
    box-sizing: border-box;
}

.status-badge.status-new {
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.35);
    color: var(--sp-cyan);
}

.status-badge.status-in_progress,
.status-badge.status-open {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #f59e0b;
}

.status-badge.status-completed,
.status-badge.status-enabled {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #10b981;
}

.status-badge.status-canceled,
.status-badge.status-disabled {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ef4444;
}

.priority-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--sp-font-mono);
    white-space: nowrap;
    box-sizing: border-box;
}

.priority-pill.priority-urgent {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.priority-pill.priority-standard {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #60a5fa;
}

.priority-pill.priority-low {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #94a3b8;
}


/* --- TOOLBAR UNIFORMITY (42px height, 10px radius) --- */
.toolbar-search-wrap .form-control {
    height: 42px !important;
    border-radius: 10px !important;
    font-size: 0.88rem !important;
    padding: 0 16px 0 38px !important;
}

.k-dropdown-wrap {
    height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    border-radius: 10px !important;
    font-size: 0.88rem !important;
}

.admin-toolbar .cta-button,
.toolbar-actions-row .cta-button {
    height: 42px !important;
    border-radius: 10px !important;
    padding: 0 20px !important;
    font-size: 0.88rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
}

/* --- ADMIN PAGINATION BAR --- */
.adm-pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--sp-surface-card);
    border: 1px solid var(--sp-border-subtle);
    border-top: none;
    border-radius: 0 0 var(--sp-radius-md) var(--sp-radius-md);
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    box-sizing: border-box;
}

.adm-page-info {
    font-size: 0.85rem;
    color: var(--sp-text-muted);
}

.adm-page-info strong {
    color: var(--sp-text);
}

.adm-page-nav {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-page-nav,
.btn-page-num {
    height: 34px;
    min-width: 34px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--sp-font-body);
    border: 1px solid var(--sp-border-subtle);
    background: rgba(255, 255, 255, 0.04);
    color: var(--sp-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-sizing: border-box;
}

.btn-page-nav:hover:not(:disabled),
.btn-page-num:hover:not(.active) {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--sp-cyan);
    color: var(--sp-cyan);
}

.btn-page-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.btn-page-num.active {
    background: var(--sp-cyan);
    border-color: var(--sp-cyan);
    color: #04121e;
    box-shadow: 0 0 14px var(--sp-cyan-glow);
}

/* --- SIDEBAR THEME SWITCHER --- */
.admin-theme-switch-box {
    margin-top: auto;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 12px;
    margin-bottom: 12px;
}

.admin-theme-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.admin-theme-caption {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--sp-text-dim);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-theme-tag {
    font-size: 0.72rem;
    font-family: var(--sp-font-mono);
    color: var(--sp-cyan);
    font-weight: 700;
}

.admin-theme-pills-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: rgba(0, 0, 0, 0.28);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--sp-border-subtle);
}

.admin-theme-pill {
    height: 32px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--sp-text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-theme-pill:hover {
    color: var(--sp-text);
}

.admin-theme-pill.active {
    background: var(--sp-cyan);
    color: #04121e;
    box-shadow: 0 2px 10px var(--sp-cyan-glow);
}

/* --- TIMELINE / SPEECH BUBBLES IN TICKET INSPECTOR --- */
.adm-history-stream {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    min-height: 120px;
    max-height: 270px;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--sp-scrollbar-thumb) var(--sp-scrollbar-track);
}

.adm-msg-bubble {
    padding: 14px 18px;
    border-radius: 10px;
    box-sizing: border-box;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--sp-border-subtle);
}

.adm-msg-client {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.22);
}

.adm-msg-staff {
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.24);
}

.adm-msg-meta {
    font-size: 0.8rem;
    color: var(--sp-text-muted);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.adm-msg-author {
    font-weight: 700;
    color: var(--sp-cyan);
}

.adm-msg-staff .adm-msg-author {
    color: #a78bfa;
}

.adm-msg-text {
    color: var(--sp-text);
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 0.94rem;
}

.adm-log-item {
    font-size: 0.82rem;
    color: var(--sp-text-muted);
    padding: 9px 14px;
    background: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 8px;
}

/* --- MOBILE SIDEBAR TOGGLES (Strictly hidden on desktop > 1024px) --- */
.mobile-menu-toggle,
.mobile-menu-toggle-client {
    display: none !important;
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 1001;
    background: var(--sp-cyan);
    border: none;
    border-radius: 8px;
    color: #04121e;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 4px 15px var(--sp-cyan-glow);
    transition: all 0.2s;
}

.mobile-menu-toggle-client {
    top: 80px;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle-client:hover {
    transform: scale(1.05);
}

/* --- KENDO DROPDOWNS & FILTER PILLS --- */
.k-placeholder {
    display: inline-block;
    position: relative;
}

.k-widget {
    position: relative !important;
    display: inline-block !important;
}

.k-dropdown-wrap {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 10px;
    padding: 8px 14px;
    color: var(--sp-text);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-sizing: border-box;
}
.k-dropdown-wrap:hover {
    border-color: var(--sp-cyan);
}
.k-list-container {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    width: 100% !important;
    min-width: 180px !important;
    max-height: 280px !important;
    overflow-y: auto !important;
    background: #0d1424;
    border: 1px solid var(--sp-border);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.75);
    z-index: 1000 !important;
    display: none;
}
.k-item {
    padding: 10px 14px;
    color: var(--sp-text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.k-item:hover,
.k-item.selected {
    background: rgba(0, 240, 255, 0.15);
    color: var(--sp-cyan);
}

/* --- LIGHT THEME MASTER OVERRIDES --- */
[data-theme="light"] .support-container {
    color: #0f172a;
}
[data-theme="light"] .auth-box {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .auth-title {
    color: #0f172a;
}
[data-theme="light"] .dash-heading {
    color: #0f172a;
}
[data-theme="light"] .dash-topbar,
[data-theme="light"] .dash-sidebar,
[data-theme="light"] .dash-main {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .stat-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}
[data-theme="light"] .stat-card:hover,
[data-theme="light"] .stat-card.active {
    background: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.12);
}
[data-theme="light"] .stat-number {
    color: #0f172a;
}
[data-theme="light"] .ticket-row {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}
[data-theme="light"] .ticket-row:hover {
    background: #f8fafc;
    border-color: rgba(2, 132, 199, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.03);
}
[data-theme="light"] .ticket-topic {
    color: #0f172a;
}
[data-theme="light"] .support-modal-content {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2);
}
[data-theme="light"] .support-modal-content h2,
[data-theme="light"] .support-modal-content h3,
[data-theme="light"] .support-modal-content h4 {
    color: #0f172a !important;
}
[data-theme="light"] .support-modal-content p {
    color: #475569 !important;
}
[data-theme="light"] .vt-message-box {
    background: #f8fafc;
    border-color: #e2e8f0;
}
[data-theme="light"] .vt-message-text {
    color: #334155;
}
[data-theme="light"] .timeline-body {
    background: #f8fafc;
    border-color: #e2e8f0;
}
[data-theme="light"] .timeline-content {
    color: #334155;
}
[data-theme="light"] .admin-sidebar {
    background: #ffffff;
    border-right-color: #e2e8f0;
}
[data-theme="light"] .admin-brand-title,
[data-theme="light"] .admin-section-header {
    color: #0f172a;
}
[data-theme="light"] .adm-table {
    background: #ffffff;
    border-color: #e2e8f0;
}
[data-theme="light"] .adm-table th {
    background: #f8fafc;
    color: #64748b;
    border-bottom-color: #e2e8f0;
}
[data-theme="light"] .adm-table td {
    color: #0f172a;
    border-bottom-color: #f1f5f9;
}
[data-theme="light"] .adm-ticket-row:hover,
[data-theme="light"] .adm-client-row:hover,
[data-theme="light"] .adm-inquiry-row:hover {
    background: #f1f5f9;
}
[data-theme="light"] .k-dropdown-wrap {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}
[data-theme="light"] .k-list-container {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .k-item {
    color: #334155;
}
[data-theme="light"] .k-item:hover,
[data-theme="light"] .k-item.selected {
    background: rgba(2, 132, 199, 0.08);
    color: #0284c7;
}


[data-theme="light"] .inquiry-val-bold {
    color: #0f172a;
}
[data-theme="light"] .inquiry-meta-card {
    background: #ffffff;
    border-color: #e2e8f0;
}
[data-theme="light"] .inquiry-message-content {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}
[data-theme="light"] .inquiry-reply-content {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}
[data-theme="light"] .vt-right-col {
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
}
[data-theme="light"] .vt-right-col .sidebar-info-card {
    background: #ffffff;
    border-color: #e2e8f0;
}
[data-theme="light"] .adm-msg-bubble {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}
[data-theme="light"] .adm-msg-client {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
}
[data-theme="light"] .adm-msg-staff {
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
}
[data-theme="light"] .adm-msg-text {
    color: #0f172a;
}
[data-theme="light"] .adm-msg-client .adm-msg-author {
    color: #0284c7;
}
[data-theme="light"] .adm-msg-staff .adm-msg-author {
    color: #4f46e5;
}
[data-theme="light"] .adm-log-item {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    color: #92400e;
}
[data-theme="light"] .btn-row-action,
[data-theme="light"] .view-ticket-btn,
[data-theme="light"] .view-inquiry-btn,
[data-theme="light"] .edit-client-btn,
[data-theme="light"] .edit-staff-btn,
[data-theme="light"] .edit-user-btn {
    background: rgba(2, 132, 199, 0.08);
    border-color: rgba(2, 132, 199, 0.35);
    color: #0284c7;
}
[data-theme="light"] .btn-row-action:hover,
[data-theme="light"] .view-ticket-btn:hover,
[data-theme="light"] .view-inquiry-btn:hover,
[data-theme="light"] .edit-client-btn:hover,
[data-theme="light"] .edit-staff-btn:hover,
[data-theme="light"] .edit-user-btn:hover {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}
[data-theme="light"] .adm-pagination-bar {
    background: #ffffff;
    border-color: #e2e8f0;
}
[data-theme="light"] .adm-page-info {
    color: #64748b;
}
[data-theme="light"] .adm-page-info strong {
    color: #0f172a;
}
[data-theme="light"] .btn-page-nav,
[data-theme="light"] .btn-page-num {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}
[data-theme="light"] .btn-page-num.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}
[data-theme="light"] .btn-page-nav:hover:not(:disabled),
[data-theme="light"] .btn-page-num:hover:not(.active) {
    background: rgba(2, 132, 199, 0.1);
    border-color: #0284c7;
    color: #0284c7;
}
[data-theme="light"] .admin-theme-switch-box {
    background: #f8fafc;
    border-color: #e2e8f0;
}
[data-theme="light"] .admin-theme-pills-row {
    background: #e2e8f0;
    border-color: #cbd5e1;
}
[data-theme="light"] .admin-theme-pill.active {
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}
[data-theme="light"] .adm-staff-row:hover {
    background: #f1f5f9;
}

/* --- RESPONSIVE ADJUSTMENTS --- */

/* Light theme overrides for navigation, tabs, and interactive items */
[data-theme="light"] .admin-nav-item {
    color: #475569;
    border: 1px solid transparent;
    box-sizing: border-box;
}

[data-theme="light"] .admin-nav-item:hover {
    background: #f1f5f9;
    color: #0284c7;
}

[data-theme="light"] .admin-nav-item.active {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
    border: 1px solid rgba(2, 132, 199, 0.3);
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.12);
}

[data-theme="light"] .tab-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

[data-theme="light"] .tab-btn:hover,
[data-theme="light"] .tab-btn.active {
    background: rgba(2, 132, 199, 0.1);
    border-color: #0284c7;
    color: #0284c7;
}

[data-theme="light"] .admin-theme-pill {
    color: #475569;
}

[data-theme="light"] .admin-theme-pill:hover {
    color: #0284c7;
}

[data-theme="light"] .dropdown-item {
    color: #0f172a;
}

[data-theme="light"] .dropdown-item:hover {
    background: rgba(2, 132, 199, 0.08);
    color: #0284c7;
}

@media (max-width: 1024px) {
    body.admin-dashboard-active .nav-header {
        left: 0 !important;
        width: 100% !important;
        padding: 0 16px !important;
    }
    .mobile-menu-toggle,
    .mobile-menu-toggle-client {
        display: flex !important;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .admin-sidebar.active {
        transform: translateX(0);
        box-shadow: 10px 0 35px rgba(0, 0, 0, 0.7);
    }
    .admin-content {
        margin-left: 0;
        padding: 90px 20px 40px;
    }
    .vt-modal-content {
        flex-direction: column;
    }
    .vt-left-col {
        border-right: none;
        border-bottom: 1px solid var(--sp-border-subtle);
        max-height: none;
    }
    .vt-right-col {
        max-height: none;
    }
}

@media (max-width: 640px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    .dash-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .dash-user-meta {
        width: 100%;
        justify-content: flex-end;
        gap: 10px;
    }
    .auth-box {
        padding: 30px 22px;
    }
}


/* --- ADMIN TICKET INSPECTOR STATUS DROPDOWN --- */
.admin-status-update-row {
    position: relative;
    display: flex;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
}

.admin-status-update-row .k-placeholder {
    flex: 1;
    min-width: 0;
    position: relative;
    display: block;
}

.admin-status-update-row .k-widget {
    width: 100% !important;
    display: block !important;
    position: relative !important;
}

.admin-status-update-row .k-dropdown-wrap {
    width: 100% !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    padding: 0 14px !important;
}

.admin-status-update-row .k-list-container {
    width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
    z-index: 10005 !important;
}

.k-widget .k-select {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sp-text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

.k-widget .k-select i {
    transition: transform 0.2s ease;
}

.k-widget.active .k-select i {
    transform: rotate(180deg);
    color: var(--sp-cyan);
}

.k-widget.active .k-dropdown-wrap {
    border-color: var(--sp-cyan) !important;
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.2);
}

[data-theme="light"] .k-widget.active .k-select i {
    color: #0284c7;
}

[data-theme="light"] .k-widget.active .k-dropdown-wrap {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}


/* --- DIALOG SUCCESS BUTTON (GREENISH) --- */
.cta-button.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 1px solid #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.35) !important;
}

.cta-button.btn-success:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
    border-color: #34d399 !important;
    color: #ffffff !important;
    box-shadow: 0 0 28px rgba(16, 185, 129, 0.55) !important;
    transform: translateY(-2px);
}

[data-theme="light"] .cta-button.btn-success {
    background: #10b981 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25) !important;
}

[data-theme="light"] .cta-button.btn-success:hover {
    background: #059669 !important;
    border-color: #047857 !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35) !important;
}


/* --- CLEAN STATUS INDICATOR (UN-BUTTONIZED, NO DOT) --- */
.status-indicator {
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: var(--sp-font-body);
    text-transform: capitalize;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* Status: New */
.status-indicator.status-new {
    color: var(--sp-cyan);
}

/* Status: In Progress / Open */
.status-indicator.status-in_progress,
.status-indicator.status-open {
    color: #f59e0b;
}

/* Status: Completed / Resolved */
.status-indicator.status-completed,
.status-indicator.status-resolved {
    color: #10b981;
}

/* Status: Canceled / Closed */
.status-indicator.status-canceled,
.status-indicator.status-closed {
    color: var(--sp-text-dim);
}

/* Light Theme Overrides */
[data-theme="light"] .status-indicator.status-new {
    color: #0284c7;
}

[data-theme="light"] .status-indicator.status-in_progress {
    color: #d97706;
}

[data-theme="light"] .status-indicator.status-completed {
    color: #059669;
}

[data-theme="light"] .status-indicator.status-canceled {
    color: #94a3b8;
}

/* --- TICKET ID COLUMN (FULL ROW HEIGHT FROM START) --- */
.adm-table th:first-child,
.adm-table td.adm-ticket-col-id {
    width: 115px;
    white-space: nowrap;
}

.adm-ticket-col-id .ticket-id {
    color: var(--sp-cyan);
    font-weight: 800;
    font-family: var(--sp-font-mono);
}

/* When ticket has a new reply: bg covers whole row height from the start */
.adm-ticket-col-id.has-new-reply {
    background: rgba(0, 240, 255, 0.14) !important;
    border-right: 1px solid rgba(0, 240, 255, 0.35) !important;
    box-shadow: inset 4px 0 0 var(--sp-cyan);
}

.adm-ticket-col-id.has-new-reply .ticket-id {
    color: var(--sp-cyan);
    font-weight: 800;
}

.adm-ticket-col-id.has-new-reply .tag-new {
    color: #ffffff;
    font-family: var(--sp-font-mono);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(0, 240, 255, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Light Theme Overrides */
[data-theme="light"] .adm-ticket-col-id.has-new-reply {
    background: #e0f2fe !important;
    border-right: 1px solid #bae6fd !important;
    box-shadow: inset 4px 0 0 #0284c7;
}

[data-theme="light"] .adm-ticket-col-id .ticket-id {
    color: #0284c7;
}

[data-theme="light"] .adm-ticket-col-id.has-new-reply .ticket-id {
    color: #0284c7;
}

[data-theme="light"] .adm-ticket-col-id.has-new-reply .tag-new {
    color: #ffffff;
    background: #0284c7;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ==========================================================================
   OPERATIONAL SLA BADGES (Compact 2-line badges staying on same row)
   ========================================================================== */
.tag-sla {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0.04em;
    vertical-align: middle;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
    min-width: 44px;
}

.tag-sla span {
    display: block;
    line-height: 1.05;
    white-space: nowrap;
}

/* 1. Client Replied (Vibrant Violet / Purple) */
.tag-client-replied {
    background: rgba(168, 85, 247, 0.22);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 6px rgba(168, 85, 247, 0.2);
}
[data-theme="light"] .tag-client-replied {
    background: rgba(147, 51, 234, 0.12);
    color: #7e22ce;
    border: 1px solid rgba(147, 51, 234, 0.35);
    box-shadow: none;
}

/* 2. Needs Reply (Overdue New Ticket >= 12h - Alert Amber / Tangerine) */
.tag-needs-reply {
    background: rgba(245, 158, 11, 0.22);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.55);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.2);
}
[data-theme="light"] .tag-needs-reply {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.4);
    box-shadow: none;
}

/* 3. Action Needed (In Progress >= 72h - Urgent Rose / Crimson) */
.tag-action-needed {
    background: rgba(239, 68, 68, 0.24);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.55);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.2);
}
[data-theme="light"] .tag-action-needed {
    background: rgba(225, 29, 72, 0.12);
    color: #be123c;
    border: 1px solid rgba(225, 29, 72, 0.4);
    box-shadow: none;
}

/* Row & Column Highlights for SLA Categories */
.adm-ticket-col-id.has-client-reply {
    background: rgba(168, 85, 247, 0.12) !important;
    border-right: 1px solid rgba(168, 85, 247, 0.35) !important;
    box-shadow: inset 4px 0 0 #a855f7;
}
.adm-ticket-col-id.has-client-reply .ticket-id {
    color: #c084fc;
}

.adm-ticket-col-id.has-needs-reply {
    background: rgba(245, 158, 11, 0.12) !important;
    border-right: 1px solid rgba(245, 158, 11, 0.35) !important;
    box-shadow: inset 4px 0 0 #f59e0b;
}
.adm-ticket-col-id.has-needs-reply .ticket-id {
    color: #fbbf24;
}

.adm-ticket-col-id.has-action-needed {
    background: rgba(239, 68, 68, 0.12) !important;
    border-right: 1px solid rgba(239, 68, 68, 0.35) !important;
    box-shadow: inset 4px 0 0 #ef4444;
}
.adm-ticket-col-id.has-action-needed .ticket-id {
    color: #f87171;
}

/* Light Theme Overrides for Row & Column Highlights */
[data-theme="light"] .adm-ticket-col-id.has-client-reply {
    background: #f3e8ff !important;
    border-right: 1px solid #d8b4fe !important;
    box-shadow: inset 4px 0 0 #9333ea;
}
[data-theme="light"] .adm-ticket-col-id.has-client-reply .ticket-id {
    color: #7e22ce;
}

[data-theme="light"] .adm-ticket-col-id.has-needs-reply {
    background: #fef3c7 !important;
    border-right: 1px solid #fde68a !important;
    box-shadow: inset 4px 0 0 #d97706;
}
[data-theme="light"] .adm-ticket-col-id.has-needs-reply .ticket-id {
    color: #b45309;
}

[data-theme="light"] .adm-ticket-col-id.has-action-needed {
    background: #ffe4e6 !important;
    border-right: 1px solid #fecdd3 !important;
    box-shadow: inset 4px 0 0 #e11d48;
}
[data-theme="light"] .adm-ticket-col-id.has-action-needed .ticket-id {
    color: #be123c;
}

/* --- TICKET REPLIES COUNTERS --- */
.ticket-reply-counters {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sp-font-mono);
    font-size: 0.8rem;
}

.counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--sp-border-subtle);
    color: var(--sp-text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    white-space: nowrap;
}

.counter-badge i {
    font-size: 0.72rem;
}

.counter-badge.counter-client {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.25);
}

.counter-badge.counter-staff {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.08);
    border-color: rgba(167, 139, 250, 0.25);
}

.counter-badge.counter-zero {
    opacity: 0.45;
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--sp-border-subtle);
    color: var(--sp-text-dim);
}

[data-theme="light"] .counter-badge.counter-client {
    color: #0284c7;
    background: #f0f9ff;
    border-color: #bae6fd;
}

[data-theme="light"] .counter-badge.counter-staff {
    color: #7c3aed;
    background: #f5f3ff;
    border-color: #ddd6fe;
}

[data-theme="light"] .counter-badge.counter-zero {
    opacity: 0.55;
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
}

/* --- ROW HOVER & CHEVRON --- */
.adm-ticket-row,
.adm-inquiry-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.adm-ticket-row .row-arrow,
.adm-inquiry-row .row-arrow {
    opacity: 0.3;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.adm-ticket-row:hover .row-arrow,
.adm-inquiry-row:hover .row-arrow {
    opacity: 1;
    color: var(--sp-cyan);
    transform: translateX(3px);
}

[data-theme="light"] .adm-ticket-row:hover .row-arrow,
[data-theme="light"] .adm-inquiry-row:hover .row-arrow {
    color: #0284c7;
}

/* --- TICKET CATEGORY BADGE --- */
.ticket-cat-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.22);
    color: var(--sp-cyan);
    white-space: nowrap;
}

[data-theme="light"] .ticket-cat-badge {
    background: #f0fdfa;
    border-color: #99f6e4;
    color: #0d9488;
}

/* --- KENDO DROPDOWN ACTIVE ITEM & ACTION BUTTON DISABLED STATES --- */
.k-item.k-item-disabled {
    opacity: 0.42 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: transparent !important;
    color: var(--sp-text-dim) !important;
}

.k-active-pill {
    float: right;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(6, 182, 212, 0.15);
    color: var(--sp-cyan);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 8px;
}

[data-theme="light"] .k-active-pill {
    background: #e0f2fe;
    color: #0284c7;
}

.cta-button:disabled,
.cta-button.btn-disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    filter: grayscale(35%) !important;
}

/* --- TIMELINE SORT SEGMENTED BUTTONS --- */
.timeline-sort-btn-group {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

[data-theme="light"] .timeline-sort-btn-group {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.btn-timeline-sort {
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--sp-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--sp-font-sans);
}

.btn-timeline-sort:hover {
    color: var(--sp-text);
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .btn-timeline-sort:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-timeline-sort.active {
    background: rgba(6, 182, 212, 0.14);
    color: var(--sp-cyan);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .btn-timeline-sort.active {
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* --- ATTACHMENT CARD PREVIEW HOVER --- */
.attachment-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--sp-border-subtle);
    color: var(--sp-cyan);
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 100%;
}

.attachment-card:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--sp-cyan);
    color: var(--sp-text);
    transform: translateY(-1px);
}

[data-theme="light"] .attachment-card {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0284c7;
}

[data-theme="light"] .attachment-card:hover {
    background: #f0fdfa;
    border-color: #0d9488;
    color: #0f172a;
}

.att-preview-badge {
    margin-left: auto;
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(6, 182, 212, 0.15);
    color: var(--sp-cyan);
    font-weight: 600;
}

[data-theme="light"] .att-preview-badge {
    background: #e0f2fe;
    color: #0284c7;
}

/* --- ATTACHMENT LIGHTBOX / PREVIEW MODAL --- */
.attachment-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 10, 20, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10005;
}

.attachment-viewer-dialog {
    display: flex;
    flex-direction: column;
    width: 1160px;
    max-width: 95vw;
    height: 88vh;
    max-height: 92vh;
    background: var(--sp-surface-card);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 14px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    position: relative;
    animation: viewerFadeIn 0.2s ease-out;
}

@keyframes viewerFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--sp-border-subtle);
    background: var(--sp-surface-elevated, var(--sp-surface-card));
    min-height: 60px;
    box-sizing: border-box;
}

.viewer-meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.viewer-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(6, 182, 212, 0.12);
    color: var(--sp-cyan);
    font-size: 1.15rem;
    flex-shrink: 0;
}

[data-theme="light"] .viewer-type-icon {
    background: #e0f2fe;
    color: #0284c7;
}

.viewer-file-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.viewer-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--sp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 500px;
}

.viewer-sub-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.viewer-counter-badge {
    font-family: var(--sp-font-mono);
    font-size: 0.74rem;
    color: var(--sp-cyan);
    background: rgba(6, 182, 212, 0.12);
    padding: 1px 7px;
    border-radius: 4px;
    font-weight: 600;
}

[data-theme="light"] .viewer-counter-badge {
    background: #e0f2fe;
    color: #0284c7;
}

.viewer-size-badge {
    font-family: var(--sp-font-mono);
    font-size: 0.74rem;
    color: var(--sp-text-muted);
}

.viewer-actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.viewer-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--sp-border-subtle);
    color: var(--sp-text);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.viewer-action-btn:hover {
    background: var(--sp-cyan);
    color: #04121e;
    border-color: var(--sp-cyan);
}

[data-theme="light"] .viewer-action-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

[data-theme="light"] .viewer-action-btn:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.viewer-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--sp-border-subtle);
    color: var(--sp-text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.viewer-close-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

/* Stage wrapper and navigation */
.viewer-stage-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .viewer-stage-wrapper {
    background: #f8fafc;
}

.viewer-stage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 16px;
    box-sizing: border-box;
}

.viewer-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .viewer-nav-arrow {
    background: rgba(255, 255, 255, 0.95);
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.viewer-nav-left {
    left: 18px;
}

.viewer-nav-right {
    right: 18px;
}

.viewer-nav-arrow:hover:not(:disabled) {
    background: var(--sp-cyan);
    color: #04121e;
    border-color: var(--sp-cyan);
    transform: translateY(-50%) scale(1.08);
}

.viewer-nav-arrow:disabled,
.viewer-nav-arrow.nav-disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
}

/* Specific Format Viewports */
.viewer-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.viewer-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    background: #ffffff;
}

.viewer-text-container {
    width: 100%;
    height: 100%;
    max-width: 1000px;
    overflow: auto;
    background: rgba(10, 15, 25, 0.85);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
}

[data-theme="light"] .viewer-text-container {
    background: #ffffff;
}

.viewer-code-block {
    margin: 0;
    font-family: var(--sp-font-mono);
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--sp-text);
    white-space: pre-wrap;
    word-break: break-word;
}

.viewer-doc-sheet {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    height: 100%;
    max-height: 100%;
    background: var(--sp-surface-card);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.viewer-doc-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--sp-surface-elevated, var(--sp-surface-card));
    border-bottom: 1px solid var(--sp-border-subtle);
}

.viewer-doc-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .viewer-doc-sheet-body {
    background: #ffffff;
}

.viewer-doc-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--sp-text);
    font-family: var(--sp-font-sans);
}

.viewer-fallback-card {
    text-align: center;
    padding: 40px 30px;
    max-width: 480px;
    background: var(--sp-surface-card);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.viewer-fallback-icon {
    font-size: 3.5rem;
    color: var(--sp-cyan);
    margin-bottom: 18px;
}

.viewer-fallback-title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sp-text);
    word-break: break-all;
}

.viewer-fallback-meta {
    margin: 0;
    color: var(--sp-text-muted);
    font-size: 0.9rem;
    font-family: var(--sp-font-mono);
}

.viewer-loader {
    font-size: 1.1rem;
    color: var(--sp-text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- CONVERSATION & UPDATES 3-TAB BAR --- */
.timeline-filter-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 14px;
}

.vt-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
}

.vt-tab-btn.active {
    background: rgba(6, 182, 212, 0.16);
    border-color: var(--sp-cyan);
    color: var(--sp-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

[data-theme="light"] .vt-tab-btn.active {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0284c7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* --- DASHBOARD WIDGETS & PROGRESS BARS --- */
.dash-progress-track {
    height: 7px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}

[data-theme="light"] .dash-progress-track {
    background: #e2e8f0;
}

.dash-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.dash-recent-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--sp-border-subtle);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

[data-theme="light"] .dash-recent-row {
    background: #ffffff;
    border-color: #e2e8f0;
}

.dash-recent-row:hover {
    background: rgba(0, 240, 255, 0.05);
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateX(2px);
}

[data-theme="light"] .dash-recent-row:hover {
    background: #f0f9ff;
    border-color: #bae6fd;
}

/* --- SETTINGS TABBED PANES & PERMISSIONS MATRIX --- */
.settings-nav-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--sp-border-subtle);
    padding-bottom: 14px;
}

.settings-tab-pane {
    animation: fadeInTab 0.2s ease-in-out;
}

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

.perm-matrix-table td {
    padding: 12px 14px;
    vertical-align: middle;
}

.perm-category-header td {
    background: rgba(0, 240, 255, 0.08) !important;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sp-cyan);
    padding: 9px 14px !important;
}

[data-theme="light"] .perm-category-header td {
    background: #f0f9ff !important;
    color: #0284c7;
}

.perm-toggle {
    width: 18px;
    height: 18px;
    accent-color: var(--sp-cyan);
    cursor: pointer;
    vertical-align: middle;
}

.perm-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* --- MAIL SETTINGS PROFILES & PILLS --- */
.profile-pills-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--sp-border-subtle);
    border-radius: 8px;
    padding: 5px 8px 5px 12px;
    font-size: 0.82rem;
    color: var(--sp-text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    user-select: none;
    transition: all 0.2s ease;
}

.profile-pill:hover {
    border-color: rgba(0, 240, 255, 0.4);
    background: rgba(255, 255, 255, 0.07);
}

.profile-pill.active {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--sp-cyan);
    color: var(--sp-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.profile-pill.active .pill-name {
    font-weight: 700;
}

[data-theme="light"] .profile-pill {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

[data-theme="light"] .profile-pill:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

[data-theme="light"] .profile-pill.active {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0284c7;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.15);
}

.profile-pill-dots {
    background: transparent;
    border: none;
    color: var(--sp-text-muted);
    padding: 3px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    transition: all 0.15s ease;
}

.profile-pill-dots:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--sp-text);
}

[data-theme="light"] .profile-pill-dots:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #0f172a;
}

.btn-add-profile {
    background: rgba(0, 240, 255, 0.06);
    border: 1px dashed rgba(0, 240, 255, 0.4);
    color: var(--sp-cyan);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-add-profile:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--sp-cyan);
    transform: translateY(-1px);
}

[data-theme="light"] .btn-add-profile {
    background: #f0fdf4;
    border-color: #86efac;
    color: #16a34a;
}

[data-theme="light"] .btn-add-profile:hover {
    background: #dcfce7;
    border-color: #22c55e;
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #0f172a;
    border: 1px solid var(--sp-border);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    min-width: 155px;
    z-index: 1000;
    padding: 4px 0;
    display: none;
}

[data-theme="light"] .profile-dropdown-menu {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.82rem;
    color: var(--sp-text);
    cursor: pointer;
    transition: background 0.15s ease;
}

.profile-menu-item:hover {
    background: rgba(0, 240, 255, 0.1);
    color: var(--sp-cyan);
}

[data-theme="light"] .profile-menu-item:hover {
    background: #f1f5f9;
    color: #0284c7;
}

.profile-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: var(--sp-danger);
}

/* --- CORNER TOAST NOTIFICATIONS --- */
.toast-container-corner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100000;
    pointer-events: none;
}

.profile-toast {
    pointer-events: auto;
    background: #064e3b;
    border: 1px solid #059669;
    color: #ecfdf5;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[data-theme="light"] .profile-toast {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #065f46;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.profile-toast .toast-close {
    margin-left: 10px;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
}

.profile-toast .toast-close:hover {
    opacity: 1;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Click to Copy Chip */
.btn-copy-chip {
    background: transparent;
    border: none;
    color: var(--sp-text-muted);
    cursor: pointer;
    padding: 3px 6px;
    font-size: 0.82rem;
    border-radius: 4px;
    margin-left: 6px;
    transition: color 0.15s, background 0.15s;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}
.btn-copy-chip:hover {
    color: var(--sp-cyan);
    background: rgba(0, 240, 255, 0.12);
}

/* Real-time Interactive Notification Toasts with Sound */
.cw-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10010;
    max-width: 380px;
    width: calc(100% - 48px);
    pointer-events: none;
}

.cw-notif-card {
    pointer-events: auto;
    background: #0d1527;
    border: 1px solid var(--sp-border);
    border-left: 4px solid var(--sp-cyan);
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: cwSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.2s, opacity 0.2s;
    backdrop-filter: blur(12px);
}

[data-theme="light"] .cw-notif-card {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.cw-notif-card.type-ticket {
    border-left-color: var(--sp-cyan);
}
.cw-notif-card.type-lead {
    border-left-color: #10b981;
}
.cw-notif-card.type-reply {
    border-left-color: #a855f7;
}

.cw-notif-icon {
    font-size: 1.25rem;
    line-height: 1;
    margin-top: 2px;
}
.cw-notif-card.type-ticket .cw-notif-icon { color: var(--sp-cyan); }
.cw-notif-card.type-lead .cw-notif-icon { color: #10b981; }
.cw-notif-card.type-reply .cw-notif-icon { color: #a855f7; }

.cw-notif-body {
    flex: 1;
    min-width: 0;
}

.cw-notif-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--sp-text);
    margin-bottom: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cw-notif-desc {
    font-size: 0.82rem;
    color: var(--sp-text-muted);
    line-height: 1.4;
    word-break: break-word;
    margin-bottom: 8px;
}

.cw-notif-action-btn {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--sp-border-subtle);
    color: var(--sp-text);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cw-notif-action-btn:hover {
    background: var(--sp-cyan);
    color: #04121e;
    border-color: var(--sp-cyan);
}

.cw-notif-close {
    background: transparent;
    border: none;
    color: var(--sp-text-dim);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0 0 6px;
    transition: color 0.15s;
}
.cw-notif-close:hover {
    color: var(--sp-text);
}

@keyframes cwSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Tickets Pipeline Grid */
.tickets-pipeline-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
}
@media (max-width: 1200px) {
    .tickets-pipeline-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 640px) {
    .tickets-pipeline-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Reformed Leads by Website Source Cards */
.lead-sources-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
}

@media (max-width: 1200px) {
    .lead-sources-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 640px) {
    .lead-sources-grid {
        grid-template-columns: 1fr !important;
    }
}

.lead-source-card {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 18px 22px !important;
    border-radius: 12px !important;
    background: var(--sp-surface-card) !important;
    border: 1px solid var(--sp-border-subtle) !important;
    box-sizing: border-box !important;
    min-height: 100px !important;
    position: relative !important;
    cursor: default !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}
.lead-source-card::before {
    display: none !important;
}
.lead-source-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.lead-source-left {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    text-align: left !important;
}

.lead-source-domain {
    font-size: 0.98rem !important;
    font-weight: 800 !important;
    font-family: var(--sp-font-display, inherit) !important;
    line-height: 1.2 !important;
    margin-bottom: 6px !important;
    letter-spacing: -0.01em !important;
    text-align: left !important;
    display: block !important;
}

.lead-source-count {
    font-size: 2.6rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    font-family: var(--sp-font-display, inherit) !important;
    text-align: left !important;
    display: block !important;
}

.lead-source-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-left: auto !important;
}

.lead-source-stat-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
}

.lead-source-stat-lbl {
    display: flex !important;
    flex-direction: column !important;
    font-size: 0.68rem !important;
    line-height: 1.15 !important;
    font-weight: 600 !important;
    text-align: right !important;
    text-transform: lowercase !important;
    opacity: 0.9;
}

.lead-source-stat-num {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    font-family: var(--sp-font-display, inherit) !important;
    line-height: 1 !important;
    min-width: 24px !important;
    text-align: right !important;
}

/* Card 1: codewright.eu (Theme Brand: CodeWright Cyan) */
.source-card-cw {
    border-color: rgba(0, 240, 255, 0.35) !important;
    background: rgba(0, 240, 255, 0.035) !important;
}
.source-card-cw .lead-source-domain,
.source-card-cw .lead-source-count,
.source-card-cw .lead-source-stat-num {
    color: #00f0ff !important;
}
.source-card-cw .lead-source-stat-lbl {
    color: #67e8f9 !important;
}

[data-theme="light"] .source-card-cw {
    border-color: rgba(2, 132, 199, 0.35) !important;
    background: rgba(2, 132, 199, 0.035) !important;
}
[data-theme="light"] .source-card-cw .lead-source-domain,
[data-theme="light"] .source-card-cw .lead-source-count,
[data-theme="light"] .source-card-cw .lead-source-stat-num {
    color: #0284c7 !important;
}
[data-theme="light"] .source-card-cw .lead-source-stat-lbl {
    color: #0369a1 !important;
}

/* Card 2: cartconsole.com (Theme Brand: CartConsole Emerald Green) */
.source-card-cc {
    border-color: rgba(16, 185, 129, 0.4) !important;
    background: rgba(16, 185, 129, 0.04) !important;
}
.source-card-cc .lead-source-domain,
.source-card-cc .lead-source-count,
.source-card-cc .lead-source-stat-num {
    color: #10b981 !important;
}
.source-card-cc .lead-source-stat-lbl {
    color: #34d399 !important;
}

[data-theme="light"] .source-card-cc {
    border-color: rgba(5, 150, 105, 0.35) !important;
    background: rgba(5, 150, 105, 0.035) !important;
}
[data-theme="light"] .source-card-cc .lead-source-domain,
[data-theme="light"] .source-card-cc .lead-source-count,
[data-theme="light"] .source-card-cc .lead-source-stat-num {
    color: #059669 !important;
}
[data-theme="light"] .source-card-cc .lead-source-stat-lbl {
    color: #047857 !important;
}

/* Card 3: sygraphe.com (Theme Brand: Sygraphe Purple / Violet) */
.source-card-sy {
    border-color: rgba(139, 92, 246, 0.4) !important;
    background: rgba(139, 92, 246, 0.04) !important;
}
.source-card-sy .lead-source-domain,
.source-card-sy .lead-source-count,
.source-card-sy .lead-source-stat-num {
    color: #a78bfa !important;
}
.source-card-sy .lead-source-stat-lbl {
    color: #c4b5fd !important;
}

[data-theme="light"] .source-card-sy {
    border-color: rgba(124, 58, 237, 0.35) !important;
    background: rgba(124, 58, 237, 0.035) !important;
}
[data-theme="light"] .source-card-sy .lead-source-domain,
[data-theme="light"] .source-card-sy .lead-source-count,
[data-theme="light"] .source-card-sy .lead-source-stat-num {
    color: #7c3aed !important;
}
[data-theme="light"] .source-card-sy .lead-source-stat-lbl {
    color: #6d28d9 !important;
}

/* Card 4: total (Theme Brand: Amber / Gold Multi-Site) */
.source-card-total {
    border-color: rgba(245, 158, 11, 0.45) !important;
    background: rgba(245, 158, 11, 0.045) !important;
}
.source-card-total .lead-source-domain,
.source-card-total .lead-source-count,
.source-card-total .lead-source-stat-num {
    color: #fbbf24 !important;
}
.source-card-total .lead-source-stat-lbl {
    color: #fde68a !important;
}

[data-theme="light"] .source-card-total {
    border-color: rgba(217, 119, 6, 0.4) !important;
    background: rgba(217, 119, 6, 0.04) !important;
}
[data-theme="light"] .source-card-total .lead-source-domain,
[data-theme="light"] .source-card-total .lead-source-count,
[data-theme="light"] .source-card-total .lead-source-stat-num {
    color: #d97706 !important;
}
[data-theme="light"] .source-card-total .lead-source-stat-lbl {
    color: #b45309 !important;
}

/* Ensure Profile Dropdown is never clipped by topbar */
.dash-topbar,
.dash-user-meta,
.profile-wrapper {
    overflow: visible !important;
}

.profile-dropdown {
    z-index: 1000 !important;
}

.dropdown-item.text-danger {
    color: #ef4444 !important;
    font-weight: 600;
}
.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #dc2626 !important;
}

/* Ensure Confirmation Modal is always above loaders and flex-centered */
#modal-confirm {
    z-index: 10060 !important;
}

#modal-confirm .support-modal-content {
    display: block !important;
    margin: auto !important;
}

.attachment-card img {
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .attachment-card img {
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.support-modal[style*="display: block"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* --- ADMIN TOPBAR NAV LINKS --- */
.admin-topbar-navlink {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: var(--sp-text-muted) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--sp-border-subtle) !important;
    padding: 6px 14px !important;
    height: 34px !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.admin-topbar-navlink:hover {
    color: var(--sp-cyan) !important;
    background: rgba(0, 240, 255, 0.08) !important;
    border-color: rgba(0, 240, 255, 0.3) !important;
    transform: translateY(-1px) !important;
}
[data-theme="light"] .admin-topbar-navlink {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}
[data-theme="light"] .admin-topbar-navlink:hover {
    background: #e2e8f0 !important;
    border-color: #0284c7 !important;
    color: #0284c7 !important;
}


/* ===================== ANNOUNCEMENT PREVIEW STYLES (MANAGEMENT PORTAL) ===================== */
.ann-preview-stage {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
  padding: 16px;
  margin-bottom: 16px;
  transition: all 0.25s ease;
}

[data-theme="light"] .ann-preview-stage {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.04);
}

.cw-announcement-bar-preview.ann-type-cyan {
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.14), rgba(10, 14, 24, 0.94) 50%, rgba(0, 240, 255, 0.14));
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: #e0f2fe;
}
.cw-announcement-bar-preview.ann-type-cyan .ann-preview-icon {
  color: #00f0ff;
}
.cw-announcement-bar-preview.ann-type-cyan .ann-preview-btn {
  background: rgba(0, 240, 255, 0.16);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.45);
}

.cw-announcement-bar-preview.ann-type-purple {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.16), rgba(10, 14, 24, 0.94) 50%, rgba(168, 85, 247, 0.16));
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #f3e8ff;
}
.cw-announcement-bar-preview.ann-type-purple .ann-preview-icon {
  color: #c084fc;
}
.cw-announcement-bar-preview.ann-type-purple .ann-preview-btn {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.45);
}

.cw-announcement-bar-preview.ann-type-emerald {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.16), rgba(10, 14, 24, 0.94) 50%, rgba(16, 185, 129, 0.16));
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #ecfdf5;
}
.cw-announcement-bar-preview.ann-type-emerald .ann-preview-icon {
  color: #34d399;
}
.cw-announcement-bar-preview.ann-type-emerald .ann-preview-btn {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.cw-announcement-bar-preview.ann-type-amber {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.16), rgba(10, 14, 24, 0.94) 50%, rgba(245, 158, 11, 0.16));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fffbeb;
}
.cw-announcement-bar-preview.ann-type-amber .ann-preview-icon {
  color: #fbbf24;
}
.cw-announcement-bar-preview.ann-type-amber .ann-preview-btn {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

/* --- LIGHT THEME PREVIEW BAR VARIANTS (PORTAL) --- */
[data-theme="light"] .cw-announcement-bar-preview.ann-type-cyan {
  background: linear-gradient(90deg, #ecfeff, #f8fafc 50%, #ecfeff) !important;
  border: 1px solid #a5f3fc !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
}
[data-theme="light"] .cw-announcement-bar-preview.ann-type-cyan .ann-preview-icon {
  color: #0284c7 !important;
}
[data-theme="light"] .cw-announcement-bar-preview.ann-type-cyan .ann-preview-btn {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: 1px solid #0284c7 !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.22);
}
[data-theme="light"] .cw-announcement-bar-preview.ann-type-cyan .ann-preview-btn:hover {
  background: #0369a1 !important;
  border-color: #0369a1 !important;
}

[data-theme="light"] .cw-announcement-bar-preview.ann-type-purple {
  background: linear-gradient(90deg, #faf5ff, #f8fafc 50%, #faf5ff) !important;
  border: 1px solid #e9d5ff !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(147, 51, 234, 0.08);
}
[data-theme="light"] .cw-announcement-bar-preview.ann-type-purple .ann-preview-icon {
  color: #9333ea !important;
}
[data-theme="light"] .cw-announcement-bar-preview.ann-type-purple .ann-preview-btn {
  background: #9333ea !important;
  color: #ffffff !important;
  border: 1px solid #9333ea !important;
  box-shadow: 0 2px 6px rgba(147, 51, 234, 0.22);
}
[data-theme="light"] .cw-announcement-bar-preview.ann-type-purple .ann-preview-btn:hover {
  background: #7e22ce !important;
  border-color: #7e22ce !important;
}

[data-theme="light"] .cw-announcement-bar-preview.ann-type-emerald {
  background: linear-gradient(90deg, #ecfdf5, #f8fafc 50%, #ecfdf5) !important;
  border: 1px solid #a7f3d0 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.08);
}
[data-theme="light"] .cw-announcement-bar-preview.ann-type-emerald .ann-preview-icon {
  color: #059669 !important;
}
[data-theme="light"] .cw-announcement-bar-preview.ann-type-emerald .ann-preview-btn {
  background: #059669 !important;
  color: #ffffff !important;
  border: 1px solid #059669 !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.22);
}
[data-theme="light"] .cw-announcement-bar-preview.ann-type-emerald .ann-preview-btn:hover {
  background: #047857 !important;
  border-color: #047857 !important;
}

[data-theme="light"] .cw-announcement-bar-preview.ann-type-amber {
  background: linear-gradient(90deg, #fffbeb, #f8fafc 50%, #fffbeb) !important;
  border: 1px solid #fde68a !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.08);
}
[data-theme="light"] .cw-announcement-bar-preview.ann-type-amber .ann-preview-icon {
  color: #d97706 !important;
}
[data-theme="light"] .cw-announcement-bar-preview.ann-type-amber .ann-preview-btn {
  background: #d97706 !important;
  color: #ffffff !important;
  border: 1px solid #d97706 !important;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.22);
}
[data-theme="light"] .cw-announcement-bar-preview.ann-type-amber .ann-preview-btn:hover {
  background: #b45309 !important;
  border-color: #b45309 !important;
}

/* Master Strip & Blocks */
.ann-publish-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 240, 255, 0.04);
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: 10px;
  padding: 12px 18px;
  flex-wrap: wrap;
  gap: 12px;
  transition: all 0.25s ease;
}
[data-theme="light"] .ann-publish-strip {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.ann-content-block-el {
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
  transition: all 0.25s ease;
}
[data-theme="light"] .ann-content-block-el {
  background: #eff6ff;
  border-color: #bfdbfe;
}
[data-theme="light"] .ann-content-block-el .ann-block-title {
  color: #1d4ed8 !important;
}

.ann-content-block-en {
  background: rgba(0, 240, 255, 0.04);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
  transition: all 0.25s ease;
}
[data-theme="light"] .ann-content-block-en {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
[data-theme="light"] .ann-content-block-en .ann-block-title {
  color: #059669 !important;
}

.ann-footnote-box {
  font-size: 0.8rem;
  color: var(--sp-text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--sp-border-subtle);
  padding: 10px 14px;
  border-radius: 8px;
  transition: all 0.25s ease;
}
[data-theme="light"] .ann-footnote-box {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #64748b;
}

#ann-preview-close:hover {
  opacity: 1 !important;
}

.ann-dismiss-box {
  margin-bottom: 6px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--sp-border-subtle);
  border-radius: 10px;
  transition: all 0.25s ease;
}
[data-theme="light"] .ann-dismiss-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

/* --- ANNOUNCEMENTS ADMIN STYLES & CONTROLS --- */
.cw-toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.cw-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cw-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.14);
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 26px;
  border: 1px solid var(--sp-border-subtle);
}
.cw-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.cw-toggle-switch input:checked + .cw-toggle-slider {
  background-color: var(--sp-cyan);
  border-color: var(--sp-cyan);
  box-shadow: 0 0 14px var(--sp-cyan-glow);
}
.cw-toggle-switch input:checked + .cw-toggle-slider:before {
  transform: translateX(22px);
  background-color: #070a12;
}

[data-theme="light"] .cw-toggle-slider {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
}
[data-theme="light"] .cw-toggle-switch input:checked + .cw-toggle-slider {
  background-color: #0284c7;
  border-color: #0284c7;
}
[data-theme="light"] .cw-toggle-switch input:checked + .cw-toggle-slider:before {
  background-color: #ffffff;
}

.ann-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-family: var(--sp-font-mono);
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--sp-border-subtle);
  color: var(--sp-cyan);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.ann-chip:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--sp-cyan);
  transform: translateY(-1px);
}
[data-theme="light"] .ann-chip {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0284c7;
}
[data-theme="light"] .ann-chip:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
}

.ann-preview-lang-btn {
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--sp-border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--sp-text-muted);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ann-preview-lang-btn:hover {
  color: var(--sp-text);
  border-color: var(--sp-border-hover);
}
.ann-preview-lang-btn.active {
  background: rgba(0, 240, 255, 0.14);
  border-color: var(--sp-cyan);
  color: var(--sp-cyan);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}
[data-theme="light"] .ann-preview-lang-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}
[data-theme="light"] .ann-preview-lang-btn:hover {
  background: #f8fafc;
  border-color: #0284c7;
  color: #0284c7;
}
[data-theme="light"] .ann-preview-lang-btn.active {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.18);
}

.ann-char-counter {
  font-size: 0.75rem;
  color: var(--sp-text-dim);
  font-family: var(--sp-font-mono);
}
[data-theme="light"] .ann-char-counter {
  color: #64748b;
}

.ann-panel-card {
  background: var(--sp-surface-card);
  border: 1px solid var(--sp-border-subtle);
  border-radius: var(--sp-radius-md);
  padding: 22px;
  box-sizing: border-box;
}
