/* ============================================
   MUKTAMAR — Hotel Pendataan App
   Theme: Refined Islamic Green × Gold
   ============================================ */

:root {
    --green-dark:   #0d3320;
    --green-mid:    #1a5c38;
    --green-light:  #2d8653;
    --green-pale:   #e8f5ed;
    --gold:         #c9a227;
    --gold-light:   #f0d875;
    --gold-pale:    #fdf8e8;
    --white:        #ffffff;
    --gray-50:      #f9fafb;
    --gray-100:     #f3f4f6;
    --gray-200:     #e5e7eb;
    --gray-400:     #9ca3af;
    --gray-600:     #4b5563;
    --gray-800:     #1f2937;
    --red:          #dc2626;
    --red-pale:     #fef2f2;
    --blue:         #1d4ed8;
    --blue-pale:    #eff6ff;
    --sidebar-w:    260px;
    --radius:       10px;
    --shadow:       0 2px 12px rgba(0,0,0,.08);
    --shadow-md:    0 4px 24px rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--green-dark);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    z-index: 100;
    transition: transform .3s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.brand-icon { font-size: 28px; }
.brand-title {
    font-family: 'Amiri', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 1px;
    display: block;
    line-height: 1;
}
.brand-sub { font-size: 10px; color: rgba(255,255,255,.5); letter-spacing: .5px; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-section-label {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,.3);
    letter-spacing: 1.5px;
    padding: 16px 8px 6px;
    text-transform: uppercase;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all .2s;
    margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: var(--green-mid); color: var(--gold-light); font-weight: 600; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.admin-info { display: flex; align-items: center; gap: 10px; }
.admin-avatar {
    width: 36px; height: 36px;
    background: var(--gold);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: var(--green-dark);
    flex-shrink: 0;
}
.admin-name { font-size: 13px; color: rgba(255,255,255,.9); font-weight: 500; }
.logout-link { font-size: 11px; color: rgba(255,255,255,.4); text-decoration: none; }
.logout-link:hover { color: #f87171; }

/* ============================================
   MAIN
   ============================================ */
.main-wrap {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky; top: 0; z-index: 50;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.toggle-sidebar {
    background: none; border: none; font-size: 20px;
    cursor: pointer; color: var(--gray-600); display: none;
    padding: 4px 8px; border-radius: 6px;
}
.toggle-sidebar:hover { background: var(--gray-100); }
.topbar-title { font-size: 15px; font-weight: 600; color: var(--gray-800); }

.content { padding: 24px; flex: 1; max-width: 1200px; }

/* ============================================
   ALERTS
   ============================================ */
.alert {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; margin: 0 24px;
    border-left: 4px solid;
    font-size: 14px; font-weight: 500;
}
.alert-success { background: #f0fdf4; border-color: #22c55e; color: #15803d; }
.alert-error   { background: var(--red-pale); border-color: var(--red); color: var(--red); }
.alert-close   { background: none; border: none; font-size: 18px; cursor: pointer; color: inherit; opacity: .6; }

/* ============================================
   CARDS & STATS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--green-light);
    display: flex; align-items: center; gap: 16px;
}
.stat-card.gold  { border-color: var(--gold); }
.stat-card.blue  { border-color: var(--blue); }
.stat-card.red   { border-color: var(--red); }

.stat-icon { font-size: 28px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--green-dark); line-height: 1; }
.stat-label { font-size: 12px; color: var(--gray-400); margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
}
.card-title { font-size: 15px; font-weight: 600; color: var(--gray-800); }
.card-body { padding: 20px; }

/* ============================================
   TABLE
   ============================================ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
    background: var(--green-dark);
    color: rgba(255,255,255,.9);
    padding: 11px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--gray-100); transition: background .15s; }
tbody tr:hover { background: var(--gray-50); }
tbody td { padding: 11px 14px; vertical-align: middle; }
tbody tr:last-child { border-bottom: none; }

/* ============================================
   BADGES & TAGS
   ============================================ */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 600; letter-spacing: .3px;
    white-space: nowrap;
}
.badge-green  { background: var(--green-pale); color: var(--green-mid); }
.badge-gold   { background: var(--gold-pale);  color: #92701a; }
.badge-gray   { background: var(--gray-100);   color: var(--gray-600); }
.badge-blue   { background: var(--blue-pale);  color: var(--blue); }
.badge-red    { background: var(--red-pale);   color: var(--red); }
.badge-provinsi { background: #eff6ff; color: #1d4ed8; }
.badge-custom   { background: #fef9c3; color: #854d0e; }

.stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border-radius: 8px;
    font-size: 13px; font-weight: 600;
    border: none; cursor: pointer;
    text-decoration: none; transition: all .2s;
    font-family: inherit; white-space: nowrap;
}
.btn-primary  { background: var(--green-mid); color: var(--white); }
.btn-primary:hover  { background: var(--green-dark); }
.btn-gold     { background: var(--gold); color: var(--green-dark); }
.btn-gold:hover { background: #b8911f; }
.btn-danger   { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #b91c1c; }
.btn-outline  { background: transparent; color: var(--green-mid); border: 1.5px solid var(--green-mid); }
.btn-outline:hover { background: var(--green-pale); }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-icon { padding: 6px 10px; }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.form-label .required { color: var(--red); margin-left: 2px; }

.form-control {
    width: 100%; padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px; font-size: 14px;
    font-family: inherit; color: var(--gray-800);
    background: var(--white);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.form-control:focus { border-color: var(--green-mid); box-shadow: 0 0 0 3px rgba(45,134,83,.12); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input { width: 16px; height: 16px; accent-color: var(--green-mid); cursor: pointer; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 200;
    align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--white); border-radius: 14px;
    box-shadow: var(--shadow-md);
    width: 94%; max-width: 560px;
    max-height: 90vh; overflow-y: auto;
    animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity:0; transform: scale(.95) translateY(10px); } to { opacity:1; transform: none; } }
.modal-header {
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--green-dark); }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--gray-400); line-height: 1; }
.modal-body { padding: 20px 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--gray-100); display: flex; gap: 10px; justify-content: flex-end; }

/* ============================================
   PROGRESS / CAPACITY BAR
   ============================================ */
.progress-bar-wrap { display: flex; align-items: center; gap: 10px; }
.progress-track { flex: 1; height: 8px; background: var(--gray-100); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; transition: width .4s ease; }
.progress-fill.low    { background: var(--green-light); }
.progress-fill.mid    { background: var(--gold); }
.progress-fill.high   { background: #f97316; }
.progress-fill.full   { background: var(--red); }
.progress-text { font-size: 12px; color: var(--gray-400); white-space: nowrap; min-width: 40px; text-align: right; }

/* ============================================
   BINTANG FILTER TABS
   ============================================ */
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-tab {
    padding: 6px 14px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
    border: 1.5px solid var(--gray-200);
    background: var(--white); color: var(--gray-600);
    cursor: pointer; transition: all .2s; text-decoration: none;
}
.filter-tab:hover { border-color: var(--green-light); color: var(--green-mid); }
.filter-tab.active { background: var(--green-mid); border-color: var(--green-mid); color: var(--white); }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state { text-align: center; padding: 48px 20px; color: var(--gray-400); }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; display: block; opacity: .5; }
.empty-state-text { font-size: 14px; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    background: var(--green-dark);
    display: flex; align-items: center; justify-content: center;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 40px,
        rgba(255,255,255,.02) 40px,
        rgba(255,255,255,.02) 80px
    );
}
.login-box {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    width: 100%; max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-brand { text-align: center; margin-bottom: 32px; }
.login-brand-icon { font-size: 48px; display: block; margin-bottom: 10px; }
.login-brand-title {
    font-family: 'Amiri', serif;
    font-size: 22px; font-weight: 700;
    color: var(--green-dark);
    display: block; margin-bottom: 4px;
}
.login-brand-sub { font-size: 12px; color: var(--gray-400); }

/* ============================================
   REKAP / SUMMARY
   ============================================ */
.rekap-hotel-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
}
.rekap-hotel-header {
    background: var(--green-dark);
    color: var(--white);
    padding: 14px 18px;
    display: flex; align-items: center; justify-content: space-between;
}
.rekap-hotel-name { font-size: 15px; font-weight: 600; }
.rekap-hotel-body { padding: 16px 18px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-wrap { margin-left: 0; }
    .toggle-sidebar { display: block; }
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .content { padding: 16px; }
}

/* ============================================
   UTILITIES
   ============================================ */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap { display: flex; gap: 8px; align-items: center; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--gray-400); font-size: 12px; }
.fw-600 { font-weight: 600; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.w-100 { width: 100%; }
