/* ============================================================
   OUTREACH TRACKER — Consolidated Design System
   Navy + Gold Premium Theme
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
    --bg-body: #f5f6f8;
    --bg-card: #ffffff;
    --bg-card-hover: #fafbfc;
    --bg-card-header: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    --bg-header: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    --bg-input: #ffffff;
    --bg-table-header: #f0f1f3;
    --border: #e2e5ea;
    --border-light: #eef0f3;
    --border-hover: #c5cad4;
    --text-primary: #1a1a1a;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-very-muted: #b8bfce;
    /* Primary: Deep Navy */
    --navy-500: #0A2540;
    --navy-600: #0A2540;
    --navy-700: #061829;
    --navy-400: #1B3A5B;
    /* Accent: Gold */
    --gold-accent: #C4A962;
    --gold-light: #D4BA78;
    --gold-dark: #A68D4A;
    /* Status colors */
    --emerald-500: #059669;
    --emerald-600: #047857;
    --emerald-400: #34d399;
    --rose-500: #e11d48;
    --rose-600: #be123c;
    --rose-400: #fb7185;
    --amber-500: #d97706;
    --amber-400: #fbbf24;
    --sky-500: #0284c7;
    --sky-400: #38bdf8;
    --purple-500: #7c3aed;
    --purple-400: #a78bfa;
    /* Backward-compatible aliases */
    --crimson-400: var(--rose-400);
    --crimson-500: var(--rose-500);
    --blue-400: var(--sky-400);
    --blue-500: var(--sky-500);
    --teal-500: var(--navy-500);
    --teal-600: var(--navy-600);
    --teal-400: var(--navy-400);
    /* Premium Shadows */
    --shadow-sm: 0 2px 8px rgba(10, 37, 64, 0.06);
    --shadow-md: 0 4px 16px rgba(10, 37, 64, 0.08);
    --shadow-lg: 0 8px 24px rgba(10, 37, 64, 0.10);
    --shadow-accent: 0 4px 15px rgba(196, 169, 98, 0.15);
    /* Border Radius */
    --radius-sm: .25rem;
    --radius-md: .375rem;
    --radius-lg: .5rem;
    --radius-xl: .625rem;
}

/* ===== BASE ELEMENTS ===== */
body {
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    color: var(--navy-500);
    letter-spacing: -0.02em;
}

a {
    color: var(--navy-500);
    text-decoration: none;
    transition: color .2s;
}
a:hover {
    color: var(--gold-accent);
}

/* ===== APP HEADER / NAVIGATION ===== */
.app-header {
    background: var(--bg-card-header);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.app-header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.app-header .badge-pipeline {
    font-size: 0.55rem;
    font-weight: 500;
    background: var(--teal-600);
    color: #fff;
    vertical-align: middle;
    padding: .2rem .45rem;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
}

.header-left {
    flex: 1;
    min-width: 0;
}

.hamburger-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .5rem .7rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all .2s;
    line-height: 1;
}
.hamburger-btn:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 0;
    align-items: center;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: .35rem .55rem;
    font-size: .82rem;
    font-weight: 500;
    transition: color .2s;
    white-space: nowrap;
}
.nav-links a:hover {
    color: var(--navy-600);
}
.nav-links a.active-link,
.nav-links a.active {
    color: var(--navy-600);
    font-weight: 600;
}
.nav-links a.nav-highlight {
    color: var(--gold-accent);
    font-weight: 600;
}
.nav-links a.nav-highlight:hover {
    color: var(--gold-dark);
}
.nav-links a.logout-link {
    color: var(--text-secondary);
    font-weight: 400;
    padding: .35rem .55rem;
}
.nav-links a.logout-link:hover {
    color: var(--rose-400);
}

.nav-user-badge {
    font-size: .78rem;
    color: var(--text-muted);
    padding: 0 .35rem 0 .6rem;
    white-space: nowrap;
    border-left: 1px solid var(--border);
    margin-left: .4rem;
}

/* ===== NAV DROPDOWN ===== */
.nav-dropdown {
    position: relative;
    display: inline-flex;
}

.nav-dropdown-toggle {
    color: var(--text-secondary);
    text-decoration: none;
    padding: .35rem .55rem;
    font-size: .82rem;
    font-weight: 500;
    transition: color .2s;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}
.nav-dropdown-toggle:hover {
    color: var(--navy-600);
}
.nav-dropdown-toggle.active {
    color: var(--navy-600);
    font-weight: 600;
}

.nav-dropdown-arrow {
    font-size: .55rem;
    transition: transform .2s;
}
.nav-dropdown-toggle[aria-expanded="true"] .nav-dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown menu container */
.dropdown-menu-nav {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border, #e2e5ea);
    border-radius: 10px;
    box-shadow: var(--shadow-md, 0 4px 16px rgba(10,37,64,0.08));
    padding: .35rem;
    margin-top: .25rem !important;
    min-width: 180px;
    animation: navDropdownIn .2s ease-out;
}

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

.dropdown-menu-nav .dropdown-item {
    font-size: .82rem;
    font-weight: 500;
    color: var(--text-secondary, #6B7280);
    padding: .45rem .75rem;
    border-radius: 8px;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: .25rem;
}
.dropdown-menu-nav .dropdown-item:hover {
    background: rgba(10, 37, 64, 0.04);
    color: var(--navy-600, #0A2540);
}
.dropdown-menu-nav .dropdown-item:active {
    background: rgba(10, 37, 64, 0.06);
    color: var(--navy-600, #0A2540);
}
.dropdown-menu-nav .dropdown-item.active {
    background: rgba(196, 169, 98, 0.1);
    color: var(--gold-dark, #A68D4A);
    font-weight: 600;
}
.dropdown-menu-nav .dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: .9rem;
    flex-shrink: 0;
}

/* Mobile: dropdowns expand inline instead of floating */
@media (max-width: 767.98px) {
    .nav-dropdown {
        display: block;
        width: 100%;
    }
    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: .5rem .55rem;
        border-bottom: 1px solid var(--border-light, #eef0f3);
    }
    .nav-dropdown-toggle::after {
        display: none !important;
    }
    .dropdown-menu-nav {
        position: static !important;
        float: none !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: rgba(0,0,0,0.02) !important;
        margin: 0 !important;
        padding: .25rem .5rem !important;
        animation: none !important;
        transform: none !important;
    }
    .dropdown-menu-nav .dropdown-item {
        padding: .4rem .65rem;
        font-size: .8rem;
    }
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: var(--navy-600);
    border: none;
    border-radius: 10px;
    padding: .55rem 1.25rem;
    font-weight: 600;
    color: #fff;
    transition: all .2s;
}
.btn-primary:hover {
    background: var(--navy-400);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: #fff;
}

.btn-action-sm {
    padding: .28rem .6rem;
    font-size: .72rem;
    font-weight: 500;
    border-radius: 8px;
    background: var(--navy-600);
    border: none;
    color: #fff;
    transition: all .2s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-action-sm:hover {
    background: var(--navy-400);
    transform: translateY(-1px);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn-sm-secondary {
    padding: .28rem .6rem;
    font-size: .72rem;
    font-weight: 500;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all .2s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-sm-secondary:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-outline-action {
    padding: .28rem .6rem;
    font-size: .72rem;
    font-weight: 500;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all .2s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-outline-action:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-outline-secondary {
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 10px;
    transition: all .2s;
}
.btn-outline-secondary:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-outline-danger {
    border: 1px solid rgba(251, 113, 133, 0.25);
    color: var(--rose-400);
    border-radius: 10px;
    transition: all .2s;
}
.btn-outline-danger:hover {
    background: rgba(251, 113, 133, 0.08);
}

.btn-gold {
    background: var(--gold-accent);
    border: none;
    border-radius: 10px;
    padding: .55rem 1.25rem;
    font-weight: 600;
    color: var(--navy-700);
    transition: all .2s;
}
.btn-gold:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-accent);
}

/* Sequence Status Buttons (sequence_detail) */
.btn-status-completed {
    background: var(--gold-accent);
    border: none;
    color: var(--navy-700);
    border-radius: 10px;
    padding: .55rem 1.25rem;
    font-weight: 600;
    font-size: .82rem;
    transition: all .2s;
    box-shadow: var(--shadow-sm);
}
.btn-status-completed:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-accent);
}

.btn-status-failed {
    background: transparent;
    border: 1.5px solid var(--rose-400);
    color: var(--rose-400);
    border-radius: 10px;
    padding: .55rem 1.25rem;
    font-weight: 600;
    font-size: .82rem;
    transition: all .2s;
}
.btn-status-failed:hover {
    background: rgba(251, 113, 133, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 113, 133, 0.15);
}

/* Log Action buttons */
.btn-add-row {
    background: transparent;
    border: 2px dashed var(--border);
    color: var(--text-muted);
    border-radius: 10px;
    padding: .5rem 1.25rem;
    font-weight: 500;
    font-size: .82rem;
    transition: all .2s;
    width: 100%;
}
.btn-add-row:hover {
    border-color: var(--navy-500);
    color: var(--navy-500);
    background: rgba(10, 37, 64, 0.03);
}

.btn-remove-row {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 8px;
    padding: .35rem .55rem;
    font-size: .75rem;
    transition: all .2s;
}
.btn-remove-row:hover {
    border-color: var(--rose-400);
    color: var(--rose-400);
    background: rgba(251, 113, 133, 0.06);
}

/* View toggle */
.btn-group-sm .btn {
    font-size: .75rem;
    font-weight: 600;
    padding: .35rem .7rem;
    border-radius: 8px !important;
    transition: all .2s;
}
.btn-group-sm .btn-outline-secondary {
    border-color: var(--border);
    color: var(--text-muted);
}
.btn-group-sm .btn-outline-secondary:hover {
    background: rgba(0, 0, 0, .03);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* ===== FORMS ===== */
.form-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: .35rem;
}

.form-control,
.form-select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: 10px;
    padding: .55rem 1rem;
    font-size: .88rem;
    transition: border-color .2s;
    appearance: auto !important; 
    -webkit-appearance: auto !important; 
}
.form-control:focus,
.form-select:focus {
    border-color: var(--navy-500) !important;
    box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.1) !important;
}

.form-text {
    color: var(--text-muted);
    font-size: .72rem;
}

/* ===== CARDS ===== */
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
}
.info-card:hover {
    box-shadow: var(--shadow-md);
}
.info-card-header {
    background: var(--bg-card-header);
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.info-card-body {
    padding: 1.25rem;
}

/* KPI Cards (Dashboard) */
.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
    transition: all .25s ease;
    box-shadow: var(--shadow-sm);
}
.kpi-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--bg-card-hover);
}
.kpi-card .kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Compact variant for email scheduled KPI */
.kpi-card-email {
    padding: .85rem 1rem !important;
}
.kpi-card-email .kpi-value {
    font-size: 1.4rem !important;
}
.kpi-card .kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}
.kpi-card .kpi-label {
    font-size: .75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: .15rem;
}

.icon-active { background: rgba(13, 148, 136, 0.1); color: var(--teal-500); }
.icon-due { background: rgba(225, 29, 72, 0.08); color: var(--rose-500); }
.icon-completed { background: rgba(5, 150, 105, 0.1); color: var(--emerald-500); }
.icon-failed { background: rgba(225, 29, 72, 0.08); color: var(--rose-500); }

/* Company Cards (companies.php) */
.company-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: all .25s;
    box-shadow: var(--shadow-sm);
}
.company-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.company-card .card-header {
    background: var(--bg-card-header);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .2s;
}
.company-card .card-header:hover {
    background: linear-gradient(135deg, #f8f9fb 0%, #f4f6f9 100%);
}
.company-card .card-body {
    padding: 0;
}

/* Sequence Group Cards (Dashboard sequence view) */
.seq-group-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .25s ease;
}
.seq-group-card:hover {
    box-shadow: var(--shadow-md);
}

/* Form Card (log_action.php) */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2rem;
    max-width: 680px;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
}

/* ===== TABLES ===== */
.radar-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.radar-table table {
    margin-bottom: 0;
}
.radar-table thead th {
    background: var(--bg-table-header);
    color: var(--text-muted);
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--border);
}
.radar-table tbody td {
    padding: .8rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    font-size: .85rem;
}
.radar-table tbody tr:last-child td {
    border-bottom: none;
}
.radar-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Sequence History Table (view_company.php) */
.seq-table {
    width: 100%;
}
.seq-table th {
    background: var(--bg-table-header);
    color: var(--text-muted);
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: .6rem 1rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.seq-table td {
    padding: .7rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    font-size: .82rem;
}
.seq-table tr:hover {
    background: rgba(0, 0, 0, 0.02);
}
.seq-table tr:last-child td {
    border-bottom: none;
}

/* Log Row Table (sequence_detail.php) */
.log-row-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: .5rem;
}
.log-row-table th {
    font-size: .7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .5rem .65rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}
.log-row-table td {
    padding: .5rem .55rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
}
.log-row-table .log-row td:first-child { padding-left: .75rem; }
.log-row-table .log-row td:last-child { padding-right: .75rem; }
.log-row-table select,
.log-row-table input,
.log-row-table textarea {
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: 8px;
    padding: .55rem .7rem;
    font-size: .82rem;
    width: 100%;
    min-height: 38px;
    transition: border-color .2s;
}
.log-row-table select:focus,
.log-row-table input:focus,
.log-row-table textarea:focus {
    border-color: var(--navy-500) !important;
    box-shadow: 0 0 0 2px rgba(10, 37, 64, 0.08) !important;
}
.log-row-table select {
    appearance: auto;
    -webkit-appearance: auto;
}

/* Sequence Members Table (Dashboard sequence view) */
.seq-members-table {
    margin-bottom: 0;
    font-size: .82rem;
}
.seq-members-table thead th {
    background: var(--bg-table-header);
    color: var(--text-muted);
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: .55rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.seq-members-table tbody td {
    padding: .65rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
}
.seq-members-table tbody tr:last-child td { border-bottom: none; }
.seq-members-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.015);
}

