/**
 * ranting_public.css - Stylesheet Direktori Tempat Latihan & Ranting Publik
 * Standar Desain SaaS Modern (Mobbin: Linear / Supabase / Stripe)
 * Dukungan Dual-View Mode (Tabel Kompak & Kartu Visual) + Collapsible Accordion
 */

/* 1. Hero Section & Unified Elevated Stats Panel (Elegan & Berkelas) */
.ranting-hero-section {
    background: radial-gradient(circle at 88% 18%, rgba(185, 28, 28, 0.05) 0%, transparent 55%),
                radial-gradient(circle at 12% 85%, rgba(217, 119, 6, 0.04) 0%, transparent 45%),
                #ffffff;
    position: relative;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(185, 28, 28, 0.06);
    border: 1px solid rgba(185, 28, 28, 0.2);
    color: #991b1b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 9999px;
}

.hero-main-title {
    font-size: 2.25rem;
    line-height: 1.2;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.hero-lead-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #475569;
}

.unified-stat-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 16px;
    padding: 1.15rem 1.35rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.unified-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #991b1b 0%, #d97706 100%);
}

.unified-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.08);
}

.stat-header-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.stat-logo-squircle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-logo-squircle img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.stat-metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    align-items: center;
}

.stat-metric-col {
    text-align: center;
    padding: 0 4px;
}

.stat-metric-col:not(:last-child) {
    border-right: 1px solid #f1f5f9;
}

.stat-metric-num {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.1;
    color: #991b1b;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.stat-metric-lbl {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 3px;
    line-height: 1.2;
}

/* 2. City Pill Filters */
.city-filter-wrapper {
    scrollbar-width: thin;
}
.city-filter-wrapper::-webkit-scrollbar {
    height: 4px;
}
.city-filter-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

.city-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
}

.city-pill:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.city-pill.active {
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #ffffff !important;
}

.city-count-badge {
    background: #f1f5f9;
    color: #0f172a;
    padding: 1px 6px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.city-pill.active .city-count-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* 3. View Switcher Toolbar (Table vs Cards) */
.view-switcher {
    display: inline-flex;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.view-btn {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.view-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.view-btn.active {
    background: #0f172a !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* 4. Cabang Accordion Header */
.cabang-accordion-header {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cabang-accordion-header:hover {
    border-color: #cbd5e1;
    background: #fafafa;
    transform: translateY(-1px);
}

.cabang-city-badge {
    width: 36px;
    height: 36px;
    background: #fee2e2;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.accordion-chevron-box {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: transform 0.2s ease, background 0.15s ease;
}

.cabang-accordion-header[aria-expanded="false"] .accordion-chevron-box i {
    transform: rotate(-90deg);
}

/* 5. Compact Table View (High Data Density - Standard SaaS Table) */
.ranting-compact-table {
    border-collapse: separate;
    border-spacing: 0;
}

.ranting-compact-table thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 9px 14px !important;
}

.ranting-compact-table tbody td {
    padding: 10px 14px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 0.84rem !important;
    vertical-align: middle;
}

.ranting-row-item {
    transition: background-color 0.15s ease;
}

.ranting-row-item:hover {
    background-color: #f8fafc !important;
}

.ranting-row-name {
    font-size: 0.92rem;
    letter-spacing: -0.01em;
}

.unit-icon-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.compact-jadwal-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 0.74rem;
    transition: border-color 0.15s ease;
}

.compact-jadwal-pill:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.compact-pelatih-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 2px 8px;
    font-size: 0.74rem;
}

.hover-primary {
    transition: color 0.15s ease;
}
.hover-primary:hover {
    color: #2563eb !important;
    text-decoration: underline !important;
}

.hover-map-link {
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    color: #0f172a;
}
.hover-map-link:hover {
    color: #2563eb !important;
}
.hover-map-link:hover span {
    text-decoration: underline;
}
.hover-map-link:hover .bi-box-arrow-up-right {
    opacity: 1 !important;
    color: #2563eb !important;
}

/* 6. Visual Card Grid Mode (Mobbin Modern Directory Standard) */
.ranting-card {
    border-radius: 14px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ranting-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px);
}

.ranting-title {
    font-size: 1.05rem;
    letter-spacing: -0.015em;
    color: #0f172a;
}

.status-indicator-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}

.card-location-link {
    color: #334155;
    transition: color 0.15s ease;
}
.card-location-link:hover {
    color: #2563eb !important;
}

.card-section-label {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.schedule-strip-item {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.schedule-strip-item:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.schedule-day-badge {
    font-size: 0.68rem;
    font-weight: 800;
    background: #0f172a;
    color: #ffffff;
    padding: 1.5px 6px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.schedule-empty-strip {
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    font-size: 0.76rem;
}

.pic-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(153, 27, 27, 0.08);
    color: #991b1b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border: 1px solid rgba(153, 27, 27, 0.15);
}

.card-action-footer {
    border-color: #f1f5f9 !important;
}

.font-tabular {
    font-variant-numeric: tabular-nums;
}

/* 7. Sesi Latihan Resmi Tingkat Cabang (Khusus Cakel+) */
.cabang-schedule-row {
    background-color: #fff9f8 !important;
    border-left: 3.5px solid #dc2626 !important;
}

.cabang-schedule-row:hover {
    background-color: #fff0ee !important;
}

.unit-icon-badge-cabang {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    box-shadow: 0 2px 5px rgba(220, 38, 38, 0.28);
}

.cabang-schedule-card {
    background: linear-gradient(180deg, #ffffff 0%, #fffbfc 100%) !important;
    border-top: 3.5px solid #dc2626 !important;
    box-shadow: 0 4px 12px -2px rgba(220, 38, 38, 0.06), 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}

.cabang-schedule-card:hover {
    border-color: #f87171 !important;
    box-shadow: 0 14px 28px -6px rgba(220, 38, 38, 0.12) !important;
}
