.management-page {
    min-width: 0;
}

.management-section {
    margin-bottom: 18px;
}

.management-section:last-child {
    margin-bottom: 0;
}

/* =========================================
   CARD / CONTAINER
========================================= */
.management-card,
.management-empty,
.management-table-wrap,
.lead-summary-card {
    background: var(--panel);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.management-card {
    padding: 18px;
    margin-top: 24px; 
    padding-bottom: 10px;
}

.management-card-title {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.4;
}

.management-card-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
}

.management-empty {
    padding: 22px 18px;
    text-align: center;
    color: var(--muted);
}

.lead-empty-state {
    margin-top: 14px;
}

/* =========================================
   TABLE
========================================= */
.management-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
}

.management-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    position: relative;
}

.management-table th,
.management-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 0.92rem;
    vertical-align: middle;
}

.management-table th {
    background: var(--panel-soft);
    color: var(--text);
    font-weight: 700;
}

.management-table td {
    color: #334155;
}

.management-table tr:last-child td {
    border-bottom: none;
}

/* =========================================
   SUMMARY / HIGHLIGHT
========================================= */
.lead-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.lead-summary-card {
    padding: 18px;
}

.lead-summary-card h4 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.4;
}

.lead-summary-card strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.2;
    color: var(--text);
}

.lead-summary-card span {
    display: block;
    margin-top: 8px;
    font-size: 0.83rem;
    color: #94a3b8;
    line-height: 1.5;
}

.dashboard-highlight {
    text-align: center;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.highlight-card,
.stat-card {
    background: var(--panel);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 18px;
}

.highlight-card h4,
.stat-card h4 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: var(--muted);
}

.highlight-card strong,
.stat-card strong {
    display: block;
    font-size: 1.45rem;
    color: var(--text);
    line-height: 1.2;
}

.highlight-card span,
.stat-card span {
    display: block;
    margin-top: 8px;
    font-size: 0.83rem;
    color: #94a3b8;
    line-height: 1.5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

/* =========================================
   LIST / CARD
========================================= */
.lead-list {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.lead-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
}

.lead-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.lead-card-main h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.4;
}

.lead-card-main p {
    margin: 4px 0 0;
    font-size: 0.83rem;
    color: var(--muted);
    line-height: 1.5;
}

/* =========================================
   BADGES
========================================= */
.lead-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.lead-badge-new {
    background: #e0f2fe;
    color: #075985;
}

.lead-badge-contacted {
    background: #ede9fe;
    color: #5b21b6;
}

.lead-badge-qualified {
    background: #fef3c7;
    color: #92400e;
}

.lead-badge-paid {
    background: #dcfce7;
    color: #166534;
}

.lead-badge-default {
    background: #e5e7eb;
    color: #374151;
}

/* =========================================
   META GRID
========================================= */
.lead-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.lead-meta-item {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
}

.lead-meta-item span {
    display: block;
    margin-bottom: 6px;
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.4;
}

.lead-meta-item strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.5;
    word-break: break-word;
}

/* =========================================
   ACTION BUTTONS
========================================= */
.lead-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lead-action-btn {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px; /* Memberi jarak cukup dengan konten di atasnya */
    padding-bottom: 10px; /* Opsional: memberi sedikit nafas di bagian bawah box */
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.lead-action-primary {
    background: var(--primary);
    color: #ffffff;
}

.lead-action-secondary {
    background: #e5e7eb;
    color: #374151;
}

.lead-action-primary:hover,
.lead-action-secondary:hover {
    filter: brightness(0.98);
}

.lead-action-primary:active,
.lead-action-secondary:active {
    transform: translateY(1px);
}

/* =========================================
   ACTION DROPDOWN
========================================= */
.action-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #475569;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #f8fafc;
    color: #f97316;
    border-color: #cbd5e1;
}

.action-btn:active {
    transform: translateY(1px);
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

.action-menu {
    position: fixed !important;
    top: 0;
    left: 0;
    right: auto !important;
    min-width: 190px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
    padding: 8px;
    display: none;
    z-index: 99999;
}

.action-menu.show {
    display: block;
}

.action-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.action-menu a:hover {
    background: #f8fafc;
    color: #0f172a;
}

.action-menu a.danger {
    color: #dc2626;
}

.action-menu a.danger:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.action-menu svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* =========================================
   DELETE MODAL
========================================= */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

.modal-backdrop.show {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
    animation: modalFadeIn 0.18s ease;
}

.modal h4 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.4;
    color: #0f172a;
}

.modal p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #64748b;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.modal .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal .btn-cancel {
    background: #e5e7eb;
    color: #374151;
}

.modal .btn-cancel:hover {
    background: #d1d5db;
}

.modal .btn-delete {
    background: #dc2626;
    color: #ffffff;
}

.modal .btn-delete:hover {
    background: #b91c1c;
}

.modal .btn:active {
    transform: translateY(1px);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================
   FORM
========================================= */
.transaction-form {
    margin-top: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    color: #111827;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.form-group input[readonly] {
    background: #f8fafc;
    color: #6b7280;
    cursor: not-allowed;
}

.form-group input[type="file"] {
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
}

.form-helper-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: #6b7280;
}

