﻿/* ==========================================================================
   RSLGM UNIFIED KAMAR & SIRANAP BED AVAILABILITY (HYBRID VIEW)
   ========================================================================== */
.rslgm-kamar-hub-page {
    background: #f8fafc;
    padding: 48px 0 80px;
    font-family: inherit;
    color: #1e293b;
}

.rslgm-kamar-hub-page * {
    box-sizing: border-box;
}

.kamar-hub-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Section */
.kamar-hub-header {
    text-align: center;
    margin-bottom: 36px;
}

.kamar-hub-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
    border: 1px solid #bae6fd;
}

.kamar-hub-title {
    font-size: clamp(26px, 3.5vw, 36px);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin: 0 0 10px;
    line-height: 1.25;
}

.kamar-hub-subtitle {
    font-size: clamp(14px, 1.8vw, 16px);
    color: #64748b;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* KPI Summary Cards Grid */
.kamar-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 32px;
}

@media (max-width: 900px) {
    .kamar-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .kamar-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.kpi-stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 22px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
}

.kpi-icon-bubble {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.kpi-stat-card.card-total .kpi-icon-bubble { background: #eff6ff; color: #1d4ed8; }
.kpi-stat-card.card-empty .kpi-icon-bubble { background: #f0fdf4; color: #15803d; }
.kpi-stat-card.card-filled .kpi-icon-bubble { background: #fef2f2; color: #b91c1c; }
.kpi-stat-card.card-sync .kpi-icon-bubble { background: #fefce8; color: #a16207; }

.kpi-num {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.kpi-num.green { color: #16a34a; }
.kpi-num.red { color: #dc2626; }
.kpi-num.blue { color: #2563eb; }

.kpi-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 600;
}

.kpi-sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

/* Pulsing Dots */
.live-pulse-dot {
    width: 8px;
    height: 8px;
    background: #0284c7;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7);
    animation: rslgmPulse 1.8s infinite;
}

.pulse-green {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: rslgmPulseGreen 1.8s infinite;
}

.pulse-amber {
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    animation: rslgmPulseAmber 1.8s infinite;
}

@keyframes rslgmPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(2, 132, 199, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

@keyframes rslgmPulseGreen {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes rslgmPulseAmber {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Filter Toolbar */
.kamar-filter-toolbar {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 12px 18px;
    margin: 32px 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.kamar-filter-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.kamar-tab-btn {
    background: transparent;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.kamar-tab-btn.active {
    background: #0d47a1;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(13, 71, 161, 0.25);
}

.kamar-toolbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.kamar-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.kamar-toggle-wrapper input[type="checkbox"] {
    accent-color: #16a34a;
    width: 17px;
    height: 17px;
    cursor: pointer;
}

/* 1 Tombol Refresh On-Demand */
.kamar-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #0d47a1;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.kamar-refresh-btn:hover {
    background: #0d47a1;
    color: #ffffff;
    border-color: #0d47a1;
    box-shadow: 0 2px 8px rgba(13, 71, 161, 0.2);
}

.kamar-refresh-btn.loading {
    opacity: 0.75;
    cursor: not-allowed;
    pointer-events: none;
}

.kamar-refresh-btn.loading .refresh-spinner-svg {
    animation: rslgmSpin 0.75s linear infinite;
}

@keyframes rslgmSpin {
    100% { transform: rotate(360deg); }
}

/* Toast Notifikasi Feedback */
.kamar-refresh-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    z-index: 999999;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #334155;
    pointer-events: none;
}

.kamar-refresh-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Unified Cards Grid */
.unified-kamar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .unified-kamar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .unified-kamar-grid {
        grid-template-columns: 1fr;
    }
}

/* Unified Room Card */
.unified-room-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 6px 20px -4px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.unified-room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -6px rgba(15, 23, 42, 0.1);
}

/* Card Visual Media Header */
.card-media-head {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e2e8f0;
}

.card-media-head img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.unified-room-card:hover .card-media-head img {
    transform: scale(1.04);
}

.card-media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a, #0d47a1);
    color: #ffffff;
    padding: 20px;
}

.card-media-placeholder svg {
    width: 42px;
    height: 42px;
    opacity: 0.8;
    margin-bottom: 8px;
}

/* Floating Status Pills on Photo */
.floating-status-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transition: all 0.3s ease;
}

.floating-status-pill.status-available {
    background: rgba(22, 101, 52, 0.92);
    color: #ffffff;
    border: 1px solid rgba(187, 247, 208, 0.4);
}

.floating-status-pill.status-warning {
    background: rgba(180, 83, 9, 0.92);
    color: #ffffff;
    border: 1px solid rgba(254, 215, 170, 0.4);
}

.floating-status-pill.status-full {
    background: rgba(153, 27, 27, 0.92);
    color: #ffffff;
    border: 1px solid rgba(254, 202, 202, 0.4);
}

.floating-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 999px;
    letter-spacing: 0.4px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
}

/* Card Body */
.card-content-body {
    padding: 22px 22px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.room-class-sub {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #0d47a1;
    margin-bottom: 4px;
}

.room-display-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
    line-height: 1.3;
}

.room-pricing-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.room-price-val {
    font-size: 22px;
    font-weight: 900;
    color: #0d47a1;
    letter-spacing: -0.3px;
}

.room-price-unit {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

/* Bed Stock Live Box */
.card-bed-live-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 18px;
}

.bed-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    margin-bottom: 8px;
}

.bed-progress-track {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    margin-bottom: 10px;
}

.bed-progress-fill {
    height: 100%;
    background: #0d47a1;
    transition: width 0.4s ease;
}

.bed-progress-empty {
    height: 100%;
    background: #22c55e;
    transition: width 0.4s ease;
}

.bed-tri-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    gap: 4px;
}

.tri-item {
    padding: 4px 0;
}

.tri-item:not(:last-child) {
    border-right: 1px solid #e2e8f0;
}

.tri-val {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.tri-val.kosong-green { color: #16a34a; }
.tri-val.terisi-red { color: #b91c1c; }

.tri-lbl {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.3px;
}

/* Facilities Chips */
.room-facilities-block {
    margin-bottom: 16px;
    flex-grow: 1;
}

.facilities-heading {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    margin-bottom: 8px;
}

.facilities-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.facility-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* Card Informative Footer (Strictly Non-CTA) */
.card-clean-footer {
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
}

.card-clean-footer svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex-shrink: 0;
}

.sync-source-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Empty State */
.kamar-empty-filter {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
}

.kamar-empty-filter svg {
    width: 48px;
    height: 48px;
    color: #94a3b8;
    margin-bottom: 12px;
}