/* ===== FILTERS ===== */
.filter-section {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.filter-section label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.filter-label {
    font-size: .62rem;
    font-weight: 600;
    color: var(--text-muted, #9CA3AF);
    text-transform: uppercase;
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    gap: .25rem;
    padding-left: 2px;
}
.filter-label i {
    font-size: .6rem;
    width: 14px;
    opacity: .7;
}

.filter-select {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: 8px;
    padding: .38rem 2rem .38rem .7rem;
    font-size: .75rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    min-width: 0;
    transition: border-color .15s;
    height: 34px;
    appearance: auto;
    -webkit-appearance: auto;
}
.filter-select:focus {
    border-color: var(--teal-500) !important;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1) !important;
}

/* Active filter state — elemen filter yang sedang punya nilai (via filter-active.js) */
.filter-select.filter-active {
    border-color: var(--gold-accent) !important;
    background-color: rgba(196, 169, 98, 0.08) !important;
    box-shadow: 0 0 0 3px rgba(196, 169, 98, 0.14) !important;
}
.filter-label.filter-active-label {
    color: var(--gold-dark);
}
.filter-label.filter-active-label i {
    color: var(--gold-accent);
}

/* Responsive: filter group columns */
@media (max-width: 575.98px) {
    .filter-label {
        font-size: .58rem;
    }
    .filter-select {
        font-size: .7rem;
        padding: .32rem 1.6rem .32rem .55rem;
        height: 30px;
    }
}

/* ===== BADGES & STATUS ===== */
.badge-date {
    font-size: .68rem;
    font-weight: 600;
    padding: .28rem .6rem;
    border-radius: 8px;
    white-space: nowrap;
}
.badge-date.overdue {
    background: rgba(225, 29, 72, 0.08);
    color: var(--rose-500);
    border: 1px solid rgba(225, 29, 72, 0.15);
}
.badge-date.due-today {
    background: rgba(217, 119, 6, 0.08);
    color: var(--amber-500);
    border: 1px solid rgba(217, 119, 6, 0.15);
}
.badge-date.upcoming {
    background: rgba(5, 150, 105, 0.08);
    color: var(--emerald-500);
    border: 1px solid rgba(5, 150, 105, 0.12);
}
.badge-date.closed {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.status-badge-sm,
.status-badge {
    font-size: .62rem;
    font-weight: 600;
    padding: .2rem .5rem;
    border-radius: 20px;
    white-space: nowrap;
}
.status-badge {
    font-size: .72rem;
    padding: .22rem .6rem;
}
.status-active {
    background: rgba(2, 132, 199, 0.1);
    color: var(--sky-500);
}
.status-completed {
    background: rgba(5, 150, 105, 0.1);
    color: var(--emerald-500);
}
.status-failed {
    background: rgba(225, 29, 72, 0.08);
    color: var(--rose-500);
}

.condition-badge {
    font-size: .62rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.condition-a {
    background: rgba(2, 132, 199, 0.1);
    color: var(--sky-500);
}
.condition-b {
    background: rgba(5, 150, 105, 0.1);
    color: var(--emerald-500);
}
.condition-c {
    background: rgba(217, 119, 6, 0.1);
    color: var(--amber-500);
}
.condition-d {
    background: rgba(124, 58, 237, 0.1);
    color: var(--purple-500);
}

.condition-badge-sm {
    font-size: .58rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.condition-badge-sm.condition-a {
    background: rgba(56, 189, 248, 0.15);
    color: var(--sky-400);
}
.condition-badge-sm.condition-b {
    background: rgba(52, 211, 153, 0.15);
    color: var(--emerald-400);
}
.condition-badge-sm.condition-c {
    background: rgba(251, 191, 36, 0.15);
    color: var(--amber-400);
}
.condition-badge-sm.condition-d {
    background: rgba(167, 139, 250, 0.15);
    color: var(--purple-400);
}

/* ===== COMPANY BADGES ===== */
.badge-contacts {
    background: rgba(13, 148, 136, 0.08);
    color: var(--teal-500);
    font-size: .72rem;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 20px;
}
.badge-contacts.zero {
    background: rgba(148, 157, 181, 0.1);
    color: var(--text-muted);
}

/* ===== COMPANY SPECIFIC ===== */
.company-banner {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.company-banner .company-name-lg {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}
.company-banner .company-meta {
    font-size: .82rem;
    color: var(--text-muted);
}
.company-banner .company-meta i { width: 18px; }

.company-name-lg {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color .2s;
}
.company-name-lg:hover { color: var(--teal-500); }

.company-link {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color .2s;
}
.company-link:hover { color: var(--teal-500); }

.company-link-small {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color .2s;
}
.company-link-small:hover { color: var(--teal-500); }

/* ===== TAB NAVIGATION (view_company) ===== */
.nav-tabs-custom {
    display: flex;
    gap: .25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.nav-tabs-custom .nav-link {
    color: var(--text-muted);
    border: 1px solid transparent;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    padding: .6rem 1.2rem;
    font-size: .82rem;
    font-weight: 500;
    transition: all .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.nav-tabs-custom .nav-link:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--border);
}
.nav-tabs-custom .nav-link.active {
    color: var(--gold-accent);
    background: var(--bg-card);
    border-color: var(--border);
    border-bottom-color: var(--bg-card);
}
.nav-tabs-custom .nav-link .badge-tab {
    font-size: .62rem;
    font-weight: 600;
    padding: .12rem .45rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}
.nav-tabs-custom .nav-link.active .badge-tab {
    background: rgba(196, 169, 98, 0.12);
    color: var(--gold-accent);
}

n/* Sequence detail tabs — compact variant inside info-card-header */
.seq-detail-tabs {
    margin-bottom: 0 !important;
    border-bottom: none !important;
    padding: .25rem .5rem 0 .5rem !important;
}
.seq-detail-tabs .nav-link {
    padding: .45rem .85rem !important;
    font-size: .78rem !important;
    margin-bottom: 0;
    border-bottom: 1px solid transparent;
}
.seq-detail-tabs .nav-link.active {
    border-bottom-color: var(--bg-card);
    margin-bottom: -1px;
}
/* ===== SEQUENCE GROUP VIEW (Dashboard) ===== */
.seq-header {
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .2s;
}
.seq-header:hover { background: var(--bg-card-hover); }

.seq-collapse-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    padding: 0;
    font-size: .8rem;
    flex-shrink: 0;
}
.seq-collapse-btn:hover {
    background: rgba(0, 0, 0, .03);
    border-color: var(--border-hover);
    color: var(--text-primary);
}
.seq-collapse-btn i { transition: transform .25s ease; }
.seq-collapse-btn:not(.collapsed) i { transform: rotate(90deg); }

.seq-name-link {
    font-weight: 600;
    font-size: .95rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: color .2s;
}
.seq-name-link:hover { color: var(--teal-500); }

.seq-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: .25rem;
    font-size: .75rem;
    color: var(--text-muted);
}

.seq-members-list { padding: 0; }

/* ===== CONTACT CHIPS ===== */
.contact-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .38rem .7rem;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin: .2rem;
    font-size: .8rem;
    transition: all .15s;
}
.contact-chip:hover { border-color: var(--border-hover); }
.contact-chip .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-table-header);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}
.contact-chip.unreached {
    border-color: var(--gold-accent);
    background: rgba(196, 169, 98, 0.06);
}
.contact-chip.contacted {
    opacity: .45;
    border-style: dashed;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.contact-item:last-child { border-bottom: none; }
.contact-item:hover { background: rgba(0, 0, 0, 0.02); }
.contact-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-table-header);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}
.contact-info { flex: 1; min-width: 0; }
.contact-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-primary);
}
.contact-detail {
    font-size: .78rem;
    color: var(--text-muted);
}
.contact-detail i {
    margin-right: .3rem;
    width: 14px;
}

/* Badge Invalid untuk kontak di companies.php */
/* ============================
   COMPANY SEQUENCES PANEL
   ============================ */
.company-sequences-panel {
    margin-top: .75rem;
    border: 1px solid var(--border, #e2e5ea);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card, #ffffff);
}

.company-sequences-header {
    padding: .6rem .75rem;
    font-size: .8rem;
    font-weight: 700;
    color: var(--navy-500, #0A2540);
    border-bottom: 1px solid var(--border-light, #eef0f3);
    display: flex;
    align-items: center;
    gap: .4rem;
}

.company-sequences-header i {
    color: var(--gold-accent, #C4A962);
    font-size: .85rem;
}

.company-sequences-body {
    padding: .4rem;
}

.company-sequences-loading {
    padding: .75rem;
    text-align: center;
    font-size: .72rem;
    color: var(--text-muted, #9CA3AF);
}

.company-sequences-empty {
    padding: .75rem;
    text-align: center;
    font-size: .72rem;
    color: var(--text-muted, #9CA3AF);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}

.company-sequences-empty i {
    font-size: .9rem;
    opacity: .5;
}

.company-sequences-list {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.company-sequence-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem .6rem;
    border-radius: 8px;
    border: 1px solid var(--border-light, #eef0f3);
    text-decoration: none;
    transition: all .15s;
    gap: .5rem;
}

.company-sequence-item:hover {
    background: var(--bg-card-hover, #fafbfc);
    border-color: var(--border-hover, #c5cad4);
    text-decoration: none;
}

.company-sequence-item-left {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    min-width: 0;
    flex: 1;
}

.company-sequence-item-left > i {
    color: var(--gold-accent, #C4A962);
    font-size: .9rem;
    margin-top: .15rem;
    flex-shrink: 0;
}

.company-sequence-item-info {
    min-width: 0;
    flex: 1;
}

.company-sequence-item-name {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.company-sequence-item-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .65rem;
    color: var(--text-muted, #9CA3AF);
    margin-top: .1rem;
    flex-wrap: wrap;
}

.company-sequence-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}

.company-sequence-item-meta i {
    font-size: .58rem;
    color: var(--text-very-muted, #b8bfce);
}

.company-sequence-item-right {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-shrink: 0;
}

.company-sequence-item-right i {
    font-size: .65rem;
    color: var(--text-muted, #9CA3AF);
}

.badge-invalid-contact {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    font-size: .62rem;
    font-weight: 700;
    padding: .08rem .45rem;
    border-radius: 5px;
    background: rgba(239,68,68,.12);
    color: var(--rose-400);
    vertical-align: middle;
    margin-left: .4rem;
    white-space: nowrap;
    line-height: 1.4;
    border: 1px solid rgba(239,68,68,.15);
}
.badge-invalid-contact i {
    font-size: .65rem;
    margin-right: 0;
}

/* ─── Contact Name Link (companies.js) ──────────────────── */
.contact-name-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    transition: color .15s;
}
.contact-name-link:hover {
    color: var(--navy-500);
    text-decoration: underline;
}
    width: auto;
}

/* ===== COMPANY SPLIT LAYOUT (companies.php collapse) ===== */
.company-split-layout {
    display: flex;
    flex-direction: row;
    border-top: 1px solid var(--border);
    min-height: 160px;
}

.company-split-left {
    flex: 1;
    min-width: 0;
    border-right: 1px solid var(--border);
    padding: .5rem 0;
}

.company-split-right {
    width: 600px;
    flex-shrink: 0;
    background: var(--bg-card-hover);
}

.company-info-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.company-info-header {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    padding: .7rem .85rem .5rem;
    border-bottom: 1px solid var(--border-light);
}

.company-info-body {
    padding: .5rem .85rem .75rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.company-info-row {
    display: flex;
    flex-direction: column;
    gap: .05rem;
    padding: .35rem 0;
    border-bottom: 1px solid var(--border-light);
}
.company-info-row:last-child {
    border-bottom: none;
}

.company-info-label {
    font-size: .65rem;
    font-weight: 600;
    color: var(--text-very-muted);
    display: flex;
    align-items: center;
    gap: .3rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.company-info-label i {
    font-size: .6rem;
    width: 14px;
}

.company-info-value {
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-all;
}

.company-info-link {
    color: var(--navy-500);
    text-decoration: none;
    font-weight: 500;
    transition: color .2s;
    word-break: break-all;
}
.company-info-link:hover {
    color: var(--gold-accent);
    text-decoration: underline;
}

/* ===== COMPANY INFO GOOGLE SEARCH BUTTON ===== */
.company-info-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    padding: .45rem .65rem;
    font-size: .72rem;
    font-weight: 600;
    color: #fff;
    background: #15253e;
    border-radius: 8px;
    text-decoration: none;
    transition: all .2s;
    box-shadow: 0 1px 3px rgba(66,133,244,0.25);
}
.company-info-google-btn:hover {
    background: #3367D6;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(66,133,244,0.35);
}
.company-info-google-btn i {
    font-size: .85rem;
}

/* ===== CONTACT NAME LINK (Dashboard) ===== */
.contact-name-link {
    color: var(--text-primary) !important;
    text-decoration: none !important;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: all .15s ease !important;
}
.contact-name-link:hover {
    color: var(--navy-500) !important;
    border-bottom-color: var(--navy-500);
}

/* Responsive: stack vertically on mobile */
@media (max-width: 767.98px) {
    .company-split-layout {
        flex-direction: column;
    }
    .company-split-left {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .company-split-right {
        width: 100%;
    }
}

/* ===== MEMBER CHIP (sequence_detail) ===== */
.member-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .8rem;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin: .2rem;
    font-size: .82rem;
    transition: all .2s;
}
.member-chip:hover { border-color: var(--border-hover); }
.member-chip .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-table-header);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ===== RADAR ALERTS ===== */
.radar-alert {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    transition: all .2s;
    margin-bottom: .7rem;
}
.radar-alert:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}
.radar-alert.overdue { border-left: 3px solid var(--rose-400); }
.radar-alert.due-today { border-left: 3px solid var(--amber-400); }
.radar-alert.upcoming { border-left: 3px solid var(--emerald-400); }
.radar-alert .radar-date {
    font-size: .68rem;
    font-weight: 600;
    white-space: nowrap;
}
.radar-alert .radar-contact {
    font-weight: 600;
    color: var(--text-primary);
}
.radar-alert .radar-action {
    font-size: .8rem;
    color: var(--text-secondary);
}
.radar-alert .radar-sequence {
    font-size: .72rem;
    color: var(--text-muted);
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: .65rem;
    top: .5rem;
    bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline-item {
    position: relative;
    padding-bottom: 1.15rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: -1.6rem;
    top: .25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-card);
    z-index: 1;
}
.timeline-dot.email {
    border-color: var(--sky-400);
    background: rgba(56, 189, 248, 0.15);
}
.timeline-dot.whatsapp {
    border-color: var(--teal-400);
    background: rgba(14, 200, 174, 0.15);
}
.timeline-dot.phone {
    border-color: var(--emerald-500);
    background: rgba(5, 150, 105, 0.15);
}
.timeline-dot.linkedin {
    border-color: #0a66c2;
    background: rgba(10, 102, 194, 0.12);
}
.timeline-dot.other {
    border-color: var(--amber-500);
    background: rgba(217, 119, 6, 0.12);
}
.timeline-content {
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .85rem;
    transition: all .2s;
}
.timeline-content:hover { border-color: var(--border-hover); }

/* ===== INFO LABELS ===== */
.info-label {
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .2rem;
}
.info-value {
    font-size: .88rem;
    color: var(--text-primary);
    margin-bottom: .7rem;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    display: block;
    opacity: .6;
}

/* ===== SEARCH BOX (companies) ===== */
.search-box {
    max-width: 400px;
}
.search-box .form-control {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: 10px;
    padding: .55rem 1rem;
    font-size: .9rem;
}
.search-box .form-control:focus {
    border-color: var(--teal-500) !important;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1) !important;
}
.search-box .form-control::placeholder { color: var(--text-muted); }

/* ============================================================
   ENTRY CHECKLIST — Entry Points Tracker
   ============================================================ */

.entry-table-wrap {
    overflow-x: auto;
}

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

.entry-table th {
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: .6rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-table-header);
    white-space: nowrap;
    text-align: left;
}

.entry-table td {
    padding: .5rem .6rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
    font-size: .82rem;
    transition: background .15s;
}

.entry-table tbody tr:hover td {
    background: rgba(0,0,0,0.015);
}

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

.entry-num {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

.entry-name-input,
.entry-notes-input {
    width: 100%;
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: 8px;
    padding: .45rem .65rem;
    font-size: .82rem;
    transition: border-color .2s, box-shadow .2s;
    font-family: inherit;
    box-sizing: border-box;
}

.entry-name-input:focus,
.entry-notes-input:focus {
    border-color: var(--navy-500) !important;
    box-shadow: 0 0 0 2px rgba(10,37,64,0.08) !important;
    outline: none;
}

.entry-name-input::placeholder,
.entry-notes-input::placeholder {
    color: var(--text-muted);
}

.entry-status-select {
    width: 100%;
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: 8px;
    padding: .45rem .65rem;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s;
    font-family: inherit;
    appearance: auto;
    -webkit-appearance: auto;
    box-sizing: border-box;
}

.entry-status-select:focus {
    border-color: var(--navy-500) !important;
    box-shadow: 0 0 0 2px rgba(10,37,64,0.08) !important;
    outline: none;
}

.entry-status-select option[value="berhasil"] {
    color: var(--emerald-500);
    font-weight: 600;
}
.entry-status-select option[value="gagal"] {
    color: var(--rose-500);
    font-weight: 600;
}
.entry-status-select option[value="tidak_ada"] {
    color: var(--text-muted);
    font-weight: 600;
}

.entry-action {
    text-align: center;
}

.entry-remove-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    padding: .3rem .45rem;
    font-size: .72rem;
    cursor: pointer;
    transition: all .2s;
    line-height: 1;
}
.entry-remove-btn:hover {
    border-color: var(--rose-400);
    color: var(--rose-500);
    background: rgba(225,29,72,0.06);
}

.entry-footer {
    padding: .6rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--bg-table-header);
}

.entry-legend-item {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .68rem;
    color: var(--text-muted);
    font-weight: 500;
}

.entry-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Toast notification */
.entry-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: .65rem 1.25rem;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 99999;
    animation: entryToastIn .3s ease-out;
    pointer-events: none;
    transition: opacity .3s, transform .3s;
    color: #fff;
}

.entry-toast-success {
    background: var(--emerald-600);
}

.entry-toast-error {
    background: var(--rose-500);
}

@keyframes entryToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Responsive */
@media (max-width: 767.98px) {
    .entry-table th,
    .entry-table td {
        padding: .4rem .5rem;
    }
    .entry-name-input,
    .entry-notes-input {
        font-size: .75rem;
        padding: .35rem .5rem;
    }
    .entry-status-select {
        font-size: .72rem;
        padding: .35rem .5rem;
    }
}

/* ============================================================
   FULLCALENDAR CUSTOMIZATION — Navy + Gold Theme
   ============================================================ */

/* Override FullCalendar default variables */
:root {
    --fc-border-color: var(--border);
    --fc-button-bg-color: var(--navy-600);
    --fc-button-border-color: var(--navy-600);
    --fc-button-hover-bg-color: var(--navy-400);
    --fc-button-hover-border-color: var(--navy-400);
    --fc-button-active-bg-color: var(--navy-500);
    --fc-button-active-border-color: var(--navy-500);
    --fc-today-bg-color: rgba(5, 150, 105, 0.06);
    --fc-event-bg-color: var(--sky-500);
    --fc-event-border-color: var(--sky-500);
    --fc-event-text-color: #fff;
    --fc-page-bg-color: var(--bg-card);
    --fc-neutral-bg-color: var(--bg-table-header);
    --fc-list-event-hover-bg-color: var(--bg-card-hover);
    --fc-highlight-color: rgba(196, 169, 98, 0.08);
    --fc-more-link-bg-color: var(--bg-table-header);
    --fc-more-link-text-color: var(--text-secondary);
    --fc-event-resizer-thickness: 4px;
}

/* Calendar container */
#calendarEl {
    background: var(--bg-card);
}

/* Header toolbar */
.fc .fc-toolbar-title {
    font-size: 1.05rem !important;
    font-weight: 700;
    color: var(--navy-500);
    letter-spacing: -0.02em;
}

.fc .fc-button {
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: .78rem !important;
    padding: .35rem .75rem !important;
    box-shadow: none !important;
}

.fc .fc-button-primary:not(:disabled):active:focus,
.fc .fc-button-primary:not(:disabled).fc-button-active:focus,
.fc .fc-button-primary:focus {
    box-shadow: 0 0 0 2px rgba(10, 37, 64, 0.15) !important;
}

.fc .fc-today-button {
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: .78rem !important;
    padding: .35rem .75rem !important;
    border-color: var(--border) !important;
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
}
.fc .fc-today-button:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--border-hover) !important;
    color: var(--text-primary) !important;
}
.fc .fc-today-button:disabled {
    opacity: .5 !important;
}

.fc .fc-button-group .fc-button {
    margin-right: 2px;
}

/* Day headers */
.fc .fc-col-header-cell {
    padding: .55rem .2rem !important;
    background: var(--bg-table-header);
    border-color: var(--border) !important;
}
.fc .fc-col-header-cell-cushion {
    font-size: .72rem !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    text-transform: uppercase;
    letter-spacing: .05em;
    text-decoration: none !important;
    padding: 0;
}

/* Day grid cells */
.fc .fc-daygrid-day {
    border-color: var(--border-light) !important;
    transition: background .1s;
}

.fc .fc-daygrid-day-top {
    padding: .25rem .35rem 0 !important;
}

.fc .fc-daygrid-day-number {
    font-size: .78rem !important;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none !important;
}

/* Today highlight */
.fc .fc-day-today {
    background: var(--fc-today-bg-color) !important;
}

.fc-day-today-custom .fc-daygrid-day-number {
    color: var(--emerald-500) !important;
    font-weight: 700 !important;
    font-size: .85rem !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
    background: var(--emerald-500);
    color: #fff !important;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem !important;
    font-weight: 700 !important;
}

/* Weekend days */
.fc .fc-day-sat .fc-daygrid-day-number,
.fc .fc-day-sun .fc-daygrid-day-number {
    color: var(--rose-400);
}

.fc .fc-day-sat.fc-day-today .fc-daygrid-day-number,
.fc .fc-day-sun.fc-day-today .fc-daygrid-day-number {
    background: var(--rose-500);
    color: #fff !important;
}

/* Events */
.fc .fc-daygrid-event {
    border-radius: 5px !important;
    margin: 1px 3px !important;
    padding: 2px 4px !important;
    font-size: .65rem !important;
    font-weight: 600 !important;
    border: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08) !important;
    cursor: pointer !important;
    transition: transform .1s, box-shadow .1s;
}

.fc .fc-daygrid-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
}

.fc .fc-daygrid-event .fc-event-title {
    font-size: .62rem !important;
    font-weight: 600 !important;
    padding: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fc .fc-daygrid-dot-event {
    padding: 2px 4px !important;
}

/* Event time badge */
.fc-event-time-badge {
    display: inline-block;
    font-size: .5rem;
    font-weight: 500;
    opacity: .8;
    margin-left: 2px;
    padding: 0 2px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    line-height: 1.2;
}

/* Overdue indicator */
.fc-event-overdue-indicator {
    display: inline-block;
    font-size: .55rem;
    margin-right: 2px;
    color: rgba(255,255,255,0.9);
}

/* Completed indicator */
.fc-event-done-indicator {
    display: inline-block;
    font-size: .55rem;
    margin-right: 2px;
    color: rgba(255,255,255,0.8);
}

/* Overdue event (class set by our PHP) */
.fc-event-overdue {
    opacity: 0.9 !important;
}

/* Completed event */
.fc-event-completed {
    opacity: 0.7 !important;
}

/* Past events — faded/pudar untuk tanggal lampau */
.fc-event-past {
    opacity: 0.55 !important;
}

/* Today's event */
.fc-event-today {
    box-shadow: 0 0 0 1.5px var(--amber-400), 0 1px 3px rgba(0,0,0,0.12) !important;
}

/* More link */
.fc .fc-daygrid-more-link {
    border-radius: 4px !important;
    font-size: .62rem !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    background: var(--bg-table-header) !important;
    padding: 1px 4px !important;
    margin: 1px 3px !important;
    text-decoration: none !important;
    transition: background .1s;
}
.fc .fc-daygrid-more-link:hover {
    background: var(--border) !important;
    color: var(--text-primary) !important;
}

/* No events text */
.fc .fc-daygrid-empty {
    font-size: .78rem;
    color: var(--text-muted);
    padding: 1rem;
}

/* Other month days */
.fc .fc-day-other .fc-daygrid-day-number {
    opacity: .35;
}

/* Disable day header links (keep them as plain text) */
.fc .fc-col-header-cell a {
    cursor: default;
    pointer-events: none;
}

/* Scrollbar styling for calendar container */
#calendarViewContainer {
    overflow: visible;
}

/* Responsive calendar */
@media (max-width: 767.98px) {
    .fc .fc-toolbar-title {
        font-size: .85rem !important;
    }
    .fc .fc-button {
        font-size: .68rem !important;
        padding: .25rem .5rem !important;
    }
    .fc .fc-today-button {
        font-size: .68rem !important;
        padding: .25rem .5rem !important;
    }
    .fc .fc-col-header-cell-cushion {
        font-size: .62rem !important;
    }
    .fc .fc-daygrid-day-number {
        font-size: .68rem !important;
    }
    .fc .fc-daygrid-event {
        font-size: .55rem !important;
        padding: 1px 3px !important;
        margin: 1px 2px !important;
    }
    .fc .fc-daygrid-event .fc-event-title {
        font-size: .52rem !important;
    }
    .fc .fc-day-today .fc-daygrid-day-number {
        width: 22px;
        height: 22px;
        font-size: .68rem !important;
    }
}

/* ============================
   UMS COPY BUTTON
   ============================ */
.ums-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    font-size: 0.72rem;
    margin-left: 6px;
    flex-shrink: 0;
}