.transaction-selected-lead {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.88rem;
    line-height: 1.6;
}

.transaction-status-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.transaction-status-form select,
.transaction-status-form input,
.transaction-status-form textarea {
    min-width: 0;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    padding: 10px 12px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.transaction-status-form select,
.transaction-status-form input {
    flex: 1 1 180px;
}

.transaction-status-form textarea {
    flex: 1 1 100%;
    min-height: 72px;
    resize: vertical;
}

/* =========================================
   NOTES / INLINE INFO
========================================= */
.transaction-notes {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
}

.transaction-notes strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    color: var(--text);
    line-height: 1.4;
}

.transaction-notes p {
    margin: 0;
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.6;
    word-break: break-word;
}

/* =========================================
   USER DETAIL / PROFILE
========================================= */
.user-detail-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
}

.user-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
}

.user-detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.user-detail-label {
    font-size: 14px;
    color: #6b7280;
    min-width: 150px;
}

.user-detail-value {
    font-size: 14px;
    color: #111827;
    text-align: right;
    word-break: break-word;
    max-width: 70%;
}

.profile-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.profile-hero-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.profile-hero-avatar {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.profile-hero-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 28px;
    font-weight: 800;
}

.profile-hero-meta h2 {
    margin: 0 0 6px;
    font-size: 22px;
    color: #111827;
}

.profile-hero-meta p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.profile-hero-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.panel-profile-actions {
    margin-top: 10px;
}

.panel-profile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.panel-profile-link:hover {
    background: #dbeafe;
    color: #1e40af;
    transform: translateY(-1px);
}

.user-list-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.user-list-avatar,
.user-avatar-image {
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    flex-shrink: 0;
}

.user-list-avatar {
    width: 48px;
    height: 48px;
}

.user-avatar-image {
    width: 52px;
    height: 52px;
}

.user-list-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 18px;
    font-weight: 800;
}

/* =========================================
   REFERRAL LINK GENERATOR
========================================= */
.referral-campaign-select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    background: #ffffff;
    color: #111827;
}

.referral-link-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.referral-link-input {
    flex: 1 1 320px;
    min-width: 0;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    background: #f9fafb;
    color: #111827;
}

.referral-copy-btn {
    white-space: nowrap;
}

/* =========================================
   QA / BUG COMMENTS
========================================= */
.bug-comments {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bug-comment {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
}

.bug-comment-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
    color: #6b7280;
}

/* =========================================
   SIDEBAR ADDONS
========================================= */
.sidebar-section {
    font-size: 11px;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 14px 12px 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.panel-nav-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.management-mobile-menu-inner a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-badge.is-pulse {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* =========================================
   DASHBOARD SIMPLE LIST
========================================= */
.dashboard-simple-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.dashboard-simple-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.dashboard-simple-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dashboard-simple-main {
    min-width: 0;
    flex: 1 1 auto;
}

.dashboard-simple-main h4 {
    margin: 0 0 4px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.dashboard-simple-main h4 a {
    color: var(--text);
    text-decoration: none;
}

.dashboard-simple-main h4 a:hover {
    color: var(--primary);
}

.dashboard-simple-main p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.6;
    word-break: break-word;
}

.dashboard-simple-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    text-align: right;
}

.dashboard-simple-side small {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 1200px) {
    .dashboard-highlight,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lead-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lead-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full {
        grid-column: auto;
    }

    .referral-link-box {
        flex-direction: column;
    }

    .referral-copy-btn {
        width: 100%;
    }

    .action-menu {
        right: 0;
        min-width: 168px;
    }

    .modal {
        max-width: 100%;
        border-radius: 16px;
        padding: 18px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .dashboard-highlight,
    .stats-grid,
    .lead-summary-grid,
    .lead-meta-grid {
        grid-template-columns: 1fr;
    }

    .lead-summary-card,
    .lead-card,
    .management-card,
    .highlight-card,
    .stat-card {
        padding: 14px;
    }

    .lead-card-top {
        flex-direction: column;
        align-items: stretch;
    }

    .lead-card-actions,
    .transaction-status-form {
        flex-direction: column;
    }

    .lead-action-btn,
    .transaction-status-form select,
    .transaction-status-form input,
    .transaction-status-form textarea {
        width: 100%;
    }

    .management-table {
        min-width: 720px;
    }

    .profile-hero-card {
        align-items: flex-start;
    }

    .profile-hero-left {
        align-items: flex-start;
    }

    .user-detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .user-detail-value {
        text-align: left;
        max-width: 100%;
    }

    .dashboard-simple-item {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-simple-side {
        align-items: flex-start;
        text-align: left;
    }

    .action-btn {
        width: 36px;
        height: 36px;
    }

    .action-menu {
        min-width: 160px;
        padding: 6px;
    }

    .action-menu a {
        min-height: 38px;
        padding: 9px 10px;
        font-size: 13px;
    }
}
.lead-badge-refunded {
    background: #fee2e2;
    color: #991b1b;
}