/* =====================================================
   HERO-Support — Master Enterprise Design System
   CSS v3.0 — Complete Public, Admin, Staff & Gateway Styles
   ===================================================== */

:root {
    --hero-primary:        #2563eb;
    --hero-primary-hover:  #1d4ed8;
    --hero-primary-light:  #eff6ff;
    --hero-success:        #10b981;
    --hero-success-light:  #ecfdf5;
    --hero-warning:        #f59e0b;
    --hero-warning-light:  #fffbeb;
    --hero-danger:         #ef4444;
    --hero-danger-light:   #fef2f2;
    --hero-surface:        #ffffff;
    --hero-surface-subtle: #f8fafc;
    --hero-bg:             #f1f5f9;
    --hero-border:         #e2e8f0;
    --hero-text:           #334155;
    --hero-text-strong:    #0f172a;
    --hero-text-muted:     #64748b;
    --hero-sidebar-bg:     #0f172a;
    --hero-sidebar-text:   #94a3b8;
    --hero-font:           -apple-system, BlinkMacSystemFont, 'Plus Jakarta Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --hero-radius:         10px;
    --hero-radius-sm:      6px;
    --hero-shadow:         0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(15,23,42,.05);
    --hero-shadow-lg:      0 8px 30px rgba(15,23,42,.10);
}

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--hero-font);
    background: var(--hero-bg);
    color: var(--hero-text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
a { color: var(--hero-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ── App Shell (Admin & Staff sidebar layout) ─────── */
.hero-app-body {
    background: var(--hero-bg);
    min-height: 100vh;
}
.hero-app-layout {
    display: flex;
    min-height: 100vh;
}
.hero-main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: hidden;
}
.hero-page-content {
    flex: 1;
    padding: 28px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* ── Sidebar ──────────────────────────────────────── */
.hero-sidebar {
    width: 256px;
    background: var(--hero-sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    transition: width .2s ease;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 200;
}
.hero-sidebar-brand {
    padding: 0 18px;
    height: 64px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #1e293b;
    flex-shrink: 0;
}
.hero-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.hero-logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
}
.hero-brand-text { display: flex; flex-direction: column; }
.hero-brand-title {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -.3px;
    line-height: 1.2;
}
.hero-brand-badge {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.hero-sidebar-nav {
    flex: 1;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}
.hero-nav-section-title {
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 12px 8px 6px;
}
.hero-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--hero-sidebar-text);
    font-size: 13.5px;
    font-weight: 600;
    transition: all .15s ease;
    cursor: pointer;
    text-decoration: none;
}
.hero-nav-item:hover {
    background: #1e293b;
    color: #ffffff;
    text-decoration: none;
}
.hero-nav-item.active {
    background: var(--hero-primary);
    color: #ffffff;
}
.hero-nav-item i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.hero-nav-counter {
    margin-left: auto;
    background: rgba(255,255,255,.2);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
}
.hero-sidebar-footer {
    border-top: 1px solid #1e293b;
    padding: 14px 12px;
    flex-shrink: 0;
}
.hero-user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}
.hero-user-avatar { flex-shrink: 0; }
.hero-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.hero-user-name {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hero-user-role {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hero-logout-btn {
    color: #64748b;
    font-size: 15px;
    padding: 4px;
    border-radius: 6px;
    transition: color .15s;
    flex-shrink: 0;
}
.hero-logout-btn:hover { color: #ef4444; text-decoration: none; }

/* ── Topbar ───────────────────────────────────────── */
.hero-topbar {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid var(--hero-border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}
.hero-topbar-left { display: flex; align-items: center; gap: 14px; }
.hero-topbar-right { display: flex; align-items: center; gap: 10px; }
.hero-sidebar-toggle {
    background: none;
    border: none;
    color: var(--hero-text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: color .15s;
}
.hero-sidebar-toggle:hover { color: var(--hero-primary); }
.hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
}
.hero-crumb-root { color: var(--hero-text-muted); font-weight: 500; }
.hero-crumb-sep { color: #cbd5e1; font-size: 10px; }
.hero-crumb-current { color: var(--hero-text-strong); font-weight: 700; }
.hero-topbar-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--hero-surface-subtle);
    border: 1px solid var(--hero-border);
    border-radius: 8px;
    color: var(--hero-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s;
}
.hero-topbar-stat:hover { border-color: var(--hero-primary); text-decoration: none; }

/* ── Buttons ──────────────────────────────────────── */
.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all .15s ease;
    line-height: 1.4;
    white-space: nowrap;
}
.hero-btn:hover { text-decoration: none; }
.hero-btn-primary { background: var(--hero-primary); color: #fff; border-color: var(--hero-primary); }
.hero-btn-primary:hover { background: var(--hero-primary-hover); border-color: var(--hero-primary-hover); color: #fff; }
.hero-btn-secondary { background: #fff; color: var(--hero-text); border-color: var(--hero-border); }
.hero-btn-secondary:hover { background: var(--hero-surface-subtle); color: var(--hero-text); }
.hero-btn-success { background: var(--hero-success); color: #fff; border-color: var(--hero-success); }
.hero-btn-success:hover { background: #059669; color: #fff; }
.hero-btn-danger { background: var(--hero-danger); color: #fff; border-color: var(--hero-danger); }
.hero-btn-danger:hover { background: #dc2626; color: #fff; }
.hero-btn-warning { background: var(--hero-warning); color: #fff; border-color: var(--hero-warning); }
.hero-btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 6px; gap: 5px; }
.hero-btn-lg { padding: 12px 24px; font-size: 15px; }
.hero-btn-icon-subtle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--hero-text-muted);
    font-size: 14px;
    padding: 5px;
    border-radius: 5px;
    transition: color .15s;
}
.hero-btn-icon-subtle:hover { color: var(--hero-text-strong); }
.hero-btn-icon-subtle.text-danger:hover { color: var(--hero-danger); }
.w-full { width: 100%; }

/* ── Cards / Panels ───────────────────────────────── */
.hero-panel {
    background: var(--hero-surface);
    border: 1px solid var(--hero-border);
    border-radius: var(--hero-radius);
    box-shadow: var(--hero-shadow);
    margin-bottom: 24px;
}
.hero-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--hero-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.hero-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--hero-text-strong);
    display: flex;
    align-items: center;
    gap: 8px;
}
.hero-panel-body { padding: 20px; }

/* ── Stats Grid ───────────────────────────────────── */
.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.hero-stat-card {
    background: var(--hero-surface);
    border: 1px solid var(--hero-border);
    border-radius: var(--hero-radius);
    padding: 20px;
    box-shadow: var(--hero-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.hero-stat-info { flex: 1; min-width: 0; }
.hero-stat-value { font-size: 28px; font-weight: 800; color: var(--hero-text-strong); line-height: 1.1; }
.hero-stat-label { font-size: 12px; font-weight: 700; color: var(--hero-text-muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }
.hero-stat-trend { font-size: 11px; margin-top: 6px; }
.hero-stat-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* ── Tables ───────────────────────────────────────── */
.hero-table-wrap { width: 100%; overflow-x: auto; }
.hero-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
}
.hero-table th {
    padding: 11px 16px;
    background: var(--hero-surface-subtle);
    color: var(--hero-text-muted);
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-bottom: 1px solid var(--hero-border);
    white-space: nowrap;
}
.hero-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--hero-border);
    vertical-align: middle;
    color: var(--hero-text);
}
.hero-table tbody tr:last-child td { border-bottom: none; }
.hero-table tbody tr:hover { background: var(--hero-surface-subtle); }

/* ── Forms & Controls ─────────────────────────────── */
.hero-form-group { margin-bottom: 16px; }
.hero-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--hero-text-strong);
    margin-bottom: 6px;
}
.hero-input, .hero-select, .hero-textarea {
    width: 100%;
    padding: 9px 12px;
    font-size: 13.5px;
    font-family: var(--hero-font);
    border: 1.5px solid var(--hero-border);
    border-radius: 7px;
    background: #fff;
    color: var(--hero-text-strong);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.hero-input:focus, .hero-select:focus, .hero-textarea:focus {
    border-color: var(--hero-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.hero-textarea { resize: vertical; min-height: 90px; }
.hero-input-sm { padding: 6px 10px; font-size: 12.5px; }
.hero-input-icon-wrapper { position: relative; }
.hero-input-icon {
    position: absolute;
    left: 10px; top: 50%;
    transform: translateY(-50%);
    color: var(--hero-text-muted);
    font-size: 13px;
    pointer-events: none;
}
.hero-input-icon-wrapper .hero-input { padding-left: 34px; }
.hero-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.hero-form { width: 100%; }

/* ── Alerts & Flashes ─────────────────────────────── */
.hero-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--hero-radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.hero-alert-success { background: var(--hero-success-light); color: #065f46; border-color: #a7f3d0; }
.hero-alert-danger  { background: var(--hero-danger-light);  color: #991b1b; border-color: #fca5a5; }
.hero-alert-warning { background: var(--hero-warning-light); color: #92400e; border-color: #fde68a; }
.hero-alert-info    { background: var(--hero-primary-light); color: #1e40af; border-color: #bfdbfe; }

/* ── Badges ───────────────────────────────────────── */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}
.hero-badge-open        { background: #dbeafe; color: #1e40af; }
.hero-badge-in_progress { background: #fef3c7; color: #92400e; }
.hero-badge-awaiting_reply { background: #ede9fe; color: #5b21b6; }
.hero-badge-resolved    { background: #dcfce7; color: #166534; }
.hero-badge-closed      { background: #f1f5f9; color: #475569; }
.hero-badge-low         { background: #f0fdf4; color: #166534; }
.hero-badge-medium      { background: #eff6ff; color: #1e40af; }
.hero-badge-high        { background: #fff7ed; color: #c2410c; }
.hero-badge-urgent      { background: #fef2f2; color: #991b1b; }
.hero-badge-success     { background: var(--hero-success-light); color: #065f46; }
.hero-badge-subtle      { background: var(--hero-surface-subtle); color: var(--hero-text-muted); border: 1px solid var(--hero-border); }

/* ── Avatar ───────────────────────────────────────── */
.hero-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    font-size: 13px;
}

/* ── Modals ───────────────────────────────────────── */
.hero-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(15,23,42,.55);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.hero-modal-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--hero-shadow-lg);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.hero-modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--hero-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hero-modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--hero-text-strong);
    display: flex;
    align-items: center;
    gap: 8px;
}
.hero-modal-close {
    background: none; border: none; cursor: pointer;
    font-size: 20px; color: var(--hero-text-muted);
    padding: 2px 6px; border-radius: 4px;
    transition: color .15s;
}
.hero-modal-close:hover { color: var(--hero-danger); }
.hero-modal-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
}
.hero-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--hero-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* ── Webmail 3-Pane ───────────────────────────────── */
.hero-webmail-container {
    display: grid;
    grid-template-columns: 220px 320px 1fr;
    height: calc(100vh - 128px);
    min-height: 580px;
    background: var(--hero-surface);
    border: 1px solid var(--hero-border);
    border-radius: var(--hero-radius);
    box-shadow: var(--hero-shadow);
    overflow: hidden;
}
.hero-mail-pane-folders {
    background: var(--hero-surface-subtle);
    border-right: 1px solid var(--hero-border);
    overflow-y: auto;
}
.hero-mail-pane-list {
    border-right: 1px solid var(--hero-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.hero-mail-pane-view {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #fff;
}
.hero-mail-nav-group { padding: 6px 10px; }
.hero-mail-nav-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--hero-text-muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 8px 4px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hero-mail-folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hero-text);
    text-decoration: none;
    transition: background .12s;
    margin-bottom: 2px;
}
.hero-mail-folder-item:hover { background: var(--hero-border); text-decoration: none; }
.hero-mail-folder-item.active { background: var(--hero-primary); color: #fff; }
.hero-mail-badge {
    background: var(--hero-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
}
.hero-mail-list-header {
    padding: 10px;
    border-bottom: 1px solid var(--hero-border);
    flex-shrink: 0;
}
.hero-mail-items-container { flex: 1; overflow-y: auto; }
.hero-mail-list-item {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--hero-border);
    text-decoration: none;
    color: var(--hero-text);
    transition: background .12s;
    cursor: pointer;
}
.hero-mail-list-item:hover { background: var(--hero-surface-subtle); text-decoration: none; }
.hero-mail-list-item.selected { background: var(--hero-primary-light); border-left: 3px solid var(--hero-primary); }
.hero-mail-list-item.unread .hero-mail-sender { font-weight: 800; }
.hero-mail-list-item.unread .hero-mail-subject { font-weight: 700; }
.hero-mail-sender { font-size: 13px; font-weight: 600; color: var(--hero-text-strong); }
.hero-mail-date   { font-size: 11px; color: var(--hero-text-muted); flex-shrink: 0; }
.hero-mail-subject{ font-size: 13px; color: var(--hero-text); margin-top: 2px; }
.hero-mail-snippet{ font-size: 12px; color: var(--hero-text-muted); margin-top: 2px; }
.hero-mail-view-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--hero-border);
    flex-shrink: 0;
}
.hero-mail-view-title-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.hero-mail-view-subject { font-size: 17px; font-weight: 800; color: var(--hero-text-strong); line-height: 1.3; }
.hero-mail-action-buttons { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.hero-mail-sender-row { display: flex; align-items: center; gap: 12px; }
.hero-mail-view-body { flex: 1; padding: 22px; overflow-y: auto; }
.hero-mail-html-content { font-size: 14px; line-height: 1.7; }
.hero-mail-text-content { font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.hero-mail-quick-reply {
    border-top: 1px solid var(--hero-border);
    padding: 14px 18px;
    background: var(--hero-surface-subtle);
    flex-shrink: 0;
}
.hero-mail-empty-selection {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--hero-text-muted);
    text-align: center;
    gap: 8px;
}

/* =====================================================
   PUBLIC PORTAL DARK THEME (public/index.php & track.php)
   ===================================================== */
.hero-page-bg {
    background: #0f172a;
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #f1f5f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.hero-navbar {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.hero-navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hero-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.3px;
}
.hero-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.hero-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hero-nav-links a {
    color: #94a3b8;
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hero-nav-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}
.hero-nav-links a.active {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.25);
    border: 1px solid rgba(37, 99, 235, 0.4);
}
.hero-btn-subtle {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
}
.hero-btn-subtle:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Jumbotron */
.hero-jumbotron {
    padding: 56px 24px 44px;
    background: radial-gradient(circle at top center, rgba(37, 99, 235, 0.22) 0%, transparent 70%);
    text-align: center;
}
.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}
.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(93, 156, 255, 0.3);
    border-radius: 999px;
    color: #60a5fa;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.hero-jumbotron-title {
    font-size: 38px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.8px;
    margin-top: 14px;
    margin-bottom: 10px;
    line-height: 1.2;
}
.hero-jumbotron-subtitle {
    font-size: 15.5px;
    color: #94a3b8;
    max-width: 580px;
    margin: 0 auto 28px;
    line-height: 1.6;
}
.hero-search-box-wrap {
    max-width: 600px;
    margin: 0 auto;
}
.hero-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #1e293b;
    border: 1.5px solid #334155;
    border-radius: 12px;
    padding: 6px 6px 6px 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    transition: all 0.2s ease;
}
.hero-search-box:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25), 0 12px 32px rgba(0, 0, 0, 0.4);
}
.hero-search-icon {
    color: #64748b;
    font-size: 16px;
    margin-right: 12px;
}
.hero-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 14.5px;
    font-family: inherit;
    padding: 8px 0;
}
.hero-search-box input::placeholder {
    color: #64748b;
}

/* Grids & Cards in Dark Mode */
.hero-py-8 { padding-top: 32px; padding-bottom: 32px; }
.hero-mb-8, .mb-8 { margin-bottom: 32px; }
.hero-mb-10, .mb-10 { margin-bottom: 40px; }

.hero-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.hero-action-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s ease;
}
.hero-action-card:hover {
    transform: translateY(-3px);
    border-color: #475569;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}
.hero-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 4px;
}
.hero-bubble-primary { background: rgba(37, 99, 235, 0.2); color: #60a5fa; border: 1px solid rgba(37, 99, 235, 0.3); }
.hero-bubble-success { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.hero-bubble-warning { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }

.hero-action-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff !important;
    margin: 0;
}
.hero-action-card p {
    font-size: 13.5px;
    color: #94a3b8 !important;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}
.hero-link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: #38bdf8;
    text-decoration: none;
    transition: gap 0.15s ease;
    margin-top: 6px;
}
.hero-link-arrow:hover {
    gap: 10px;
    color: #7dd3fc;
    text-decoration: none;
}

/* Public Sections */
.hero-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #334155;
}
.hero-section-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: -0.3px;
    margin: 0 0 4px 0;
}
.hero-page-bg .text-muted {
    color: #94a3b8 !important;
}

/* Forms Grid */
.hero-forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.hero-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.hero-card:hover {
    border-color: #475569;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}
.hero-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #334155;
}
.hero-card-header h2, .hero-card-header h3 {
    color: #ffffff !important;
    margin: 0;
}
.hero-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.hero-form-card-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.hero-badge-dept {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.hero-form-title {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff !important;
    margin: 8px 0 6px 0;
}
.hero-form-desc {
    font-size: 13.5px;
    color: #94a3b8 !important;
    line-height: 1.5;
    flex: 1;
}
.hero-form-card-footer {
    margin-top: 16px;
}

/* Email Desks Grid */
.hero-emails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.hero-email-desk-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: all 0.2s ease;
}
.hero-email-desk-card:hover {
    border-color: #3b82f6;
    background: #1e293b;
}
.hero-email-desk-icon {
    width: 42px;
    height: 42px;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 18px;
    flex-shrink: 0;
}
.hero-email-desk-info {
    flex: 1;
    min-width: 0;
}
.hero-email-desk-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff !important;
    margin: 0 0 2px 0;
}
.hero-email-desk-address {
    font-size: 13.5px;
    font-weight: 600;
    color: #38bdf8;
    text-decoration: none;
    word-break: break-all;
}
.hero-email-desk-address:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

/* Footer */
.hero-footer {
    margin-top: auto;
    border-top: 1px solid #334155;
    padding: 28px 0;
    background: #0f172a;
}
.hero-footer .text-muted {
    color: #64748b !important;
}
.hero-footer a {
    color: #94a3b8 !important;
    text-decoration: none;
}
.hero-footer a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Public Form Inputs in Dark Theme */
.hero-page-bg .hero-label {
    color: #e2e8f0;
}
.hero-page-bg .hero-input,
.hero-page-bg .hero-select,
.hero-page-bg .hero-textarea {
    background: #0f172a;
    border-color: #334155;
    color: #ffffff;
}
.hero-page-bg .hero-input::placeholder,
.hero-page-bg .hero-textarea::placeholder {
    color: #64748b;
}
.hero-page-bg .hero-input:focus,
.hero-page-bg .hero-select:focus,
.hero-page-bg .hero-textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Track Ticket Page Specifics */
.hero-lookup-card {
    max-width: 520px;
    margin: 32px auto;
}
.hero-icon-bubble {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.hero-ticket-view-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}
.hero-ticket-header {
    background: #1e293b;
}
.hero-ticket-meta-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.hero-badge-code {
    background: rgba(148, 163, 184, 0.2);
    color: #f1f5f9;
    font-family: monospace;
    font-size: 13px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(148, 163, 184, 0.3);
}
.hero-badge-staff-role {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.hero-badge-client-role {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.hero-ticket-subject {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
}

/* Ticket Timeline */
.hero-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
    margin-bottom: 24px;
}
.hero-timeline-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.hero-msg-avatar {
    flex-shrink: 0;
}
.hero-msg-bubble {
    flex: 1;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 18px 20px;
}
.hero-msg-staff .hero-msg-bubble {
    background: #1e293b;
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15);
}
.hero-msg-customer .hero-msg-bubble {
    background: #0f172a;
    border-color: #334155;
}
.hero-msg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-msg-author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
}
.hero-msg-time {
    font-size: 12px;
    color: #94a3b8;
}
.hero-msg-body {
    font-size: 14.5px;
    line-height: 1.7;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
}
.hero-msg-attachments {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-attachments-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
}
.hero-attachments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.hero-attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #38bdf8;
    font-size: 12.5px;
    text-decoration: none;
    transition: all 0.15s ease;
}
.hero-attachment-chip:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #7dd3fc;
    text-decoration: none;
}

/* Gateway Landing Page (root index.php) */
.hero-gateway-body {
    min-height: 100vh;
    background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 50%, #0c4a6e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    font-family: var(--hero-font);
}
.hero-gateway-container {
    width: 100%;
    max-width: 960px;
}
.hero-gateway-header { margin-bottom: 40px; }
.hero-logo-large { display: flex; justify-content: center; }
.hero-gateway-title {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}
.hero-gateway-subtitle {
    font-size: 15px;
    color: rgba(255,255,255,.65);
    max-width: 540px;
    margin: 0 auto;
}
.hero-gateway-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.hero-gateway-card {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    padding: 28px 24px;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.hero-gateway-card:hover {
    background: rgba(255,255,255,.13);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,.3);
    text-decoration: none;
    color: #fff;
}
.hero-gateway-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}
.hero-gateway-card p {
    font-size: 13.5px;
    color: rgba(255,255,255,.65);
    line-height: 1.6;
    margin: 0;
}
.hero-gw-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.hero-gw-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: rgba(255,255,255,.8);
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,.1);
}
.hero-gateway-footer { color: rgba(255,255,255,.4); }