.ums-copy-btn:hover {
    background: rgba(196, 169, 98, 0.1);
    border-color: var(--gold-accent);
    color: var(--gold-accent);
    transform: scale(1.05);
}

.ums-copy-btn:active {
    transform: scale(0.95);
}

.ums-copy-btn.copied {
    background: rgba(5, 150, 105, 0.12);
    border-color: var(--emerald-500);
    color: var(--emerald-500);
}

.ums-copy-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--emerald-600, #059669);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    animation: copyToastIn 0.3s ease-out;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes copyToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== SEARCH HIGHLIGHT ===== */
.search-highlight {
    background: rgba(196, 169, 98, 0.25);
    color: var(--navy-700);
    font-weight: 700;
    padding: 0 .15rem;
    border-radius: 4px;
}

/* ============================================================
   MEMBER PREVIEW MODAL — Visual Outreach Timeline
   ============================================================ */
.prev-contact-header {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .5rem;
    flex-wrap: wrap;
}

.prev-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.prev-contact-info {
    flex: 1;
    min-width: 0;
}

.prev-contact-name {
    display: block;
    font-weight: 600;
    font-size: .95rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.prev-contact-title {
    display: block;
    font-size: .72rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.prev-level-badge {
    display: inline-flex;
    align-items: center;
    font-size: .65rem;
    font-weight: 600;
    padding: .2rem .5rem;
    border-radius: 6px;
    border: 1px solid;
    white-space: nowrap;
}

.prev-member-note {
    font-size: .75rem;
    color: var(--text-muted);
    font-style: italic;
    padding: .35rem .75rem;
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
    margin-bottom: .75rem;
}

.prev-level-summary {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    font-size: .72rem;
    color: var(--text-muted);
    padding: .5rem .75rem;
    background: var(--bg-table-header);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.prev-summary-divider {
    color: var(--border);
    font-weight: 300;
}

/* Timeline */
.prev-timeline {
    position: relative;
    padding-left: 2.2rem;
}
.prev-timeline::before {
    content: '';
    position: absolute;
    left: 1.05rem;
    top: .25rem;
    bottom: .25rem;
    width: 2px;
    background: var(--border);
    z-index: 0;
}

.prev-step-row {
    display: flex;
    gap: .75rem;
    position: relative;
    margin-bottom: .35rem;
}

.prev-dot-col {
    flex-shrink: 0;
    width: 2.2rem;
    margin-left: -2.2rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: .35rem;
    z-index: 1;
    position: relative;
}

.prev-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2.5px solid var(--level-color, #94a3b8);
    background: var(--bg-card);
    transition: all .2s;
    flex-shrink: 0;
}
.prev-dot-completed {
    background: var(--emerald-500);
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 3px rgba(5,150,105,0.15);
}
.prev-dot-today {
    background: var(--amber-400);
    border-color: var(--amber-500);
    box-shadow: 0 0 0 3px rgba(217,119,6,0.15);
}
.prev-dot-overdue {
    background: var(--rose-500);
    border-color: var(--rose-500);
    box-shadow: 0 0 0 3px rgba(225,29,72,0.12);
}
.prev-dot-pending {
    background: var(--bg-card);
    border-color: var(--level-color, #94a3b8);
}

.prev-content-col {
    flex: 1;
    min-width: 0;
    padding-bottom: .5rem;
}

.prev-bar {
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-left: 3px solid var(--level-color, #0284c7);
    border-radius: 10px;
    padding: .65rem .85rem;
    transition: all .2s;
}
.prev-bar:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}
.prev-bar-completed {
    background: rgba(5,150,105,0.04);
    border-left-color: var(--emerald-500);
    opacity: .9;
}
.prev-bar-today {
    background: rgba(217,119,6,0.04);
    border-left-color: var(--amber-500);
}
.prev-bar-overdue {
    background: rgba(225,29,72,0.04);
    border-left-color: var(--rose-500);
}
.prev-bar-pending {
    background: var(--bg-card-hover);
    border-left-color: var(--level-color, #94a3b8);
}

.prev-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .15rem;
}

.prev-step-num {
    font-size: .65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.prev-bar-title {
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.prev-bar-date {
    font-size: .72rem;
    color: var(--text-secondary);
    margin-top: .05rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}
.prev-bar-date i {
    font-size: .7rem;
    color: var(--text-muted);
}

.prev-bar-sent {
    font-size: .7rem;
    color: var(--emerald-600);
    margin-top: .2rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}
.prev-bar-sent i {
    font-size: .68rem;
}

.prev-bar-channel {
    font-size: .7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-top: .05rem;
}
.prev-bar-channel i {
    font-size: .72rem;
}

.prev-bar-notes {
    font-size: .72rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: .25rem;
    padding-top: .25rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: flex-start;
    gap: .35rem;
}
.prev-bar-notes i {
    font-size: .68rem;
    color: var(--text-muted);
    margin-top: .1rem;
    flex-shrink: 0;
}

/* Gap indicator */
.prev-gap {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: .1rem 0 .1rem .35rem;
    margin-left: -2.2rem;
    font-size: .62rem;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    z-index: 1;
}
.prev-gap i {
    font-size: .9rem;
    color: var(--border);
    margin-right: .1rem;
}
.prev-gap span {
    background: var(--bg-card);
    padding: 0 .3rem;
    border-radius: 4px;
    color: var(--text-muted);
}

/* Status labels */
.prev-status-completed {
    font-size: .62rem;
    font-weight: 600;
    color: var(--emerald-500);
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}
.prev-status-today {
    font-size: .62rem;
    font-weight: 600;
    color: var(--amber-500);
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}
.prev-status-overdue {
    font-size: .62rem;
    font-weight: 600;
    color: var(--rose-500);
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}
.prev-status-next {
    font-size: .62rem;
    font-weight: 600;
    color: var(--sky-500);
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}
.prev-status-pending {
    font-size: .62rem;
    font-weight: 600;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}

/* Extra activities */
.prev-extra-section {
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
}

.prev-extra-title {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .5rem;
}

.prev-extra-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.prev-extra-item {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .5rem .65rem;
    background: rgba(0,0,0,0.015);
    border: 1px solid var(--border-light);
    border-radius: 8px;
}

.prev-extra-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-accent);
    flex-shrink: 0;
    margin-top: .45rem;
}

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

.prev-extra-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.prev-extra-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-primary);
}

.prev-extra-date {
    font-size: .65rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.prev-extra-date i {
    font-size: .62rem;
}

.prev-extra-channel {
    font-size: .68rem;
    color: var(--text-muted);
    margin-top: .05rem;
}

.prev-extra-notes {
    font-size: .72rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: .1rem;
    padding-top: .1rem;
}
.prev-extra-notes i {
    color: var(--text-muted);
    font-size: .68rem;
}

/* ===== PREVIEW MODE TOGGLE ===== */
.prev-mode-toggle {
    display: flex;
    gap: .25rem;
    margin-bottom: .75rem;
    background: var(--bg-table-header);
    border-radius: 8px;
    padding: .25rem;
    border: 1px solid var(--border);
}

.prev-mode-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: .35rem .6rem;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
}
.prev-mode-btn:hover {
    color: var(--text-secondary);
}
.prev-mode-btn.prev-mode-active {
    background: var(--bg-card);
    color: var(--navy-500);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

/* ===== PREVIEW GANTT CHART — UNIFIED GRID ===== */
/* Satu grid container untuk header + semua step rows.
   Menjamin kolom identik — tidak ada sub-pixel offset antar baris. */
.prev-gantt-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.prev-gantt-unified {
    display: grid;
    min-width: 500px;
    font-size: .72rem;
}

/* --- Header row (sticky items) --- */
.prev-gantt-uhdr {
    background: var(--bg-table-header);
    padding: .4rem .5rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    font-size: .6rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    min-height: 44px;
}

.prev-gantt-uday {
    background: var(--bg-table-header);
    text-align: center;
    padding: .35rem .2rem;
    border-left: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .05rem;
    min-height: 44px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.prev-gantt-uday-name {
    font-size: .58rem;
    font-weight: 600;
    color: var(--text-very-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.prev-gantt-uday-date {
    font-size: .78rem;
    font-weight: 700;
    color: var(--navy-500);
    line-height: 1.1;
}
.prev-gantt-uday-month {
    font-size: .55rem;
    font-weight: 500;
    color: var(--text-muted);
}
.prev-gantt-uweekend .prev-gantt-uday-date {
    color: var(--rose-400);
}
.prev-gantt-utoday {
    background: rgba(5, 150, 105, 0.05);
}
.prev-gantt-utoday .prev-gantt-uday-date {
    color: var(--emerald-500);
    font-size: .85rem;
}
.prev-gantt-utoday-badge {
    display: inline-block;
    font-size: .45rem;
    font-weight: 700;
    padding: .05rem .2rem;
    border-radius: 3px;
    background: var(--emerald-500);
    color: #fff;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1.2;
    margin-top: .05rem;
}

/* --- Data rows --- */
.prev-gantt-ulabel {
    padding: .4rem .5rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-card);
    position: sticky;
    left: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: .05rem;
    align-items: flex-start;
    justify-content: center;
    min-height: 48px;
}

.prev-gantt-ustep-num {
    font-size: .62rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.prev-gantt-ugap {
    font-size: .55rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(0,0,0,0.03);
    padding: .05rem .25rem;
    border-radius: 3px;
}

.prev-gantt-ucell {
    padding: .3rem .2rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    border-left: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    min-height: 48px;
}
.prev-gantt-ucell-today {
    background: rgba(5,150,105,0.03);
}
.prev-gantt-ucell-bar {
    padding: .2rem;
}

/* Step bar inside cell */
.prev-gantt-ubar {
    background: var(--bar-color, #0284c7);
    color: #fff;
    border-radius: 5px;
    padding: .25rem .35rem;
    font-size: .6rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: .05rem;
    width: 100%;
    min-height: 38px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform .15s, box-shadow .15s;
    position: relative;
    z-index: 1;
}
.prev-gantt-ubar:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    z-index: 10;
    min-width: calc(100% + 12px);
    position: relative;
}

.prev-gantt-ubar-label {
    font-size: .62rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

/* Hover: tampilkan seluruh teks gantt bar */
.prev-gantt-ubar:hover .prev-gantt-ubar-label {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
}

.prev-gantt-ubar-status {
    font-size: .5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    opacity: .9;
    line-height: 1.1;
}
.prev-gantt-ubar-status i {
    font-size: .55rem;
}

.prev-gantt-ubar-sent {
    font-size: .48rem;
    opacity: .75;
    display: flex;
    align-items: center;
    gap: .15rem;
    line-height: 1.1;
}
.prev-gantt-ubar-sent i {
    font-size: .5rem;
}

/* Bar state variants */
.prev-gantt-ubar-done {
    background: var(--emerald-500) !important;
    opacity: .85;
    border: 1px solid rgba(255,255,255,0.2);
}
.prev-gantt-ubar-today {
    background: var(--amber-500) !important;
}
.prev-gantt-ubar-overdue {
    background: var(--rose-500) !important;
}
.prev-gantt-ubar-pending {
    opacity: .9;
}

/* Responsive */
@media (max-width: 767.98px) {
    .prev-contact-name { font-size: .85rem; }
    .prev-contact-title { font-size: .65rem; }
    .prev-bar-title { font-size: .8rem; }
    .prev-bar { padding: .5rem .65rem; }
    .prev-avatar { width: 32px; height: 32px; font-size: .75rem; }
    .prev-timeline { padding-left: 1.8rem; }
    .prev-dot-col { width: 1.8rem; margin-left: -1.8rem; }
    .prev-dot { width: 12px; height: 12px; }
    .prev-level-summary { font-size: .65rem; padding: .35rem .55rem; }
}

/* ===== SEQUENCE NOTE ===== */
.sequence-note-text {
    font-size: .78rem;
    color: var(--text-muted);
    font-style: italic;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== NEW SEQUENCE CARD ===== */
.new-sequence-card {
    background: rgba(10, 37, 64, 0.02);
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all .2s;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: var(--text-muted);
}
.new-sequence-card:hover {
    border-color: var(--navy-500);
    color: var(--navy-500);
    background: rgba(10, 37, 64, 0.04);
}

/* ===== INDUSTRY TAG ===== */
.industry-tag {
    font-size: .68rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.04);
    padding: .15rem .5rem;
    border-radius: 6px;
}

/* ===== RESULT COUNT ===== */
.result-count {
    font-size: .82rem;
    color: var(--text-muted);
}

/* ============================================================
   SCHEDULE GANTT — Per-Contact Outreach Schedule Table
   ============================================================ */
.schedule-gantt {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.schedule-gantt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem .85rem;
    background: var(--bg-table-header);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: .25rem;
}

.sch-gantt-title {
    font-weight: 700;
    font-size: .82rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: .25rem;
}

.sch-gantt-summary {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .68rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sch-summary-item { display: inline-flex; align-items: center; }
.sch-summary-divider { color: var(--border); font-weight: 300; }

.schedule-table-wrap {
    overflow-x: auto;
    padding: 0;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .78rem;
    min-width: 800px;
}

.schedule-table thead th {
    background: var(--bg-table-header);
    color: var(--text-muted);
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .5rem .6rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    text-align: left;
}

.schedule-table tbody td {
    padding: .55rem .6rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
}

.schedule-table tbody tr:hover {
    background: rgba(0,0,0,0.015);
}

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

/* Contact column */
.sch-col-contact { min-width: 200px; }
.sch-col-level { min-width: 100px; }
.sch-col-status { min-width: 80px; }
.sch-col-step { min-width: 130px; }

.sch-contact-info {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.sch-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-table-header);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

.sch-contact-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: .82rem;
    line-height: 1.2;
}

.sch-contact-title {
    display: block;
    font-size: .68rem;
    color: var(--text-muted);
    line-height: 1.2;
}

/* Preview button in Gantt table */
.sch-preview-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    padding: .2rem .35rem;
    font-size: .7rem;
    line-height: 1;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
    margin-left: auto;
    align-self: flex-start;
    margin-top: .1rem;
}
.sch-preview-btn:hover {
    background: var(--navy-500);
    border-color: var(--navy-500);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(10,37,64,0.15);
}

@media (max-width: 767.98px) {
    .sch-preview-btn {
        font-size: .62rem;
        padding: .15rem .3rem;
    }
}

/* Sequence-wide Gantt Preview buttons */
.sch-gantt-preview-btn,
.sch-guide-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: var(--navy-500);
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: .3rem .6rem;
    font-size: .68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    line-height: 1.3;
    box-shadow: 0 1px 3px rgba(10,37,64,0.15);
}
.sch-gantt-preview-btn:hover,
.sch-guide-btn:hover {
    background: var(--navy-400);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(10,37,64,0.2);
    color: #fff;
}
.sch-gantt-preview-btn i,
.sch-guide-btn i {
    font-size: .75rem;
}

.sch-guide-btn {
    background: var(--gold-accent);
    color: var(--navy-700);
    box-shadow: 0 1px 3px rgba(196,169,98,0.2);
}
.sch-guide-btn:hover {
    background: var(--gold-light);
    box-shadow: 0 2px 8px rgba(196,169,98,0.3);
    color: var(--navy-700);
}

.sch-gantt-preview-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: .2rem .45rem;
    font-size: .6rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    line-height: 1.2;
}
.sch-gantt-preview-btn-sm:hover {
    background: var(--navy-500);
    border-color: var(--navy-500);
    color: #fff;
    transform: translateY(-1px);
}
.sch-gantt-preview-btn-sm i {
    font-size: .65rem;
}

/* Level badge */
.sch-level-badge {
    display: inline-flex;
    align-items: center;
    font-size: .68rem;
    font-weight: 600;
    padding: .2rem .5rem;
    border-radius: 6px;
    border: 1px solid;
    white-space: nowrap;
}

.sch-level-badge-sm,
.sch-level-badge-xs {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid;
    white-space: nowrap;
}
.sch-level-badge-sm {
    font-size: .68rem;
    padding: .18rem .4rem;
    vertical-align: middle;
}
.sch-level-badge-xs {
    font-size: .6rem;
    padding: .1rem .3rem;
    vertical-align: middle;
    margin-right: .25rem;
}
.sch-level-badge-sm i, .sch-level-badge-xs i { font-size: .75em; }

/* Step cells */
.sch-step-cell {
    position: relative;
    vertical-align: top;
}

.sch-step-content {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.sch-step-bar {
    background: var(--bar-color, #0284c7);
    color: #fff;
    border-radius: 6px;
    padding: .28rem .45rem;
    font-size: .7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
    min-height: 26px;
    width: 100%;
    max-width: 185px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transition: transform .15s, box-shadow .15s;
    box-sizing: border-box;
}
.sch-step-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.sch-step-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* Date + Time labels in step bar */
.sch-step-date-label {
    font-size: .55rem;
    font-weight: 500;
    opacity: .85;
    padding: 0 .15rem;
    white-space: nowrap;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    line-height: 1.3;
    flex-shrink: 0;
}

.sch-step-time-label {
    font-size: .6rem;
    font-weight: 500;
    opacity: .9;
    padding: 0 .2rem;
    white-space: nowrap;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    line-height: 1.3;
    flex-shrink: 0;
}

/* Status icons inside step bar */
.sch-step-completed-icon,
.sch-step-overdue-icon,
.sch-step-today-icon,
.sch-step-check-icon,
.sch-step-check-icon-fill {
    font-size: .7rem;
    flex-shrink: 0;
    line-height: 1;
}
.sch-step-completed-icon { color: rgba(255,255,255,0.9); }
.sch-step-overdue-icon { color: #fff; }
.sch-step-today-icon { color: #fff; }
.sch-step-check-icon {
    opacity: .55;
    transform: scale(0.85);
    transition: opacity .2s, transform .2s;
    color: rgba(255,255,255,0.85);
}
.sch-step-check-icon-fill {
    opacity: 0;
    color: #fff;
    transform: scale(0.6);
    transition: opacity .2s, transform .2s;
}
.sch-step-bar-clickable:hover .sch-step-check-icon {
    opacity: 0;
    transform: scale(0.6);
}
.sch-step-bar-clickable:hover .sch-step-check-icon-fill {
    opacity: 1;
    transform: scale(1.15);
}

/* ---- Compact input row: date + time + day badge ---- */
.sch-step-inputs {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex-wrap: nowrap;
    min-height: 22px;
}

.sch-input-date-wrap,
.sch-input-time-wrap {
    display: inline-flex;
    line-height: 1;
}

.sch-date-input,
.sch-time-input {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: .1rem .2rem;
    font-size: .6rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color .2s, background .2s;
    font-family: inherit;
    line-height: 1.3;
    box-sizing: border-box;
}
.sch-date-input {
    width: 82px;
}
.sch-time-input {
    width: 64px;
}
.sch-date-input:hover,
.sch-time-input:hover {
    border-color: var(--navy-500);
}
.sch-date-input:focus,
.sch-time-input:focus {
    border-color: var(--navy-500);
    box-shadow: 0 0 0 2px rgba(10,37,64,0.08);
    outline: none;
    background: var(--bg-input);
}

/* Day badge (Min/Sen/Sel/dll) */
.sch-step-day {
    font-size: .55rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .02em;
    padding: 0 .12rem;
    line-height: 1;
}

/* Date/time sebagai text (untuk active/closed/completed steps di Gantt) */
.sch-date-text {
    font-size: .64rem;
    font-weight: 500;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    line-height: 1.4;
    white-space: nowrap;
    background: rgba(0,0,0,0.035);
    padding: .06rem .35rem;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}
.sch-date-text i {
    font-size: .6rem;
    color: var(--text-muted);
}
.sch-date-text.sch-date-exec {
    font-size: .6rem;
    font-weight: 600;
    color: var(--emerald-600);
    background: rgba(5,150,105,0.07);
    border-color: rgba(5,150,105,0.15);
    display: inline-flex;
    margin-top: .1rem;
    gap: .25rem;
}
.sch-date-text.sch-date-exec i {
    color: var(--emerald-500);
}

/* Disabled date input (step completed / member closed) */
.sch-date-input-disabled {
    opacity: .4;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Clickable step bar */
.sch-step-bar-clickable {
    cursor: pointer !important;
}
.sch-step-bar-clickable:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 3px 12px rgba(0,0,0,0.22) !important;
}

/* Step status indicators */
.sch-step-done .sch-step-content { opacity: .7; }
.sch-step-done .sch-step-bar {
    background: var(--emerald-500) !important;
    opacity: .75;
}
.sch-step-overdue .sch-date-input {
    border-color: rgba(225,29,72,0.35);
    color: var(--rose-500);
}
.sch-step-today .sch-date-input {
    border-color: var(--amber-400);
}
.sch-step-overdue-badge {
    display: inline-block;
    font-size: .5rem;
    font-weight: 700;
    padding: .06rem .25rem;
    border-radius: 3px;
    background: rgba(225,29,72,0.12);
    color: var(--rose-500);
    white-space: nowrap;
    line-height: 1.2;
}
.sch-step-log-status {
    font-size: .55rem;
    color: var(--text-muted);
    line-height: 1.1;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 .1rem;
}
.sch-step-empty { text-align: center; }
.sch-step-dash { color: var(--text-very-muted); font-size: .7rem; }

/* Footer */
.schedule-footer {
    padding: .4rem .75rem;
    border-top: 1px solid var(--border);
    background: var(--bg-table-header);
}

.schedule-legend {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    font-size: .62rem;
    color: var(--text-muted);
}

.sch-legend-item {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}

.sch-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}
.sch-legend-swatch.sch-legend-overdue {
    background: var(--rose-400);
}
.sch-legend-divider {
    color: var(--border);
    font-weight: 300;
}

/* ===== LEVEL SELECTOR (Add Member Modal) ===== */
.level-selector {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: .5rem;
}

.level-option {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .75rem .85rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    background: var(--bg-card);
}
.level-option:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}
.level-option.level-selected {
    border-color: var(--navy-500);
    background: rgba(10,37,64,0.03);
    box-shadow: 0 0 0 2px rgba(10,37,64,0.08);
}

.level-radio-icon {
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(0,0,0,0.03);
    margin-top: .1rem;
}
.level-option.level-selected .level-radio-icon {
    background: transparent;
}

.level-option-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    line-height: 1.3;
}

.level-option-desc {
    font-size: .68rem;
    color: var(--text-muted);
    display: block;
    line-height: 1.3;
    margin-top: .1rem;
}

@media (max-width: 767.98px) {
    .schedule-table { min-width: 500px; font-size: .68rem; }
    .sch-col-contact { min-width: 130px; }
    .sch-col-step { min-width: 100px; }
    .sch-avatar { width: 24px; height: 24px; font-size: .6rem; }
    .sch-contact-name { font-size: .72rem; }
    .sch-contact-title { font-size: .6rem; }
    .sch-step-bar { font-size: .6rem; min-height: 22px; padding: .2rem .3rem; max-width: 160px; }
    .sch-step-date-label { display: none; }
    .sch-step-time-label { font-size: .52rem; }
    .sch-date-input { font-size: .54rem; width: 68px; }
    .sch-time-input { font-size: .54rem; width: 48px; }
    .sch-step-day { font-size: .48rem; }
    .sch-step-overdue-badge { font-size: .45rem; }
    .sch-step-log-status { font-size: .5rem; }
    .sch-gantt-title { font-size: .72rem; }
    .sch-gantt-summary { font-size: .6rem; }
    .level-option { padding: .55rem .65rem; }
    .level-option-label { font-size: .75rem; }
    .level-option-desc { font-size: .62rem; }
    .level-radio-icon { width: 28px; height: 28px; font-size: .95rem; }
}

/* ============================================================
   SEQUENCE GANTT PREVIEW — Unified all-contacts Gantt Modal
   ============================================================ */

/* Stats bar at top of preview */
.sg-preview-stats {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: .45rem .7rem;
    background: var(--bg-table-header);
    border-radius: 8px;
    margin-bottom: .5rem;
}

.sg-preview-range {
    display: flex;
    align-items: center;
    font-size: .72rem;
    color: var(--text-muted);
    margin-bottom: .65rem;
    padding: 0 .1rem;
}

.sg-divider {
    color: var(--border);
    font-weight: 300;
    margin: 0 .25rem;
}

.sg-range-days {
    font-weight: 600;
    color: var(--text-secondary);
}

/* Grid container — horizontal scroll */
.sg-grid-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: .65rem;
}

.sg-grid {
    display: grid;
    min-width: 600px;
    font-size: .7rem;
}

/* ---- HEADER CELLS ---- */
.sg-hdr {
    padding: .4rem .35rem;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 2;
    gap: .05rem;
}

.sg-hdr-left {
    background: var(--bg-table-header);
    font-size: .58rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 3;
    border-right: 1px solid var(--border);
    justify-content: center;
    align-items: flex-start;
    padding-left: .6rem;
}

.sg-hdr-day {
    background: var(--bg-table-header);
    gap: .05rem;
}

.sg-hdr-weekend {
    background: rgba(148, 163, 184, 0.05);
}

.sg-hdr-weekend .sg-hdr-date {
    color: var(--rose-400);
}

.sg-hdr-today {
    background: rgba(5, 150, 105, 0.06);
}

.sg-hdr-today .sg-hdr-date {
    color: var(--emerald-500);
    font-size: .8rem;
}

.sg-hdr-badge {
    display: inline-block;
    font-size: .42rem;
    font-weight: 700;
    padding: .04rem .18rem;
    border-radius: 3px;
    background: var(--emerald-500);
    color: #fff;
    letter-spacing: .03em;
    text-transform: uppercase;
    line-height: 1.2;
    margin-top: .02rem;
}

.sg-hdr-dayname {
    font-size: .55rem;
    color: var(--text-very-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.sg-hdr-date {
    font-size: .78rem;
    font-weight: 700;
    color: var(--navy-500);
    line-height: 1.1;
}

.sg-hdr-month {
    font-size: .52rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ---- DATA CELLS ---- */
.sg-cell {
    padding: .3rem;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    min-height: 54px;
    display: flex;
    align-items: flex-start;
}

.sg-cell-label {
    background: var(--bg-card);
    padding: .35rem .45rem;
    gap: .45rem;
    align-items: center;
    position: sticky;
    left: 0;
    z-index: 2;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    min-height: 54px;
}

.sg-label-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .6rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sg-label-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .05rem;
}

.sg-label-name {
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sg-label-level {
    font-size: .58rem;
    color: var(--text-muted);
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
}

.sg-label-level i {
    font-size: .6rem;
}

.sg-label-status {
    font-size: .5rem;
    font-weight: 600;
    padding: .1rem .3rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.sg-label-status.status-active {
    background: rgba(2, 132, 199, 0.1);
    color: var(--sky-500);
}
.sg-label-status.status-completed {
    background: rgba(5, 150, 105, 0.1);
    color: var(--emerald-500);
}
.sg-label-status.status-failed {
    background: rgba(225, 29, 72, 0.08);
    color: var(--rose-500);
}

.sg-cell-day {
    justify-content: flex-start;
    align-items: flex-start;
    transition: background .15s;
}

.sg-cell-today {
    background: rgba(5, 150, 105, 0.02);
}

.sg-cell-has-steps {
    background: transparent;
}

/* Droppable cell highlight */
.sg-cell-droppable {
    background: rgba(196, 169, 98, 0.08) !important;
    box-shadow: inset 0 0 0 1.5px var(--gold-accent);
    border-radius: 3px;
}

/* Drag ghost styling */
.sg-draggable {
    cursor: grab !important;
}
.sg-draggable:active {
    cursor: grabbing !important;
}
.sg-draggable.sg-step-done {
    cursor: default !important;
    pointer-events: none;
    opacity: .5;
}

/* Dragging state — dim the original badge */
.sg-step-badge.sg-dragging {
    opacity: 0.35;
    transform: scale(0.95);
    filter: grayscale(0.8);
}

/* Toast notification for drag success/error */
.sg-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy-600);
    color: #fff;
    padding: .6rem 1.2rem;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 99999;
    animation: sgToastIn .3s ease-out;
    pointer-events: none;
}
.sg-toast.sg-toast-error {
    background: var(--rose-500);
    animation-duration: .3s, .25s;
}
@keyframes sgToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Step badges stack */
.sg-steps-stack {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    width: 100%;
}

.sg-step-badge {
    display: flex;
    flex-direction: column;
    gap: .02rem;
    background: var(--sg-level-color, #0284c7);
    color: #fff;
    border-radius: 5px;
    padding: .2rem .3rem;
    font-size: .58rem;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, z-index 0s;
    cursor: default;
    position: relative;
    z-index: 1;
}

/* Click-to-zoom: no hover effects, only click toggles zoom */
.sg-step-badge:not(.sg-step-badge-expanded):hover {
    /* subtle brightness only, no transform */
    filter: brightness(1.08);
}

/* Expanded (clicked) state — big zoom popover.
   Uses size increase instead of transform:scale() to avoid
   overflow clipping by the scrollable grid-wrap parent. */
.sg-step-badge-expanded {
    padding: .35rem .5rem;
    font-size: .72rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 100 !important;
    cursor: default;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    min-width: 100px;
    transform: none;
}
.sg-step-badge-expanded .sg-badge-label {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
    font-size: .72rem;
}
.sg-step-badge-expanded .sg-badge-status {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
    font-size: .58rem;
}
.sg-step-badge-expanded .sg-badge-icon {
    font-size: .62rem;
}

.sg-badge-icon {
    font-size: .5rem;
    line-height: 1;
    margin-bottom: .05rem;
    display: flex;
    align-items: center;
    gap: .15rem;
}

.sg-badge-label {
    font-size: .6rem;
    font-weight: 700;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sg-badge-status {
    font-size: .48rem;
    font-weight: 500;
    line-height: 1.1;
    opacity: .85;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: .02rem;
}

.sg-badge-time {
    font-size: .5rem;
    font-weight: 600;
    opacity: .9;
    line-height: 1.1;
    margin-top: .02rem;
}

/* Execution time di modal Gantt preview */
.sg-badge-exec-time {
    font-size: .48rem;
    font-weight: 500;
    line-height: 1.1;
    opacity: .85;
    margin-top: .02rem;
    display: flex;
    align-items: center;
    gap: .15rem;
    color: rgba(255,255,255,0.9);
}
.sg-badge-exec-time i {
    font-size: .45rem;
}

.sg-step-badge-expanded .sg-badge-time {
    font-size: .6rem;
}

/* Badge state overrides — we keep the level color as background but add subtle indicators */
.sg-step-done {
    opacity: .85;
    border: 1px solid rgba(255,255,255,0.15);
}
.sg-step-done .sg-badge-icon {
    color: rgba(255,255,255,0.9);
}

.sg-step-today-badge .sg-badge-icon {
    color: #fff;
}

.sg-step-overdue-badge .sg-badge-icon {
    color: #fff;
}

.sg-step-pending {
    opacity: .9;
}

/* When multiple badges on same date, stack them */
.sg-steps-stack .sg-step-badge + .sg-step-badge {
    margin-top: .05rem;
}

/* Legend */
.sg-legend {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    font-size: .6rem;
    color: var(--text-muted);
    padding: .35rem .1rem;
}

.sg-legend-item {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}

.sg-legend-swatch {
    width: 8px;
    height: 8px;
    border-radius: 3px;
    flex-shrink: 0;
}

.sg-legend-done i { color: var(--emerald-500); }
.sg-legend-today i { color: var(--amber-500); }
.sg-legend-overdue i { color: var(--rose-500); }
.sg-legend-pending i { color: var(--text-muted); }

/* ============================================================
   STRATEGY GUIDE & RECOMMENDATION MODALS
   ============================================================ */

/* Strategy Recommendation Card */
.strategy-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.strategy-header {
    background: var(--bg-table-header);
    padding: .65rem .85rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.strategy-title {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: .35rem;
}

.strategy-rule-badge {
    font-size: .58rem;
    font-weight: 700;
    padding: .15rem .45rem;
    border-radius: 6px;
    background: var(--gold-accent);
    color: var(--navy-700);
    white-space: nowrap;
    flex-shrink: 0;
}

.strategy-body {
    padding: .85rem;
}

.strategy-rec-title {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: .3rem;
    line-height: 1.3;
}

.strategy-rec-desc {
    font-size: .75rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: .75rem;
}

/* Strategy section cards (strategi + tema email) */
.strategy-rec-section {
    display: flex;
    gap: .6rem;
    padding: .55rem .65rem;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    margin-bottom: .5rem;
    align-items: flex-start;
}

.strategy-rec-section-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(2,132,199,0.1);
    color: var(--sky-500);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .8rem;
    margin-top: .05rem;
}

.strategy-rec-section-label {
    font-size: .6rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .15rem;
}

.strategy-rec-section-text {
    font-size: .72rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.strategy-empty {
    text-align: center;
    padding: 1.5rem .5rem;
    color: var(--text-muted);
    font-size: .75rem;
}
.strategy-empty i {
    font-size: 1.8rem;
    display: block;
    margin-bottom: .5rem;
    opacity: .5;
}

/* Waktu Kirim Recommendation */
.strat-timing-section {
    margin-top: .65rem;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: .6rem .65rem;
}

.strat-timing-header {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .62rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .5rem;
    padding-bottom: .35rem;
    border-bottom: 1px solid var(--border);
}
.strat-timing-header i {
    font-size: .7rem;
    color: var(--gold-accent);
}

.strat-timing-group {
    margin-bottom: .5rem;
}
.strat-timing-group:last-child {
    margin-bottom: 0;
}

.strat-timing-label {
    font-size: .7rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: .25rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}
.strat-timing-label i {
    font-size: .75rem;
    color: var(--text-muted);
}

.strat-timing-row {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .12rem .35rem;
    font-size: .68rem;
    line-height: 1.4;
}

.strat-timing-day {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 100px;
    flex-shrink: 0;
    font-size: .65rem;
}

.strat-timing-val {
    color: var(--text-secondary);
    font-size: .65rem;
}

@media (max-width: 767.98px) {
    .strat-timing-day {
        min-width: 72px;
        font-size: .6rem;
    }
    .strat-timing-val {
        font-size: .6rem;
    }
    .strat-timing-row {
        padding: .1rem .2rem;
        gap: .25rem;
    }
}

/* Strategy Guide Modal Content */
.strategy-guide {
    font-size: .82rem;
    color: var(--text-secondary);
    line-height: 1.7;
    padding: .25rem 0;
}

.strategy-guide .sg-h1 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy-500);
    margin: 1.25rem 0 .5rem;
    padding-bottom: .35rem;
    border-bottom: 1px solid var(--border);
}

.strategy-guide .sg-h2 {
    font-size: .92rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1rem 0 .35rem;
}

.strategy-guide .sg-h3 {
    font-size: .82rem;
    font-weight: 700;
    color: var(--gold-accent);
    margin: .75rem 0 .25rem;
}

.strategy-guide .sg-p {
    margin: 0 0 .35rem;
    color: var(--text-secondary);
}

.strategy-guide .sg-list {
    margin: .15rem 0 .5rem;
    padding-left: 1.25rem;
}
.strategy-guide .sg-list li {
    margin-bottom: .15rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.strategy-guide .sg-hr {
    margin: .75rem 0;
    border: none;
    border-top: 1px solid var(--border);
    opacity: .5;
}

@media (max-width: 767.98px) {
    .sg-grid { min-width: 480px; font-size: .62rem; }
    .sg-grid-wrap { margin: 0 -.5rem; border-radius: 0; border-left: none; border-right: none; }
    .sg-hdr { padding: .3rem .2rem; min-height: 34px; }
    .sg-hdr-date { font-size: .68rem; }
    .sg-hdr-dayname { font-size: .48rem; }
    .sg-hdr-month { font-size: .45rem; }
    .sg-cell { padding: .2rem; min-height: 44px; }
    .sg-cell-label { padding: .25rem .35rem; min-height: 44px; }
    .sg-label-name { font-size: .65rem; }
    .sg-label-level { font-size: .5rem; }
    .sg-label-avatar { width: 22px; height: 22px; font-size: .5rem; }
    .sg-step-badge { padding: .15rem .2rem; font-size: .5rem; }
    .sg-badge-label { font-size: .52rem; }
    .sg-badge-status { font-size: .42rem; }
    .sg-preview-stats { font-size: .65rem; padding: .35rem .5rem; }
    .sg-legend { font-size: .52rem; gap: .3rem; }
}

/* ===== CONDITION CARDS (log_action) ===== */
.condition-card {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}
.condition-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}
.condition-card.selected {
    border-color: var(--teal-500);
    background: rgba(14, 200, 174, 0.06);
    box-shadow: 0 0 0 2px rgba(14, 200, 174, 0.15);
}
.condition-card .cond-icon {
    font-size: 1.5rem;
    margin-bottom: .5rem;
}
.condition-card .cond-type {
    font-size: 1.1rem;
    font-weight: 700;
}
.condition-card .cond-desc {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: .25rem;
}

/* ===== INFO BOX ===== */
.info-box {
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 10px;
    padding: .7rem 1rem;
    font-size: .78rem;
    color: var(--text-secondary);
}
.info-box i { color: var(--sky-400); }

/* ===== SEARCHABLE DROPDOWN (log_action) ===== */
.searchable-dropdown {
    position: relative;
}
.searchable-dropdown .dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 260px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 0 10px 10px;
    display: none;
    padding: 0;
    margin: 0;
    list-style: none;
}
.searchable-dropdown .dropdown-list.show { display: block; }
.searchable-dropdown .dropdown-list li {
    padding: .55rem 1rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: .88rem;
    border-bottom: 1px solid var(--border);
    transition: background .1s;
}
.searchable-dropdown .dropdown-list li:last-child { border-bottom: none; }
.searchable-dropdown .dropdown-list li:hover,
.searchable-dropdown .dropdown-list li.highlighted {
    background: var(--navy-600);
    color: #fff;
}
.searchable-dropdown .dropdown-list li .text-muted {
    color: var(--text-muted);
    font-size: .72rem;
}
.searchable-dropdown .no-results {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: .82rem;
}

/* ===== LOGIN PAGE ===== */
.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.4s ease-out;
}
.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}
.login-logo .logo-icon {
    width: 56px;
    height: 56px;
    background: var(--navy-600);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-accent);
    font-size: 1.6rem;
    margin-bottom: .75rem;
}
.login-logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy-500);
    letter-spacing: -0.02em;
    margin-bottom: .25rem;
}
.login-logo p {
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: 0;
}
.input-group-text {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: var(--text-muted);
    padding: .65rem .8rem .65rem 1rem;
}
.input-group .form-control {
    border-left: none !important;
    border-radius: 0 10px 10px 0 !important;
}
.input-group:focus-within .input-group-text {
    border-color: var(--navy-500);
}
.btn-login {
    background: var(--navy-600);
    border: none;
    border-radius: 10px;
    padding: .7rem 1.5rem;
    font-weight: 600;
    font-size: .95rem;
    color: #fff;
    width: 100%;
    transition: all .25s;
    cursor: pointer;
}
.btn-login:hover {
    background: var(--navy-400);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-login:active { transform: translateY(0); }
.btn-login i { margin-right: .5rem; }
.alert-custom {
    background: rgba(251, 113, 133, 0.08);
    border: 1px solid rgba(251, 113, 133, 0.15);
    color: var(--rose-400);
    border-radius: 10px;
    padding: .7rem 1rem;
    font-size: .82rem;
}
.alert-custom i { margin-right: .5rem; }
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: .75rem;
    color: var(--text-muted);
}
.login-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.25rem 0;
    color: var(--text-muted);
    font-size: .72rem;
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.password-toggle {
    cursor: pointer;
    padding: .65rem 1rem .65rem .8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 10px 10px 0;
    color: var(--text-muted);
    transition: color .2s;
}
.password-toggle:hover { color: var(--navy-500); }
.input-group:focus-within .password-toggle {
    border-color: var(--navy-500);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== ALERTS ===== */
.alert {
    border-radius: 10px;
    border: none;
}
.alert-success {
    background: rgba(52, 211, 153, 0.1);
    color: var(--emerald-400);
}
.alert-danger {
    background: rgba(251, 113, 133, 0.1);
    color: var(--rose-400);
}

/* ===== LOG ROW INDEX ===== */
.log-row-index {
    font-weight: 600;
    font-size: .8rem;
    color: var(--text-muted);
    text-align: center;
    display: block;
    padding-top: .3rem;
    min-width: 28px;
}

/* ============================================================
   SETTINGS PAGE — Nylas Email Configuration
   ============================================================ */

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
}
.settings-card:hover {
    box-shadow: var(--shadow-md);
}

.settings-card-header {
    background: var(--bg-card-header);
    padding: 1.05rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: .9rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: .35rem;
}

.settings-card-body {
    padding: 1.5rem 1.25rem;
}

.settings-form-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: .4rem;
    display: flex;
    align-items: center;
    gap: .25rem;
}

