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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    color: #374151;
    background: #f1f5f9;
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.01em;
}

a { color: #2b55ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
.fh-header {
    background: #1e3a8a;
    padding: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.fh-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}
.fh-header img { height: 26px; }
.fh-header .logo { height: 32px; }

/* ── Header Menu ── */
.fh-header-menu { position: relative; }
.fh-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    transition: background 0.15s;
    user-select: none;
}
.fh-menu-trigger:hover { background: rgba(255,255,255,0.1); }
.fh-menu-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    border: 1.5px solid rgba(255,255,255,0.25);
}
.fh-menu-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fh-menu-chevron {
    width: 14px;
    height: 14px;
    color: rgba(255,255,255,0.5);
    transition: transform 0.15s;
}
.fh-menu-open .fh-menu-chevron { transform: rotate(180deg); }
.fh-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
    min-width: 220px;
    z-index: 100;
    overflow: hidden;
}
.fh-menu-open .fh-menu-dropdown { display: block; }
.fh-menu-header {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}
.fh-menu-name {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}
.fh-menu-email {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 1px;
    font-weight: 400;
}
.fh-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    transition: all 0.1s;
    font-weight: 450;
}
.fh-menu-dropdown a:hover {
    background: #f8fafc;
    color: #1e3a8a;
    text-decoration: none;
}
.fh-menu-dropdown a .mdi { font-size: 17px; color: #94a3b8; }
.fh-menu-dropdown a:hover .mdi { color: #1e3a8a; }
.fh-menu-dropdown a svg { width: 16px; height: 16px; color: #94a3b8; flex-shrink: 0; }
.fh-menu-divider { border-top: 1px solid #f1f5f9; }
.fh-menu-dropdown a.fh-menu-logout { color: #dc2626; }
.fh-menu-dropdown a.fh-menu-logout .mdi { color: #dc2626; }

/* ── Menu Section Label ── */
.fh-menu-section {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    padding: 10px 16px 4px;
}

/* ── Container ── */
.fh-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px;
}

/* ── Breadcrumbs ── */
.fh-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
}
.fh-breadcrumb a { color: #64748b; text-decoration: none; font-weight: 450; }
.fh-breadcrumb a:hover { color: #1e3a8a; text-decoration: underline; }
.fh-breadcrumb-sep { color: #cbd5e1; }
.fh-breadcrumb-current { color: #475569; font-weight: 500; }

/* ── Page Title ── */
.fh-page-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.fh-page-subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 18px;
    font-weight: 400;
}

/* ── Cards ── */
.fh-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.fh-card-title {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Split Row (side by side cards) ── */
.fh-split-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
    align-items: start;
}
.fh-split-row .fh-card { margin-bottom: 16px; }
@media (max-width: 900px) {
    .fh-split-row { grid-template-columns: 1fr; }
}

/* ── Collapsible Cards ── */
.fh-collapsible .fh-collapse-trigger {
    cursor: pointer;
    user-select: none;
}
.fh-collapse-chevron {
    margin-left: auto;
    font-size: 16px;
    color: #94a3b8;
    transition: transform 0.2s;
}
.fh-collapse-body {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}
.fh-collapsed .fh-collapse-chevron { transform: rotate(-90deg); }
.fh-collapsed .fh-collapse-body { max-height: 0; opacity: 0; }
.fh-collapsible.fh-collapsed { padding-bottom: 14px; }
.fh-collapsible.fh-collapsed .fh-card-title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.fh-collapse-count {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 8px;
    line-height: 1.4;
}

/* ── Phone Number Cards ── */
.fh-phone-card {
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 10px;
}
.fh-phone-card:last-child { margin-bottom: 0; }
.fh-phone-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.fh-phone-name {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}
.fh-phone-number {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 400;
}
.fh-phone-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px 20px;
}
.fh-phone-field {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.fh-phone-label {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.fh-phone-value {
    font-size: 13px;
    color: #475569;
    word-break: break-all;
}

/* ── Add Button (in card title) ── */
.fh-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #1e3a8a;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 18px;
}
.fh-add-btn:hover {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}

/* ── Details Grid (billing contact info) ── */
.fh-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
}
.fh-detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fh-detail-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.fh-detail-label .mdi { font-size: 13px; }
.fh-detail-value {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}
@media (max-width: 600px) {
    .fh-details-grid { grid-template-columns: 1fr; }
}

/* ── Deliverability Grid ── */
.fh-deliverability-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.fh-check-item {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 16px;
    min-width: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.fh-check-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.fh-check-label .mdi {
    font-size: 14px;
}
.fh-check-status { font-size: 14px; font-weight: 600; }
.fh-check-detail {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    word-break: break-all;
    display: none;
}
.fh-check-detail.fh-detail-visible { display: block; }
.fh-detail-toggle {
    font-size: 11px;
    color: #1e3a8a;
    cursor: pointer;
    margin-top: 6px;
    display: inline-block;
    font-weight: 500;
}
.fh-detail-toggle:hover { text-decoration: underline; }

/* ── Badges ── */
.fh-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.fh-badge-pass { background: #dcfce7; color: #166534; }
.fh-badge-fail { background: #fee2e2; color: #991b1b; }
.fh-badge-warn { background: #fef3c7; color: #92400e; }
.fh-badge-info { background: #eff6ff; color: #1e40af; }
.fh-badge-neutral { background: #f1f5f9; color: #64748b; }
.fh-view-link {
    font-size: 12px;
    font-weight: 600;
    color: #1e3a8a;
    text-decoration: none;
}
.fh-view-link:hover { text-decoration: underline; }

.fh-badge-delivered { background: #dcfce7; color: #166534; }
.fh-badge-processed { background: #dbeafe; color: #1e40af; }
.fh-badge-dropped { background: #fee2e2; color: #991b1b; }
.fh-badge-bounce, .fh-badge-bounced { background: #fee2e2; color: #991b1b; }
.fh-badge-deferred { background: #fef3c7; color: #92400e; }
.fh-badge-open, .fh-badge-opened { background: #f3e8ff; color: #6b21a8; }
.fh-badge-click { background: #e0e7ff; color: #3730a3; }
.fh-badge-blocked { background: #fee2e2; color: #991b1b; }
.fh-badge-spam_report, .fh-badge-spamreport { background: #fee2e2; color: #991b1b; }
.fh-badge-unsubscribe { background: #fef3c7; color: #92400e; }
.fh-badge-not_delivered { background: #fee2e2; color: #991b1b; }

/* ── Tables ── */
.fh-table-wrap { overflow-x: auto; margin: -2px; padding: 2px; }
.fh-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fh-table th {
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    padding: 10px 12px;
    border-bottom: 2px solid #f1f5f9;
    white-space: nowrap;
}
.fh-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #475569;
}
.fh-table tbody tr { transition: background 0.1s; }
.fh-table tbody tr:hover td { background: #f8fafc; }
.fh-table tbody tr:last-child td { border-bottom: none; }
.fh-table .fh-col-subject {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fh-table .fh-col-to {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Empty State ── */
.fh-empty {
    text-align: center;
    padding: 48px 20px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 450;
}

/* ── Login ── */
.fh-login-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
}
.fh-login-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.1);
    padding: 40px 36px 32px;
    width: 100%;
    max-width: 400px;
}
.fh-login-box img {
    display: block;
    margin: 0 auto 5px;
    height: 80px;
}
.fh-login-box h2 {
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #0f172a;
}
.fh-login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}
.fh-login-footer a {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}
.fh-login-footer a:hover {
    color: #1e3a8a;
    text-decoration: none;
}
.fh-login-hint {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}
.fh-login-brand {
    color: rgba(255,255,255,0.3);
    font-size: 12px;
    margin-top: 24px;
    text-align: center;
}

/* ── Forms ── */
.fh-form-group { margin-bottom: 16px; }
.fh-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.fh-form-group input[type="text"],
.fh-form-group input[type="email"],
.fh-form-group input[type="password"],
.fh-form-group input[type="tel"],
.fh-form-group input[type="date"],
.fh-form-group input[type="number"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.fh-form-group input:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30,58,138,0.08);
}
.fh-form-group select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.fh-form-group select:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30,58,138,0.08);
}
.fh-input-disabled {
    background: #f8fafc !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
}

.fh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    background: #1e3a8a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: background 0.15s, box-shadow 0.15s;
    letter-spacing: 0.01em;
}
.fh-btn:hover {
    background: #1e40af;
    box-shadow: 0 2px 8px rgba(30,58,138,0.25);
    text-decoration: none;
}
.fh-btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 6px;
}
.fh-btn-xs {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: transparent;
    color: #1e3a8a;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s;
    line-height: 1.4;
}
.fh-btn-xs:hover {
    background: #f1f5f9;
    border-color: #1e3a8a;
    text-decoration: none;
    color: #1e3a8a;
}
.fh-btn-xs .mdi { font-size: 12px; }
.fh-btn-xs-danger {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: transparent;
    border: 1px solid #fca5a5;
    border-radius: 4px;
    color: #dc2626;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s;
    line-height: 1.4;
}
.fh-btn-xs-danger:hover {
    background: #fef2f2;
    border-color: #dc2626;
}
.fh-btn-xs-muted {
    color: #6b7280;
    border-color: #d1d5db;
    background: #f9fafb;
}
.fh-btn-xs-muted:hover {
    background: #f1f5f9;
    border-color: #9ca3af;
    color: #374151;
}

/* ── Spam Sweeper ── */
.spam-bulk-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}
.spam-check { width: 15px; height: 15px; cursor: pointer; accent-color: #1e3a8a; }
.spam-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    padding: 0 5px;
}
.spam-score-low { background: #dcfce7; color: #166534; }
.spam-score-med { background: #fef3c7; color: #92400e; }
.spam-score-high { background: #fecaca; color: #991b1b; }
.spam-preview-icon {
    font-size: 16px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s;
}
.spam-preview-icon:hover { color: #1e293b; }
.spam-preview {
    position: absolute;
    z-index: 200;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-width: 500px;
    width: 500px;
}
.spam-preview-frame {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: 4px;
    background: #fff;
}

.fh-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    border-left: 3px solid #dc2626;
    font-weight: 450;
}
.fh-success {
    background: #f0fdf4;
    color: #166534;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    border-left: 3px solid #16a34a;
    font-weight: 450;
}
.fh-notice {
    background: #fffbeb;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    border-left: 3px solid #f59e0b;
    font-weight: 450;
}

/* ── Secondary Button ── */
.fh-btn-secondary {
    background: #fff;
    color: #475569;
    border: 1px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
}
.fh-btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    text-decoration: none;
}

/* ── Service Cards (Dashboard) ── */
.fh-service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 700px) {
    .fh-service-grid { grid-template-columns: 1fr; }
}
.fh-service-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 18px;
    text-decoration: none;
    color: #0f172a;
    transition: all 0.2s;
    display: block;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.fh-service-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-1px);
    text-decoration: none;
}
.fh-service-disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
}
.fh-service-disabled:hover {
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transform: none;
}
.fh-service-icon { margin-bottom: 10px; }
.fh-service-icon .mdi { font-size: 24px; color: #64748b; }
.fh-service-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
    color: #0f172a;
    letter-spacing: -0.01em;
}
.fh-service-desc {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
}

/* ── Admin Card Accent ── */
.fh-service-admin {
    border-left: 3px solid #c10088;
}
.fh-service-admin:hover { border-left-color: #a30074; }

/* ── Section Title ── */
.fh-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 24px 0 10px;
}

/* ── Form Grid ── */
.fh-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── Textarea ── */
.fh-form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #0f172a;
    background: #fff;
    resize: vertical;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.fh-form-group textarea:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30,58,138,0.08);
}

/* ── Form Row ── */
.fh-form-row { margin-bottom: 16px; }

/* ── Toggle / Checkbox ── */
.fh-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}
.fh-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1e3a8a;
}
.fh-toggle-label { font-weight: 500; color: #475569; }

/* ── Switch (iOS-style toggle) ── */
.fh-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}
.fh-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.fh-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #cbd5e1;
    border-radius: 20px;
    transition: background 0.2s;
}
.fh-switch-slider::before {
    content: '';
    position: absolute;
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.fh-switch input:checked + .fh-switch-slider {
    background: #16a34a;
}
.fh-switch input:checked + .fh-switch-slider::before {
    transform: translateX(16px);
}

/* ── Report Links ── */
.fh-report-links { display: flex; flex-direction: column; }
.fh-report-link {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 450;
    transition: color 0.1s;
}
.fh-report-link:last-child { border-bottom: none; }
.fh-report-link:hover { color: #1e3a8a; text-decoration: none; }
.fh-report-link-arrow { color: #cbd5e1; font-size: 16px; }
.fh-report-link:hover .fh-report-link-arrow { color: #1e3a8a; }
.fh-report-link-label { display: flex; align-items: center; gap: 6px; }
.fh-report-link-desc {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 400;
    width: 100%;
    margin-top: 2px;
    padding-left: 22px;
}

/* ── Period Selector ── */
.fh-period-bar { display: flex; gap: 4px; margin-bottom: 20px; }
.fh-period-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.15s;
}
.fh-period-btn:hover {
    border-color: #1e3a8a;
    color: #1e3a8a;
    text-decoration: none;
}
.fh-period-active {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}
.fh-period-active:hover { color: #fff; }

/* ── Stats ── */
.fh-stats-row { display: flex; gap: 32px; flex-wrap: wrap; }
.fh-stat { display: flex; flex-direction: column; }
.fh-stat-num {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.fh-stat-label { font-size: 11px; color: #94a3b8; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Activity Column ── */
.fh-activity-time { display: block; font-size: 13px; color: #475569; }
.fh-activity-type { display: block; font-size: 11px; color: #94a3b8; }

/* ── Event Toggle Button ── */
.fh-event-toggle {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    color: #94a3b8;
    cursor: pointer;
    padding: 3px 5px;
    font-size: 16px;
    line-height: 1;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.fh-event-toggle:hover { color: #1e3a8a; border-color: #1e3a8a; }
.fh-event-toggle-active { color: #1e3a8a; border-color: #1e3a8a; background: #eff6ff; }

/* ── Events Panel ── */
.fh-events-row td { background: #f8fafc !important; }
.fh-events-panel { padding: 16px 20px 16px 52px; }
.fh-events-loading {
    font-size: 13px;
    color: #94a3b8;
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Event Timeline ── */
.fh-event-timeline { display: flex; flex-direction: column; }
.fh-event-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    padding-bottom: 16px;
}
.fh-event-step::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 26px;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}
.fh-event-step-last { padding-bottom: 0; }
.fh-event-step-last::before { display: none; }
.fh-event-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}
.fh-event-detail {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding-top: 4px;
}
.fh-event-name { font-size: 13px; font-weight: 600; color: #0f172a; }
.fh-event-time { font-size: 12px; color: #94a3b8; }
.fh-event-reason { font-size: 11px; color: #64748b; margin-top: 2px; word-break: break-all; }

/* Event dot colors */
.fh-evt-green { background: #dcfce7; color: #166534; }
.fh-evt-red { background: #fee2e2; color: #991b1b; }
.fh-evt-blue { background: #dbeafe; color: #1e40af; }
.fh-evt-purple { background: #f3e8ff; color: #6b21a8; }
.fh-evt-indigo { background: #e0e7ff; color: #3730a3; }
.fh-evt-amber { background: #fef3c7; color: #92400e; }
.fh-evt-gray { background: #f1f5f9; color: #64748b; }

/* ── Inline Check Items ── */
.fh-check-inline { box-shadow: none; border: 1px solid #e2e8f0; }

/* ── Profile ── */
.fh-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 600;
    color: #94a3b8;
    overflow: hidden;
    border: 3px solid #e2e8f0;
    flex-shrink: 0;
}
.fh-avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.fh-avatar-upload {
    font-size: 12px;
    color: #1e3a8a;
    cursor: pointer;
    font-weight: 500;
}
.fh-avatar-upload:hover { text-decoration: underline; }
.fh-avatar-upload input[type="file"] { display: none; }

/* ── Action Buttons (Tables) ── */
.fh-actions { white-space: nowrap; text-align: right; }
.fh-actions a {
    color: #94a3b8;
    font-size: 18px;
    padding: 4px 2px;
    text-decoration: none;
    transition: color 0.15s;
}
.fh-actions a:hover { color: #1e3a8a; text-decoration: none; }
.fh-action-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    padding: 4px 2px;
    cursor: pointer;
    transition: color 0.15s;
    vertical-align: middle;
}
.fh-action-btn:hover { color: #dc2626; }

/* ── Password Row ── */
.fh-password-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.fh-password-row input { flex: 1; }
.fh-password-row .fh-btn { width: auto; white-space: nowrap; }

/* ── Welcome Message Card ── */
.fh-welcome-card { border-left: 3px solid #1e3a8a; background: #f8fafc; }
.fh-welcome-for {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
    margin-left: auto;
}
.fh-welcome-hint {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
}
.fh-welcome-msg {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    font-size: 13px;
    color: #475569;
    line-height: 1.7;
    white-space: pre-wrap;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.fh-copy-confirm {
    font-size: 12px;
    font-weight: 600;
    color: #16a34a;
    margin-left: 8px;
    vertical-align: middle;
}

/* ── Webmail Link ── */
.fh-webmail-link {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    text-decoration: none;
    color: #475569;
    transition: color 0.15s;
}
.fh-webmail-link:hover { color: #1e3a8a; text-decoration: none; }
.fh-webmail-logo {
    height: 36px;
    flex-shrink: 0;
}
.fh-webmail-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fh-webmail-label {
    font-size: 14px;
    font-weight: 500;
}
.fh-webmail-label .mdi { font-size: 13px; opacity: 0.5; }
.fh-webmail-desc {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 400;
}

/* ── Password Rules ── */
.fh-password-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 20px;
}
.fh-rule {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 2px;
    transition: color 0.15s;
}
.fh-rule .mdi { font-size: 16px; }
.fh-rule-pass { color: #16a34a; }
.fh-rule-pass .mdi { color: #16a34a; }
.fh-rule-fail { color: #dc2626; }
.fh-rule-fail .mdi { color: #dc2626; }
.fh-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}
.fh-btn:disabled:hover {
    background: #cbd5e1;
    box-shadow: none;
}

/* ── Select Inputs ── */
.fh-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.fh-select:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30,58,138,0.08);
}

/* ── Support Ticket ── */
.fh-ticket-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #475569;
}
.fh-ticket-info .mdi {
    font-size: 20px;
    color: #94a3b8;
}
.fh-file-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.fh-file-drop:hover,
.fh-file-drop-active {
    border-color: #1e3a8a;
    background: #f8fafc;
}
.fh-file-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}
.fh-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    color: #475569;
}
.fh-file-item .mdi {
    font-size: 16px;
    color: #94a3b8;
    flex-shrink: 0;
}

/* ── Filter Tabs ── */
.fh-filter-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}
.fh-filter-tab {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}
.fh-filter-tab:hover {
    background: #f8fafc;
    text-decoration: none;
    color: #1e3a8a;
}
.fh-filter-active {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}
.fh-filter-active:hover {
    background: #1e3a8a;
    color: #fff;
}
.fh-filter-count {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.7;
    margin-left: 2px;
}

/* ── Ticket Message Toggle ── */
.fh-msg-toggle-row { cursor: pointer; }
.fh-msg-toggle-row td { background: #f8fafc !important; border-bottom: none !important; }
.fh-msg-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    transition: color 0.15s;
}
.fh-msg-toggle:hover { color: #1e3a8a; }
.fh-msg-toggle .mdi { font-size: 14px; }
.fh-msg-chevron { margin-left: 2px; transition: transform 0.2s; }
.fh-msg-open .fh-msg-chevron { transform: rotate(180deg); }
.fh-msg-open td { background: #f1f5f9 !important; }
.fh-msg-body-row td { background: #f8fafc !important; }
.fh-msg-body {
    padding: 0 12px 14px;
    font-size: 13px;
    color: #475569;
}

/* ── Admin Bar ── */
.fh-admin-bar {
    background: #c10088;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.fh-admin-bar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.fh-admin-bar .mdi { font-size: 11px; }

/* ── Footer ── */
.fh-footer {
    text-align: center;
    padding: 24px;
    font-size: 11px;
    color: #cbd5e1;
    margin-top: 24px;
    font-weight: 400;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .fh-deliverability-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .fh-deliverability-grid { grid-template-columns: repeat(2, 1fr); }
    .fh-form-grid { grid-template-columns: 1fr; }
    .fh-container { padding: 20px 16px; }
    .fh-header-inner { padding: 0 16px; }
    .fh-password-row { flex-direction: column; }

    /* Tables: stack on mobile */
    .fh-table-responsive thead { display: none; }
    .fh-table-responsive tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 12px;
        padding: 12px 16px;
        border-bottom: 1px solid #f1f5f9;
    }
    .fh-table-responsive tbody tr:last-child { border-bottom: none; }
    .fh-table-responsive tbody td {
        display: inline;
        padding: 0;
        border: none;
        font-size: 13px;
    }
    .fh-table-responsive tbody td:hover { background: none; }

    /* Message toggle/body rows: block layout, not flex cards */
    .fh-table-responsive .fh-msg-toggle-row,
    .fh-table-responsive .fh-msg-body-row,
    .fh-table-responsive .fh-events-row {
        display: block;
        padding: 0;
        border-bottom: none;
    }
    .fh-table-responsive .fh-msg-toggle-row td,
    .fh-table-responsive .fh-msg-body-row td,
    .fh-table-responsive .fh-events-row td {
        display: block;
        padding: 0;
    }
    .fh-table-responsive tbody td[data-label]:not([data-label=""]):before {
        content: attr(data-label) ": ";
        font-size: 11px;
        color: #94a3b8;
        font-weight: 500;
    }
    .fh-table-responsive .fh-mob-ref {
        font-weight: 600;
        color: #0f172a;
        font-size: 13px;
    }
    .fh-table-responsive .fh-mob-date {
        color: #94a3b8;
        font-size: 12px;
    }
    .fh-table-responsive .fh-mob-amount {
        margin-left: auto;
        font-weight: 600;
        color: #0f172a;
        font-size: 13px;
    }
    .fh-table-responsive .fh-mob-row2 {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 2px;
    }
    .fh-table-responsive .fh-mob-action {
        margin-left: auto;
    }
}
@media (max-width: 400px) {
    .fh-deliverability-grid { grid-template-columns: 1fr; }
}