/* Utility Classes */
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 20px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.p-3 { padding: 12px; } .p-4 { padding: 16px; } .p-5 { padding: 20px; } .p-6 { padding: 24px; } .p-8 { padding: 32px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.flex-1 { flex: 1; }
.font-bold { font-weight: 700; }
.text-xs { font-size: 12px; }
.text-sm { font-size: 13.5px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Responsive */
@media (max-width: 900px) {
    .hero-sidebar { width: 64px; }
    .hero-brand-text, .hero-nav-section-title, .hero-nav-item span, .hero-nav-counter, .hero-user-info { display: none; }
    .hero-nav-item { justify-content: center; padding: 10px; }
    .hero-sidebar-brand { justify-content: center; padding: 0 12px; }
    .hero-webmail-container { grid-template-columns: 1fr; }
    .hero-mail-pane-folders, .hero-mail-pane-list { border-right: none; border-bottom: 1px solid var(--hero-border); }
    .hero-stats-grid { grid-template-columns: 1fr 1fr; }
    .hero-page-content { padding: 16px; }
    .hero-jumbotron-title { font-size: 28px; }
}
@media (max-width: 640px) {
    .hero-navbar-inner { padding: 0 16px; }
    .hero-nav-links { gap: 4px; }
    .hero-nav-links a { padding: 6px 10px; font-size: 12px; }
    .hero-jumbotron { padding: 36px 16px 28px; }
    .hero-jumbotron-title { font-size: 24px; }
    .hero-search-box { padding: 4px 4px 4px 12px; }
    .hero-search-box input { font-size: 13px; }
    .hero-action-grid, .hero-forms-grid, .hero-emails-grid { grid-template-columns: 1fr; }
}