.settings-form-control {
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: 10px;
    padding: .6rem 1rem;
    font-size: .9rem;
    font-family: 'Inter', monospace;
    transition: border-color .2s, box-shadow .2s;
}
.settings-form-control:focus {
    border-color: var(--navy-500) !important;
    box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.1) !important;
}
.settings-form-control::placeholder {
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
}

.settings-form-text {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: .35rem;
    line-height: 1.4;
}

/* Password toggle */
.settings-password-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 10px 10px 0;
    color: var(--text-muted);
    padding: .6rem .9rem;
    font-size: .9rem;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    line-height: 1;
}
.settings-password-toggle:hover {
    color: var(--navy-500);
    background: var(--bg-card-hover);
}
.input-group:focus-within .settings-password-toggle {
    border-color: var(--navy-500);
}

/* Buttons */
.settings-btn-primary {
    background: var(--navy-600);
    border: none;
    border-radius: 10px;
    padding: .6rem 1.4rem;
    font-weight: 600;
    font-size: .88rem;
    color: #fff;
    transition: all .25s;
    box-shadow: var(--shadow-sm);
}
.settings-btn-primary:hover {
    background: var(--navy-400);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: #fff;
}

/* Guide Steps */
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guide-step {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
}

.guide-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--navy-600);
    color: var(--gold-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: .1rem;
}

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

