/* ── VVG Admin — Custom Panel Styles ──────────────────────────────────── */

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.fi-sidebar {
    border-right: 1px solid rgb(var(--gray-200) / 0.6);
}

.fi-sidebar-nav-group-label {
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.09em !important;
    text-transform: uppercase !important;
}

.fi-sidebar-item-button {
    border-radius: 0.5rem !important;
    transition: background-color 0.15s ease, color 0.15s ease !important;
}

/* ── Topbar ──────────────────────────────────────────────────────────── */
.fi-topbar {
    border-bottom: 1px solid rgb(var(--gray-200) / 0.6) !important;
    backdrop-filter: blur(8px);
}

/* ── Page header ─────────────────────────────────────────────────────── */
.fi-header {
    padding-bottom: 0.75rem;
}

/* ── Sections & Cards ────────────────────────────────────────────────── */
.fi-section {
    border-radius: 0.75rem !important;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.04) !important;
}

.fi-section-header-wrapper {
    border-bottom: 1px solid rgb(var(--gray-100)) !important;
}

/* ── Table ───────────────────────────────────────────────────────────── */
.fi-ta-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.fi-ta-row {
    transition: background-color 0.12s ease !important;
}

.fi-ta-header-cell {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
}

/* ── Badges ──────────────────────────────────────────────────────────── */
.fi-badge {
    border-radius: 9999px !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    padding-left: 0.625rem !important;
    padding-right: 0.625rem !important;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.fi-btn {
    border-radius: 0.5rem !important;
    transition: all 0.15s ease !important;
}

/* ── Stats overview widget ───────────────────────────────────────────── */
.fi-wi-stats-overview-stat {
    border-radius: 0.75rem !important;
    border: 1px solid rgb(var(--gray-200) / 0.7) !important;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.06) !important;
    transition: box-shadow 0.2s ease !important;
}

.fi-wi-stats-overview-stat:hover {
    box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.08) !important;
}

/* ── Form inputs ─────────────────────────────────────────────────────── */
.fi-input {
    border-radius: 0.5rem !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

/* ── Modal ───────────────────────────────────────────────────────────── */
.fi-modal-window {
    border-radius: 1rem !important;
}

/* ── Copyable column indicator ───────────────────────────────────────── */
.fi-ta-col-action-btn {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.fi-ta-cell:hover .fi-ta-col-action-btn {
    opacity: 1;
}

/* ── Kode registrasi monospace ───────────────────────────────────────── */
td[data-column="kode_registrasi"] .fi-ta-text-item-label {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.04em;
}

/* ── Mobile responsive ───────────────────────────────────────────────── */

/* Ensure table container scrolls on small screens */
.fi-ta-wrp {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
    /* Hide columns tagged as secondary on mobile.
       Covers both when extraAttributes goes to <td> directly
       and when it goes to an inner element (use :has()). */
    [data-mobile-hidden="true"],
    td:has([data-mobile-hidden="true"]) {
        display: none !important;
    }

    /* Compact cell padding on small screens */
    .fi-ta-cell,
    .fi-ta-header-cell {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Make action group button easier to tap */
    .fi-ta-actions .fi-btn {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Prevent badge overflow */
    .fi-badge {
        max-width: 8rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Compact page header on mobile */
    .fi-header-heading {
        font-size: 1.125rem !important;
    }

    /* Stack stats widget vertically */
    .fi-wi-stats-overview {
        grid-template-columns: 1fr 1fr !important;
    }
}