.guide-step-content strong {
    font-size: .85rem;
    color: var(--text-primary);
    display: block;
    margin-bottom: .1rem;
}

.guide-step-desc {
    font-size: .78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 767.98px) {
    .settings-card-body {
        padding: 1.1rem .9rem;
    }
    .settings-card-header {
        padding: .85rem .9rem;
        font-size: .82rem;
    }
    .settings-form-label {
        font-size: .78rem;
    }
    .settings-form-control {
        font-size: .82rem;
        padding: .5rem .75rem;
    }
    .settings-btn-primary {
        font-size: .8rem;
        padding: .5rem 1.1rem;
    }
    .guide-step-num {
        width: 28px;
        height: 28px;
        font-size: .75rem;
    }
}

/* ============================================================
/* ============================================================
   WYSIWYG EDITOR — Custom Email Body Editor
   ============================================================ */

.wysiwyg-toolbar {
    display: flex;
    align-items: center;
    gap: .2rem;
    padding: .4rem .5rem;
    background: var(--bg-table-header);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    flex-wrap: wrap;
}

.wysiwyg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: .85rem;
    cursor: pointer;
    transition: all .15s;
    line-height: 1;
}
.wysiwyg-btn:hover {
    background: rgba(0,0,0,0.05);
    border-color: var(--border);
    color: var(--text-primary);
}
.wysiwyg-btn:active,
.wysiwyg-btn-active {
    background: var(--navy-500) !important;
    border-color: var(--navy-500) !important;
    color: #fff !important;
}

.wysiwyg-btn-highlight {
    color: #b8860b;
}
.wysiwyg-btn-highlight:hover {
    background: rgba(184,134,11,0.1);
    border-color: rgba(184,134,11,0.25);
    color: #8b6914;
}
.wysiwyg-btn-highlight.wysiwyg-btn-active {
    background: #b8860b !important;
    border-color: #b8860b !important;
    color: #fff !important;
}

.wysiwyg-sep {
    width: 1px;
    height: 22px;
    background: var(--border);
    margin: 0 .25rem;
    flex-shrink: 0;
}

.wysiwyg-editor {
    border: 1px solid var(--border);
    border-radius: 0 0 10px 10px;
    padding: .7rem .85rem;
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: 'Inter', monospace;
    font-size: .85rem;
    line-height: 1.7;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    overflow-y: auto;
    word-wrap: break-word;
    max-height: 400px;
}
.wysiwyg-editor:focus {
    border-color: var(--navy-500);
    box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.1);
}
.wysiwyg-source-editor {
    border: 1px solid var(--border);
    border-radius: 0 0 10px 10px;
    padding: .7rem .85rem;
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: 'Courier New', Consolas, 'Liberation Mono', monospace;
    font-size: .82rem;
    line-height: 1.6;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    overflow-y: auto;
    word-wrap: break-word;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
    tab-size: 2;
    -moz-tab-size: 2;
}
.wysiwyg-source-editor:focus {
    border-color: var(--navy-500);
    box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.1);
}
.wysiwyg-source-editor::placeholder {
    color: var(--text-muted);
    font-family: 'Courier New', Consolas, 'Liberation Mono', monospace;
    opacity: 0.6;
}

/* Source button active state */
.wysiwyg-btn-source.wysiwyg-btn-active {
    background: var(--navy-500) !important;
    border-color: var(--navy-500) !important;
    color: #fff !important;
}


.wysiwyg-editor:empty:before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    pointer-events: none;
}
.wysiwyg-editor:empty:focus:before {
    content: attr(data-placeholder);
    color: var(--text-very-muted);
    font-family: 'Inter', sans-serif;
    pointer-events: none;
}

/* Content inside the editor */
.wysiwyg-editor b, .wysiwyg-editor strong {
    font-weight: 700;
}
.wysiwyg-editor i, .wysiwyg-editor em {
    font-style: italic;
}
.wysiwyg-editor u {
    text-decoration: underline;
}

@media (max-width: 767.98px) {
    .wysiwyg-toolbar {
        padding: .3rem .4rem;
        gap: .15rem;
    }
    .wysiwyg-btn {
        width: 28px;
        height: 26px;
        font-size: .75rem;
    }
    .wysiwyg-editor {
        font-size: .78rem;
        padding: .55rem .65rem;
        min-height: 140px;
    }
}
/*
   EMAIL LOGS — Riwayat Email Card Styles (eml-* classes)
   ============================================================ */

.eml-history-wrap {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.eml-card {
    display: flex;
    gap: .65rem;
    padding: .65rem .75rem;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: 10px;
    transition: all .2s;
    position: relative;
}
.eml-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

/* Status border variants */
.eml-status-sent { border-left-color: var(--emerald-500); }
.eml-status-scheduled { border-left-color: var(--sky-500); }
.eml-status-failed { border-left-color: var(--rose-500); }
.eml-status-cancelled { border-left-color: var(--text-muted); opacity: .6; }
.eml-status-pending { border-left-color: var(--amber-500); }

.eml-card-left {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: .1rem;
}

.eml-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky-400), var(--sky-600));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 700;
    flex-shrink: 0;
}
.eml-status-failed .eml-avatar {
    background: linear-gradient(135deg, var(--rose-400), var(--rose-600));
}
.eml-status-cancelled .eml-avatar {
    background: var(--bg-table-header);
    color: var(--text-muted);
}
.eml-status-sent .eml-avatar {
    background: linear-gradient(135deg, var(--emerald-400), var(--emerald-600));
}

.eml-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.eml-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.eml-name {
    font-weight: 600;
    font-size: .85rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.eml-status-badge {
    font-size: .6rem;
    font-weight: 600;
    padding: .15rem .4rem;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}
.eml-status-badge.eml-status-sent {
    background: rgba(5,150,105,0.1);
    color: var(--emerald-600);
    border: 1px solid rgba(5,150,105,0.2);
}
.eml-status-badge.eml-status-scheduled {
    background: rgba(2,132,199,0.1);
    color: var(--sky-600);
    border: 1px solid rgba(2,132,199,0.2);
}
.eml-status-badge.eml-status-failed {
    background: rgba(225,29,72,0.08);
    color: var(--rose-500);
    border: 1px solid rgba(225,29,72,0.18);
}
.eml-status-badge.eml-status-cancelled {
    background: rgba(107,114,128,0.1);
    color: var(--text-muted);
    border: 1px solid rgba(107,114,128,0.2);
}
.eml-status-badge.eml-status-pending {
    background: rgba(217,119,6,0.1);
    color: var(--amber-500);
    border: 1px solid rgba(217,119,6,0.2);
}

.eml-meta {
    font-size: .72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .3rem;
    line-height: 1.2;
}
.eml-meta i {
    font-size: .65rem;
    color: var(--text-very-muted);
    width: 14px;
}

.eml-subject {
    font-size: .78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: .3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
    margin-top: .05rem;
}
.eml-subject i {
    font-size: .62rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: .15rem;
    width: 14px;
}

.eml-preview {
    font-size: .68rem;
    color: var(--text-very-muted);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
    padding-left: 1.1rem;
}

.eml-step {
    font-size: .65rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .3rem;
    line-height: 1.2;
}
.eml-step i {
    font-size: .62rem;
    color: var(--gold-accent);
    width: 14px;
}

.eml-date {
    font-size: .68rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .25rem;
    line-height: 1.2;
    margin-top: .05rem;
}
.eml-date i {
    font-size: .65rem;
    color: var(--text-very-muted);
}

.eml-error {
    font-size: .68rem;
    color: var(--rose-400);
    background: rgba(225,29,72,0.05);
    padding: .35rem .55rem;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: .3rem;
    margin-top: .15rem;
    line-height: 1.3;
}
.eml-error i {
    font-size: .65rem;
    flex-shrink: 0;
    margin-top: .1rem;
}

/* Sub-tabs within scheduled email section */
.sch-sub-tabs {
    display: flex;
    gap: .25rem;
    margin-bottom: .5rem;
    background: var(--bg-table-header);
    border-radius: 8px;
    padding: .2rem;
    border: 1px solid var(--border);
}

.sch-sub-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: .35rem .5rem;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    white-space: nowrap;
}
.sch-sub-tab:hover {
    color: var(--text-secondary);
    background: rgba(0,0,0,0.02);
}
.sch-sub-tab.sch-sub-tab-active {
    background: var(--bg-card);
    color: var(--navy-500);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.sch-sub-tab i {
    font-size: .75rem;
}

.sch-sub-tab-count {
    font-size: .6rem;
    font-weight: 600;
    padding: .05rem .35rem;
    border-radius: 8px;
    background: rgba(0,0,0,0.04);
    color: var(--text-muted);
}
.sch-sub-tab-active .sch-sub-tab-count {
    background: rgba(10,37,64,0.06);
    color: var(--navy-500);
}

/* Pagination — dashboard scheduled email widget */
.sch-pg-btn {
    padding: .28rem .7rem;
    font-size: .7rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: all .15s ease;
    cursor: pointer;
}
.sch-pg-btn:hover:not(:disabled) {
    border-color: var(--navy-400);
    color: var(--navy-500);
    background: var(--bg-card-hover);
}
.sch-pg-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* Responsive sub-tabs */
@media (max-width: 575.98px) {
    .sch-sub-tab {
        font-size: .65rem;
        padding: .28rem .35rem;
    }
    .sch-sub-tab i {
        font-size: .65rem;
    }
    .sch-sub-tab-count {
        font-size: .55rem;
        padding: .02rem .25rem;
    }
}

/* ============================================================
   UNIFIED MEMBER SCHEDULE — Merged Anggota + Jadwal Outreach
   ============================================================ */

.ums-card { overflow: visible; }

.ums-body {
    padding: 0;
}

/* Bulk actions */
.ums-bulk-bar {
    padding: .55rem .9rem;
    background: #ffffff;
    border-bottom: 1px dashed #15253e;
}

/* Level summary */
.ums-level-summary {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
    padding: .5rem .9rem;
    background: rgba(0,0,0,0.015);
    border-bottom: 1px solid var(--border-light);
}
.ums-level-summary-label {
    font-size: .65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-right: .2rem;
}

/* Member row */
.ums-member-row {
    padding: .75rem .9rem;
    border-bottom: 1px solid var(--border-light);
    transition: background .12s;
}
.ums-member-row:last-child {
    border-bottom: none;
}
.ums-member-row:hover {
    background: rgba(0,0,0,0.015);
}
.ums-inactive {
    background: #f0f0f2;
    border-bottom: 1px solid #d4d4d4;
}
.ums-inactive:hover {
    background: #ebebed;
}

/* Label sisa hari di radar dashboard - berdampingan dengan deadline */
.radar-days-remaining {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    font-size: .68rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: 6px;
    margin-left: .4rem;
    white-space: nowrap;
}
.radar-days-remaining i {
    font-size: .65rem;
}
.radar-days-remaining.days-red {
    background: rgba(225, 29, 72, 0.1);
    color: var(--rose-500, #e11d48);
    border: 1px solid rgba(225, 29, 72, 0.18);
}
.radar-days-remaining.days-amber {
    background: rgba(217, 119, 6, 0.1);
    color: var(--amber-500, #d97706);
    border: 1px solid rgba(217, 119, 6, 0.18);
}
.radar-days-remaining.days-green {
    background: rgba(5, 150, 105, 0.1);
    color: var(--emerald-500, #059669);
    border: 1px solid rgba(5, 150, 105, 0.18);
}

/* Status-based background untuk kontak Completed/Failed */
.ums-member-completed {
    background: rgba(5, 150, 105, 0.04) !important;
    border-left: 3px solid var(--emerald-500);
}
.ums-member-completed:hover {
    background: rgba(5, 150, 105, 0.08) !important;
}
.ums-member-failed {
    background: rgba(225, 29, 72, 0.04) !important;
    border-left: 3px solid var(--rose-500);
}
.ums-member-failed:hover {
    background: rgba(225, 29, 72, 0.08) !important;
}

/* Row top: checkbox + avatar + info + status */
.ums-row-top {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-bottom: .55rem;
}

.ums-check-col {
    display: flex;
    align-items: center;
    padding-top: .3rem;
}
.ums-check-col .form-check-input {
    border-color: var(--border);
    cursor: pointer;
}

.ums-avatar-col {
    flex-shrink: 0;
}

.ums-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy-400), var(--navy-600));
    color: var(--gold-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ums-info-col {
    flex: 1;
    min-width: 0;
}

.ums-name-row {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}

.ums-name:hover {
    text-decoration: underline !important;
}

.ums-name {
    font-weight: 600;
    font-size: .88rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.ums-meta {
    font-size: .72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .25rem;
    line-height: 1.3;
    margin-top: .05rem;
}
.ums-meta i {
    font-size: .65rem;
    color: var(--text-very-muted);
    width: 14px;
    flex-shrink: 0;
}
.ums-note {
    font-style: italic;
    color: var(--text-secondary);
}

.ums-actions-col {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex-shrink: 0;
    padding-top: .15rem;
}

.ums-dropdown-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    padding: .2rem .35rem;
    font-size: .78rem;
    line-height: 1;
    cursor: pointer;
    transition: all .2s;
}
.ums-dropdown-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* Steps row: horizontal scrollable pills */
.ums-steps-row {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding: .3rem 0 .15rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.ums-steps-row::-webkit-scrollbar {
    height: 4px;
}
.ums-steps-row::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* Step pill */
.ums-step-pill {
    flex: 0 0 auto;
    min-width: 150px;
    max-width: 200px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border-hover);
.ums-step-pill.ums-pill-active {
    border-left-color: var(--gold-accent);
    border-color: rgba(196, 169, 98, 0.25);
    background: rgba(196, 169, 98, 0.03);
}
.ums-step-pill.ums-pill-active:hover {
    border-color: var(--gold-accent);
    box-shadow: 0 2px 12px rgba(196, 169, 98, 0.1);
}

    border-radius: 8px;
    padding: .4rem .55rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    transition: all .15s;
}
.ums-step-pill:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.ums-step-done {
    opacity: .65;
    border-left-color: var(--emerald-500) !important;
    background: rgba(5,150,105,0.03);
}
.ums-step-overdue {
    border-left-color: var(--rose-500) !important;
    background: rgba(225,29,72,0.03);
}
.ums-step-today {
    border-left-color: var(--amber-500) !important;
    background: rgba(217,119,6,0.03);
}

.ums-step-pill-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .25rem;
}

.ums-step-pill-label {
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.ums-step-icon-completed { color: var(--emerald-500); font-size: .72rem; flex-shrink: 0; }
.ums-step-icon-overdue { color: var(--rose-500); font-size: .72rem; flex-shrink: 0; }
.ums-step-icon-today { color: var(--amber-500); font-size: .72rem; flex-shrink: 0; }
.ums-step-icon-pending {
    color: var(--text-muted);
    font-size: .72rem;
    flex-shrink: 0;
    cursor: pointer;
    transition: all .15s;
}
.ums-step-icon-pending:hover {
    color: var(--emerald-500);
    transform: scale(1.15);
}

.ums-step-pill-meta {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex-wrap: wrap;
}

.ums-step-day {
    font-size: .58rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .02em;
    line-height: 1;
}

.ums-date-input,
.ums-time-input {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: .08rem .15rem;
    font-size: .58rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color .15s;
    font-family: inherit;
    line-height: 1.2;
    max-width: 80px;
}
.ums-date-input { max-width: 90px; }

/* Date/time sebagai text (untuk active/closed/completed steps) */
.ums-date-text {
    font-size: .68rem;
    font-weight: 500;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    line-height: 1.4;
    white-space: nowrap;
    background: rgba(0,0,0,0.035);
    padding: .08rem .4rem;
    border-radius: 5px;
    border: 1px solid var(--border-light);
    letter-spacing: 0.01em;
}
.ums-date-text i {
    font-size: .65rem;
    color: var(--text-muted);
}
.ums-date-text.ums-date-exec {
    font-size: .64rem;
    font-weight: 600;
    color: var(--emerald-600);
    background: rgba(5,150,105,0.07);
    border-color: rgba(5,150,105,0.15);
    display: inline-flex;
    margin-top: .15rem;
    padding: .06rem .35rem;
    gap: .25rem;
}
.ums-date-text.ums-date-exec i {
    color: var(--emerald-500);
    font-size: .62rem;
}
.ums-time-input { max-width: 60px; }
.ums-date-input:hover,
.ums-time-input:hover {
    border-color: var(--navy-500);
}
.ums-date-input:focus,
.ums-time-input:focus {
    border-color: var(--navy-500);
    box-shadow: 0 0 0 2px rgba(10,37,64,0.08);
    outline: none;
    background: var(--bg-input);
}
.ums-date-disabled {
    opacity: .4;
    cursor: not-allowed !important;
    pointer-events: none;
}

.ums-overdue-badge {
    font-size: .5rem;
    font-weight: 700;
    padding: .04rem .2rem;
    border-radius: 3px;
    background: rgba(225,29,72,0.1);
    color: var(--rose-500);
    line-height: 1.1;
    white-space: nowrap;
}

.ums-step-pill-email {
    display: flex;
    align-items: center;
}

.ums-email-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid rgba(5,150,105,0.25);
    background: rgba(5,150,105,0.06);
    color: var(--emerald-500);
    font-size: .7rem;
    cursor: pointer;
    transition: all .15s;
    padding: 0;
    line-height: 1;
}
.ums-email-btn:hover {
    background: var(--emerald-500);
    border-color: var(--emerald-500);
    color: #fff;
    transform: translateY(-1px);
}

/* Footer legend */
.ums-footer {
    padding: .4rem .9rem;
    border-top: 1px dashed #15253e;
    background: var(--bg-table-header);
}

.ums-legend {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    font-size: .6rem;
    color: var(--text-muted);
}

.ums-legend-item {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
}

.ums-legend-swatch {
    width: 8px;
    height: 8px;
    border-radius: 3px;
    flex-shrink: 0;
}

.ums-legend-divider {
    color: var(--border);
    font-weight: 300;
}

@media (max-width: 767.98px) {
    .ums-step-pill {
        min-width: 130px;
        max-width: 170px;
        padding: .3rem .4rem;
    }
    .ums-step-pill-label {
        font-size: .65rem;
    }
    .ums-date-input,
    .ums-time-input {
        font-size: .52rem;
        max-width: 70px;
    }
    .ums-date-input { max-width: 80px; }
    .ums-name { font-size: .8rem; }
    .ums-avatar { width: 30px; height: 30px; font-size: .65rem; }
    .ums-member-row { padding: .55rem .65rem; }
    .ums-row-top { gap: .4rem; }

    .ums-bulk-bar { padding: .4rem .65rem; }
}

/* Guide button small variant */
.sch-guide-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: .2rem .45rem;
    font-size: .6rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    line-height: 1.2;
}
.sch-guide-btn-sm:hover {
    background: var(--navy-500);
    border-color: var(--navy-500);
    color: #fff;
    transform: translateY(-1px);
}
.sch-guide-btn-sm i {
    font-size: .68rem;
}

/* ===== UTILITY: Text helpers ===== */
.text-slate-50, .text-slate-100 { color: var(--text-primary) !important; }
.text-slate-200, .text-slate-300 { color: var(--text-secondary) !important; }
.text-slate-400, .text-slate-500 { color: var(--text-muted) !important; }
.text-slate-600 { color: var(--text-muted) !important; }
.border-slate-700, .border-slate-750 { border-color: var(--border) !important; }
.bg-slate-700, .bg-slate-800, .bg-slate-850 { background: var(--bg-card) !important; }

.contact-name-cell {
    font-weight: 500;
    color: var(--text-secondary);
}
.seq-name-cell {
    color: var(--text-secondary);
    font-size: .78rem;
}
.text-muted-small {
    color: var(--text-very-muted);
    font-size: .72rem;
}

/* ===== RESPONSIVE (Mobile) ===== */
@media (max-width: 767.98px) {
    .hamburger-btn { display: block; }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: .25rem;
        padding-top: .75rem;
        border-top: 1px solid var(--border);
        margin-top: .75rem;
    }
    .nav-links.open { display: flex; }
    .nav-links a,
    .nav-links .nav-user-badge {
        display: block;
        padding: .65rem .8rem;
        font-size: .9rem;
        border-bottom: none;
        margin: 0;
    }
    .nav-links a i { width: 20px; margin-right: .5rem; }
    .nav-links a.active-link,
    .nav-links a.active {
        border-bottom: none;
        background: rgba(10, 37, 64, 0.06);
        border-radius: 8px;
        color: var(--navy-600);
    }
    .nav-links a.nav-highlight {
        border-bottom: none;
        background: rgba(196, 169, 98, 0.08);
        border-radius: 8px;
    }
    .nav-links a.nav-highlight:hover { border-bottom: none; }
    .nav-user-badge {
        border-left: none;
        margin-left: 0;
        padding: .65rem .8rem !important;
    }
    .nav-links a.logout-link { padding: .65rem .8rem; }

    .app-header h1 { font-size: 1rem; }
    .app-header { padding: .75rem 0; }
    .container { padding-left: .75rem; padding-right: .75rem; }
    main.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }

    /* KPI */
    .kpi-card { padding: .9rem; }
    .kpi-card .kpi-value { font-size: 1.4rem; }
    .kpi-card .kpi-icon { width: 38px; height: 38px; font-size: 1rem; }

    /* Filters */
    .filter-section { width: 100%; }
    .filter-select { min-width: 0; width: 100%; }

    /* Tables */
    .radar-table tbody td { padding: .6rem .75rem; font-size: .78rem; }
    .seq-table td, .seq-table th { padding: .45rem .5rem; font-size: .72rem; }

    /* Empty state */
    .empty-state { padding: 2rem .75rem; }
    .empty-state i { font-size: 2rem; }

    /* Company */
    .company-banner { padding: 1rem; }
    .company-banner .company-name-lg { font-size: 1.1rem; }
    .company-card .card-header { padding: .75rem .9rem; }
    .company-name-lg { font-size: .85rem; }
    .contact-item { padding: .5rem .75rem; }
    .search-box { max-width: 100%; }

    /* Nav tabs */
    .nav-tabs-custom {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0;
        -webkit-overflow-scrolling: touch;
    }
    .nav-tabs-custom .nav-link {
        padding: .5rem .7rem;
        font-size: .72rem;
        white-space: nowrap;
    }

    /* Radar */
    .radar-alert { padding: .75rem; }

    /* Sequence detail */
    .info-card-header { padding: .75rem .9rem; }
    .info-card-body { padding: .9rem; }
    .member-chip { padding: .35rem .6rem; font-size: .75rem; }
    .log-row-table th { font-size: .6rem; padding: .35rem .4rem; }
    .log-row-table td { padding: .35rem .4rem; }
    .log-row-table select,
    .log-row-table input,
    .log-row-table textarea {
        padding: .4rem .5rem;
        font-size: .72rem;
        min-height: 32px;
    }
    .btn-status-completed,
    .btn-status-failed {
        font-size: .72rem;
        padding: .4rem .8rem;
    }

    /* Sequence group */
    .seq-header { padding: .75rem .9rem; }
    .seq-name-link { font-size: .82rem; }
    .seq-meta { font-size: .68rem; gap: .35rem; }
    .seq-members-table thead th { padding: .4rem .6rem; font-size: .58rem; }
    .seq-members-table tbody td { padding: .45rem .6rem; font-size: .72rem; }

    /* Log action */
    .form-card { padding: 1.25rem; }
}

@media (max-width: 575.98px) {
    .kpi-card .kpi-value { font-size: 1.2rem; }
    .kpi-card .kpi-icon { width: 32px; height: 32px; font-size: .85rem; }
    .badge-date { font-size: .6rem; padding: .2rem .45rem; }
}

/* ============================================================
   GANTT EMAIL BUTTON — Send via Nylas
   ============================================================ */

.sch-step-email-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: .2rem;
    padding: 0 .1rem;
}

.sch-email-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(5, 150, 105, 0.3);
    background: rgba(5, 150, 105, 0.08);
    color: var(--emerald-500);
    font-size: .82rem;
    cursor: pointer;
    transition: all .2s ease;
    padding: 0;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.sch-email-btn:hover {
    background: var(--emerald-500);
    border-color: var(--emerald-500);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}
.sch-email-btn:active {
    transform: translateY(0);
}

@media (max-width: 767.98px) {
    .sch-email-btn {
        width: 24px;
        height: 24px;
        font-size: .72rem;
    }
}

/* ============================================================
   SCHEDULED EMAILS LIST — Email Terjadwal Tab
   ============================================================ */

.sch-email-scheduled-wrap {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.sch-scheduled-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .3rem .2rem .5rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: .25rem;
}

.sch-scheduled-count {
    font-size: .82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: .25rem;
}

/* Card per email */
.sch-sec-card {
    display: flex;
    gap: .65rem;
    padding: .7rem .8rem;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-left: 3px solid var(--sky-500);
    border-radius: 10px;
    transition: all .2s;
    position: relative;
}
.sch-sec-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

/* Urgency variants */
.sch-sec-scheduled { border-left-color: var(--sky-500); }
.sch-sec-soon { border-left-color: var(--amber-500); background: rgba(217,119,6,0.03); }
.sch-sec-urgent { border-left-color: var(--rose-500); background: rgba(225,29,72,0.03); }
.sch-sec-overdue { border-left-color: var(--rose-500); background: rgba(225,29,72,0.05); }

.sch-sec-left {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: .1rem;
}

.sch-sec-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-table-header);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.sch-sec-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.sch-sec-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.sch-sec-name {
    font-weight: 600;
    font-size: .85rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.sch-sec-status-badge {
    font-size: .6rem;
    font-weight: 600;
    padding: .15rem .4rem;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}
.sch-status-scheduled {
    background: rgba(2,132,199,0.1);
    color: var(--sky-500);
}
.sch-status-overdue {
    background: rgba(225,29,72,0.1);
    color: var(--rose-500);
}

.sch-sec-meta {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
    font-size: .72rem;
    color: var(--text-muted);
    line-height: 1.2;
}
.sch-sec-meta i {
    font-size: .65rem;
    margin-right: .2rem;
    width: 12px;
}

.sch-sec-divider {
    color: var(--border);
    font-weight: 300;
}
.sch-sec-company-link {
    color: var(--navy-500);
    text-decoration: none;
    font-size: .72rem;
    font-weight: 500;
    transition: color .15s;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}
.sch-sec-company-link:hover {
    color: var(--gold-accent);
    text-decoration: underline;
}
.sch-sec-email {
    font-size: .72rem;
    color: var(--text-muted);
}

.sch-sec-sender {
    font-size: .7rem;
    font-weight: 500;
    color: var(--navy-500);
    background: rgba(10, 37, 64, 0.06);
    border-radius: 6px;
    padding: .1rem .45rem;
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    white-space: nowrap;
}
.sch-sec-sender i {
    color: var(--gold-accent);
}

/* V7.0 Tahap 4 — toast peringatan batas harian email (compose) */
.eml-warning-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 1060;
    max-width: 480px;
    background: #fff7ed;
    color: #b45309;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: .65rem 1rem;
    font-size: .8rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(180, 83, 9, 0.18);
    transition: opacity .3s ease, transform .3s ease;
}

.sch-sec-subject {
    font-size: .78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: .3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
    margin-top: .1rem;
}
.sch-sec-subject i {
    font-size: .65rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: .15rem;
}

.sch-sec-preview {
    font-size: .68rem;
    color: var(--text-very-muted);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
    padding-left: 1.05rem;
}

.sch-sec-step-label {
    font-size: .65rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .3rem;
    padding-left: 1.05rem;
    line-height: 1.2;
}
.sch-sec-step-label i {
    font-size: .62rem;
    color: var(--gold-accent);
}

.sch-sec-row-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .25rem;
    padding-top: .25rem;
    border-top: 1px solid var(--border-light);
}

.sch-sec-countdown {
    font-size: .7rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: .2rem;
    font-variant-numeric: tabular-nums;
}
.sch-sec-countdown i {
    font-size: .7rem;
    color: var(--gold-accent);
}

.sch-sec-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

.sch-sec-sendat {
    font-size: .65rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .2rem;
    white-space: nowrap;
}
.sch-sec-sendat i {
    font-size: .62rem;
}

.sch-sec-cancel-btn {
    background: transparent;
    border: 1px solid rgba(225,29,72,0.2);
    color: var(--rose-400);
    border-radius: 6px;
    padding: .2rem .35rem;
    font-size: .7rem;
    cursor: pointer;
    transition: all .2s;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}
.sch-sec-cancel-btn:hover {
    background: rgba(225,29,72,0.08);
    border-color: var(--rose-500);
    color: var(--rose-500);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 767.98px) {
    .sch-sec-card {
        padding: .55rem .6rem;
        gap: .5rem;
    }
    .sch-sec-avatar {
        width: 28px;
        height: 28px;
        font-size: .62rem;
    }
    .sch-sec-name {
        font-size: .78rem;
    }
    .sch-sec-subject {
        font-size: .72rem;
    }
    .sch-sec-meta {
        font-size: .65rem;
    }
    .sch-sec-countdown {
        font-size: .62rem;
    }
    .sch-sec-sendat {
        font-size: .58rem;
    }
    .sch-sec-row-bottom {
        flex-wrap: wrap;
    }
}

/* ============================================================
   DASHBOARD WIDGET — Scheduled Emails Global
   ============================================================ */

.widget-sec-wrap .sch-sec-card:last-child {
    margin-bottom: 0;
}

/* ============================================================
   EMAIL LOGS — Riwayat Email Tab
   ============================================================ */

.email-log-item {
    display: flex;
    gap: .65rem;
    padding: .65rem .75rem;
    border-bottom: 1px solid var(--border-light);
    transition: background .15s;
    align-items: flex-start;
}
.email-log-item:last-child {
    border-bottom: none;
}
.email-log-item:hover {
    background: rgba(0,0,0,.02);
}

.email-log-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky-400), var(--sky-600));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.email-log-body {
    flex: 1;
    min-width: 0;
}

.email-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
}

.email-log-name {
    font-weight: 600;
    font-size: .82rem;
    color: var(--text-primary);
}

.email-log-email {
    font-size: .72rem;
    color: var(--text-muted);
    word-break: break-all;
}

.email-log-time {
    font-size: .68rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.email-log-subject {
    font-weight: 500;
    font-size: .78rem;
    color: var(--text-secondary);
    margin: .15rem 0 .1rem;
}

.email-log-preview {
    font-size: .75rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.email-log-status-badge {
    font-size: .65rem;
    padding: .1rem .45rem;
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap;
}
.email-log-status-badge.sent {
    background: rgba(5,150,105,0.1);
    color: var(--emerald-600);
    border: 1px solid rgba(5,150,105,0.2);
}
.email-log-status-badge.scheduled {
    background: rgba(2,132,199,0.1);
    color: var(--sky-600);
    border: 1px solid rgba(2,132,199,0.2);
}
.email-log-status-badge.failed {
    background: rgba(225,29,72,0.08);
    color: var(--rose-500);
    border: 1px solid rgba(225,29,72,0.18);
}
.email-log-status-badge.cancelled {
    background: rgba(107,114,128,0.1);
    color: var(--text-muted);
    border: 1px solid rgba(107,114,128,0.2);
}

/* Empty state for email logs */
.email-log-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
}
.email-log-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: .75rem;
    color: var(--border);
}

/* Responsive email logs */
@media (max-width: 575.98px) {
    .email-log-avatar {
        width: 28px;
        height: 28px;
        font-size: .65rem;
    }
    .email-log-item {
        padding: .5rem .55rem;
    }
}

/* ============================================================
   PRIORITY LEVEL BADGES — Company Priority (c_priority_level)
   ============================================================ */

.priority-badge {
    display: inline-flex;
    align-items: center;
    font-size: .68rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: 6px;
    vertical-align: middle;
    line-height: 1.3;
    white-space: nowrap;
}
.priority-badge i {
    margin-right: .3rem;
    font-size: .7rem;
}

.priority-potential {
    background: rgba(5, 150, 105, 0.1);
    color: var(--emerald-600);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.priority-medium {
    background: rgba(217, 119, 6, 0.1);
    color: var(--amber-500);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.priority-low {
    background: rgba(107, 114, 128, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(107, 114, 128, 0.15);
}

.priority-invalid {
    background: rgba(225, 29, 72, 0.08);
    color: var(--rose-500);
    border: 1px solid rgba(225, 29, 72, 0.15);
}

/* Larger variant for company banner */
.priority-badge-lg {
    font-size: .72rem;
    padding: .25rem .6rem;
}

/* ============================================================
   CONTACT EMAIL DISPLAY — Inline email di chips & items
   ============================================================ */

.contact-email-inline {
    font-size: .72rem;
    color: var(--text-muted);
    display: block;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.contact-email-inline i {
    margin-right: .2rem;
    font-size: .65rem;
    color: var(--text-very-muted);
}


/* ============================================================
   EMAIL SIGNATURE — Default signature di compose modal
   ============================================================ */

.email-signature {
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
    margin-top: 8px;
    opacity: 0.85;
    transition: opacity .2s;
}
.email-signature:hover {
    opacity: 1;
}
.email-signature a {
    color: #1a73e8 !important;
    text-decoration: none !important;
}
.email-signature a:hover {
    text-decoration: underline !important;
}

/* ============================================================
   EMAIL DETAIL PREVIEW MODAL
   ============================================================ */

/* Preview button pada email cards */
.eml-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    background: var(--navy-500);
    border: none;
    color: #fff;
    border-radius: 6px;
    padding: .2rem .45rem;
    font-size: .65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(10,37,64,0.1);
}
.eml-preview-btn:hover {
    background: var(--navy-400);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(10,37,64,0.2);
    color: #fff;
}
.eml-preview-btn i {
    font-size: .6rem;
}

/* Preview button di posisi top-right */
.eml-preview-btn-top {
    margin-left: auto;
    flex-shrink: 0;
}

/* Untuk row-top yang jadi flex container */
.eml-row-top,
.sch-sec-row-top {
    display: flex !important;
    align-items: center !important;
    gap: .5rem !important;
}
.sch-preview-btn-sm.eml-preview-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    box-shadow: none;
    font-size: .6rem;
    padding: .15rem .35rem;
}
.sch-preview-btn-sm.eml-preview-btn:hover {
    background: var(--navy-500);
    border-color: var(--navy-500);
    color: #fff;
}

/* ===== EMAIL DETAIL MODAL ===== */
.eml-detail-wrap {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

/* Contact info header */
.eml-detail-contact {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.eml-detail-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--navy-500);
    color: #fff;
}

.eml-detail-contact-info {
    flex: 1;
    min-width: 0;
}

.eml-detail-contact-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.eml-detail-contact-email {
    font-size: .78rem;
    color: var(--text-secondary);
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: .3rem;
}
.eml-detail-contact-email i {
    font-size: .72rem;
    color: var(--text-muted);
}

/* Status badge di detail */
.eml-detail-status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .68rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.eml-detail-status-badge.eml-status-sent {
    background: rgba(5,150,105,0.1);
    color: var(--emerald-500);
}
.eml-detail-status-badge.eml-status-scheduled {
    background: rgba(2,132,199,0.1);
    color: var(--sky-500);
}
.eml-detail-status-badge.eml-status-failed {
    background: rgba(225,29,72,0.08);
    color: var(--rose-500);
}
.eml-detail-status-badge.eml-status-cancelled {
    background: rgba(148,163,184,0.1);
    color: var(--text-muted);
}
.eml-detail-status-badge.eml-status-pending {
    background: rgba(217,119,6,0.08);
    color: var(--amber-500);
}

/* Meta info grid */
.eml-detail-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .45rem .75rem;
    padding: .75rem .85rem;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: .82rem;
}

.eml-detail-meta-label {
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.eml-detail-meta-value {
    color: var(--text-primary);
    word-break: break-word;
    font-size: .82rem;
}

.eml-detail-meta-value a {
    color: var(--sky-500);
    text-decoration: none;
}
.eml-detail-meta-value a:hover {
    text-decoration: underline;
}

/* Subject */
.eml-detail-subject {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 0 .1rem;
    line-height: 1.4;
}
.eml-detail-subject-label {
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .25rem;
}

/* Body content */
.eml-detail-body {
    padding: .85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-height: 450px;
    overflow-y: auto;
    font-size: .85rem;
    line-height: 1.7;
    word-wrap: break-word;
}
.eml-detail-body-label {
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .35rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}

/* Error message */
.eml-detail-error {
    padding: .55rem .75rem;
    background: rgba(225,29,72,0.06);
    border: 1px solid rgba(225,29,72,0.15);
    border-radius: 8px;
    color: var(--rose-500);
    font-size: .78rem;
    display: flex;
    align-items: flex-start;
    gap: .4rem;
}
.eml-detail-error i {
    font-size: .85rem;
    margin-top: .1rem;
    flex-shrink: 0;
}

/* Company/sequence badges in detail */
.eml-detail-badges {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}
.eml-detail-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .68rem;
    font-weight: 500;
    padding: .15rem .5rem;
    border-radius: 6px;
    background: rgba(0,0,0,0.03);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}
.eml-detail-badge i {
    font-size: .65rem;
    color: var(--text-muted);
}

/* Loading state */
.eml-detail-loading {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
}
.eml-detail-loading i {
    font-size: 1.8rem;
    display: block;
    margin-bottom: .75rem;
    opacity: .5;
}

/* Message ID (Nylas) */
.eml-detail-message-id {
    font-size: .72rem;
    color: var(--text-muted);
    font-family: 'Inter', monospace;
    word-break: break-all;
    padding: .35rem .55rem;
    background: rgba(0,0,0,0.02);
    border-radius: 6px;
    border: 1px solid var(--border-light);
    margin-top: .25rem;
}

/* Responsive */
@media (max-width: 767.98px) {
    .eml-detail-contact {
        flex-wrap: wrap;
        padding: .65rem;
    }
    .eml-detail-avatar {
        width: 34px;
        height: 34px;
        font-size: .82rem;
    }
    .eml-detail-contact-name {
        font-size: .85rem;
    }
    .eml-detail-meta {
        grid-template-columns: 1fr;
        gap: .25rem;
        padding: .55rem .65rem;
    }
    .eml-detail-body {
        max-height: 300px;
        font-size: .78rem;
        padding: .65rem;
    }
    .eml-detail-subject {
        font-size: .82rem;
    }
}

@media (min-width: 1200px) {
    .modal-xl {
        max-width: 95% !important;
    }
}

/* ============================================================
   CALENDAR EMAIL EVENTS
   ============================================================ */
.fc-event-email-scheduled {
    border-left: 3px solid rgba(255,255,255,0.4) !important;
}
.fc-event-email-sent {
    border-left: 3px solid rgba(255,255,255,0.4) !important;
}
.fc-event-email.fc-event-past {
    opacity: 0.5 !important;
}
.fc-event-email .fc-event-title {
    font-style: italic;
}
.fc-event-email {
    font-size: .6rem !important;
}

/* ============================================================
   RADAR CARD LIST — Compact Card-based Design for Radar View
   ============================================================ */

.radar-card-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .75rem .85rem;
}

.radar-card-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .85rem 1rem;
    transition: all .2s ease;
    box-shadow: 0 1px 3px rgba(10,37,64,0.04);
}
.radar-card-item:hover {
    border: 1px solid black;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    background: var(--bg-card-hover);
}

.radar-card-item.radar-overdue {
    border-left: 3px solid var(--rose-500);
}
.radar-card-item.radar-due-today {
    border-left: 3px solid var(--amber-500);
}
.radar-card-item.radar-upcoming {
    border-left: 3px solid var(--emerald-500);
}
.radar-card-item.radar-closed {
    opacity: .75;
}

.radar-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .45rem;
}

.radar-card-identity {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1;
}

.radar-card-company {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color .2s;
    white-space: nowrap;
}
.radar-card-company:hover {
    color: var(--navy-500);
}
.radar-card-company i {
    font-size: .7rem;
    margin-right: .25rem;
    color: var(--text-muted);
}

.radar-card-sep {
    color: var(--text-very-muted);
    font-size: .65rem;
    font-weight: 300;
    flex-shrink: 0;
}

.radar-card-sequence {
    font-size: .75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color .2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.radar-card-sequence:hover {
    color: var(--navy-500);
}
.radar-card-sequence i {
    font-size: .7rem;
    margin-right: .2rem;
    color: var(--text-very-muted);
}

.radar-card-badges-top {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.radar-card-contact {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    flex-wrap: wrap;
    margin-bottom: .5rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border-light);
}

.radar-card-contact-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.radar-card-contact-title {
    font-size: .75rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.3;
}

.radar-card-contact-title i {
    font-size: .65rem;
    color: var(--text-very-muted);
    margin-right: .15rem;
}

.radar-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

.radar-card-progress {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.radar-card-step {
    font-size: .75rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    white-space: nowrap;
}
.radar-card-step i {
    font-size: .7rem;
    color: var(--text-muted);
}

.radar-card-step-channel {
    font-size: .65rem;
    color: var(--text-very-muted);
    font-weight: 500;
}

.radar-card-step-date {
    font-size: .65rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.radar-card-no-log {
    font-size: .72rem;
    color: var(--text-very-muted);
    font-style: italic;
}

.radar-card-actions {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-shrink: 0;
}

.radar-card-deadline {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .68rem;
    font-weight: 600;
    padding: .2rem .5rem;
    border-radius: 6px;
    white-space: nowrap;
    line-height: 1.3;
}
.radar-card-deadline i {
    font-size: .6rem;
}
.radar-card-deadline.overdue {
    background: rgba(225, 29, 72, 0.08);
    color: var(--rose-500);
    border: 1px solid rgba(225, 29, 72, 0.12);
}
.radar-card-deadline.due-today {
    background: rgba(217, 119, 6, 0.08);
    color: var(--amber-500);
    border: 1px solid rgba(217, 119, 6, 0.12);
}
.radar-card-deadline.upcoming {
    background: rgba(5, 150, 105, 0.08);
    color: var(--emerald-500);
    border: 1px solid rgba(5, 150, 105, 0.12);
}
.radar-card-deadline.closed {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.radar-card-status-dot {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    font-size: .6rem;
    font-weight: 600;
    padding: .15rem .4rem;
    border-radius: 20px;
    white-space: nowrap;
    line-height: 1.2;
}
.radar-card-status-dot i {
    font-size: .5rem;
}

@media (max-width: 767.98px) {
    .radar-card-list {
        padding: .5rem .6rem;
        gap: .4rem;
    }
    .radar-card-item {
        padding: .65rem .75rem;
    }
    .radar-card-top {
        flex-direction: column;
        align-items: flex-start;
        gap: .35rem;
    }
    .radar-card-badges-top {
        align-self: flex-start;
    }
    .radar-card-contact-name {
        font-size: .82rem;
    }
    .radar-card-company {
        font-size: .7rem;
    }
    .radar-card-sequence {
        font-size: .7rem;
    }
    .radar-card-step {
        font-size: .7rem;
    }
    .radar-card-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }
    .radar-card-actions {
        align-self: flex-end;
    }
}

/* Fix level badge margin inside radar card */
.radar-card-badges-top .sch-level-badge-xs {
    margin-right: 0;
}


/* ===== RADAR CARD AVATAR — Initials Avatar ===== */
.radar-card-contact {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.radar-card-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .68rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--navy-400), var(--navy-600));
    color: var(--gold-accent);
    flex-shrink: 0;
    letter-spacing: .03em;
    line-height: 1;
}

@media (max-width: 767.98px) {
    .radar-card-avatar {
        width: 26px;
        height: 26px;
        min-width: 26px;
        font-size: .6rem;
    }
}

/* Efek dasar transisi untuk kedua span */
#emailCompanyName,
#emailCompanyIndustry {
  transition: transform 0.15s ease, background-color 0.15s ease;
  display: inline-block; /* agar transform bekerja */
}

/* Kelas yang ditambahkan saat diklik */
.clicked-effect {
  transform: scale(0.92);
  background-color: rgba(16, 185, 129, 0.2) !important; /* warna sesuai keinginan */
}