/* ==========================================================================
   LOGINPAGE 26 - SMART KOST HUB (Single-Screen Resident Dashboard)
   ========================================================================== */
:root {
  --bg: #f4f3ef;
  --white: #ffffff;
  --forest: #14532d;
  --sage: #16a34a;
  --amber: #d97706;
  --rose: #dc2626;
  --ink: #1c1917;
  --sub: #57534e;
  --muted: #78716c;
  --border: #e5e2da;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; max-width: 100%; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--ink); min-height: 100vh; line-height: 1.5; padding-bottom: 76px; }
#app-loader { position: fixed; inset: 0; z-index: 9999; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; transition: opacity 0.3s, visibility 0.3s; }
#app-loader.fade-out { opacity: 0; visibility: hidden; }
.kost-spinner { width: 36px; height: 36px; border: 3px solid #dcfce7; border-top-color: var(--forest); border-radius: 50%; animation: spin 0.75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.kost-shell { width: 100%; max-width: 480px; margin: 0 auto; padding: 18px 16px 24px; }
.kost-shell.centered { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-bottom: 20px; }

.kost-banner {
  position: relative; height: 205px; border-radius: 22px; overflow: hidden; margin-bottom: 14px;
  background: #14532d; box-shadow: 0 16px 34px -12px rgba(20,83,45,0.45);
}
.kost-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s ease, transform 6s ease; transform: scale(1.04); }
.kost-slide.active { opacity: 1; transform: scale(1); }
.kost-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kost-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,83,45,0.45) 0%, rgba(20,83,45,0.15) 45%, rgba(12,35,20,0.92) 100%); z-index: 2; }
.kost-banner-top { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kost-banner-bot { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 3; color: #fff; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.kost-dots { display: flex; gap: 5px; flex-shrink: 0; }
.kost-dot-btn { width: 18px; height: 5px; border-radius: 9999px; border: none; background: rgba(255,255,255,0.4); cursor: pointer; transition: all 0.25s; }
.kost-dot-btn.active { width: 28px; background: #fff; }
.kost-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kost-logo { width: 36px; height: 36px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kost-logo img { width: 22px; height: 22px; object-fit: contain; }
.kost-title { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kost-sub { font-size: 11px; color: #dcfce7; }
.kost-pill { font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 9999px; background: rgba(16,185,129,0.28); border: 1px solid rgba(110,231,183,0.45); color: #d1fae5; flex-shrink: 0; backdrop-filter: blur(8px); }
.kost-addr { font-size: 11px; color: #bbf7d0; display: flex; align-items: center; gap: 5px; margin-top: 2px; }

.kost-card { background: var(--white); border: 1px solid var(--border); border-radius: 20px; padding: 18px; box-shadow: 0 10px 26px -12px rgba(0,0,0,0.08); margin-bottom: 14px; }
.kost-pane { display: none; }
.kost-pane.active { display: block; }

.kost-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; }
.kost-tab-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border: none; border-radius: 9px; background: transparent; font-family: inherit; font-size: 11.5px; font-weight: 700; color: var(--sub); cursor: pointer; }
.kost-tab-btn.active { background: var(--forest); color: #fff; }

.kost-field { margin-bottom: 12px; }
.kost-label { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.kost-input-wrap { position: relative; display: flex; align-items: center; }
.kost-input-icon { position: absolute; left: 14px; color: var(--forest); font-size: 14px; pointer-events: none; }
.kost-input { width: 100%; height: 44px; padding: 0 42px 0 40px; border-radius: 10px; background: #fafaf9; border: 1px solid #d6d3cd; color: var(--ink); font-family: inherit; font-size: 14px; font-weight: 600; outline: none; }
.kost-input:focus { background: #fff; border-color: var(--forest); }
.kost-eye-btn { position: absolute; right: 10px; background: none; border: none; color: var(--muted); cursor: pointer; padding: 6px; }

.btn-kost-primary { width: 100%; height: 44px; border: none; border-radius: 10px; background: var(--forest); color: #fff; font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-kost-secondary { width: 100%; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--ink); font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-kost-danger { width: 100%; height: 44px; border: 1px solid #fecaca; border-radius: 10px; background: #fef2f2; color: var(--rose); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

.kost-scanner { background: var(--bg); border: 1px dashed #86efac; border-radius: 14px; padding: 16px; text-align: center; margin-bottom: 12px; }
.kost-viewfinder { position: relative; width: 60px; height: 60px; margin: 0 auto 10px; border-radius: 14px; background: #fff; border: 1px solid #86efac; display: flex; align-items: center; justify-content: center; color: var(--forest); font-size: 24px; overflow: hidden; }
.kost-laser { position: absolute; left: 6px; right: 6px; height: 2px; background: var(--forest); animation: scanLine 2s infinite; }
@keyframes scanLine { 0%, 100% { top: 8px; } 50% { top: 50px; } }
.kost-error { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: 10px; background: #fef2f2; border: 1px solid #fecaca; color: var(--rose); font-size: 12px; font-weight: 600; }

.info-block { margin-bottom: 14px; }
.info-block-title { font-size: 13px; font-weight: 800; color: var(--forest); margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.info-list { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--sub); }
.info-list li { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; background: var(--bg); border-radius: 10px; }
.info-list i { color: var(--sage); margin-top: 2px; flex-shrink: 0; }

.kost-meta-box { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 11.5px; display: flex; flex-direction: column; gap: 5px; margin-top: 12px; }
.kost-meta-row { display: flex; justify-content: space-between; align-items: center; }
.kost-meta-row span:first-child { color: var(--sub); }
.kost-meta-row span:last-child { font-family: var(--font-mono); font-weight: 700; }

.kost-quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.kost-quick-tile {
  background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  box-shadow: 0 8px 20px -10px rgba(0,0,0,0.08);
}
.kost-quick-badge {
  width: 34px; height: 34px; border-radius: 10px; margin-bottom: 7px;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.kost-quick-val { font-size: 12.5px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.kost-quick-lbl { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.kost-notice-card {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 16px; padding: 14px;
  display: flex; align-items: flex-start; gap: 10px; font-size: 12px; color: #166534;
}
.kost-notice-card i { font-size: 16px; margin-top: 2px; flex-shrink: 0; }

.kost-pkg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .kost-pkg-grid { grid-template-columns: 1fr; } }
.kost-pkg-card { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 13px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }

.kost-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: rgba(255,255,255,0.95); border-top: 1px solid var(--border); backdrop-filter: blur(12px); display: flex; justify-content: center; }
.kost-bottom-inner { width: 100%; max-width: 480px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px; }
.kost-nav-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border: none; background: none; color: var(--muted); font-family: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.kost-nav-btn.active { color: var(--forest); }
.kost-nav-btn i { font-size: 16px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(28,25,23,0.65); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop.open { display: flex; }
.modal-kost { width: 100%; max-width: 360px; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 20px; }
.qris-box { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px; text-align: center; margin: 12px 0; }
.qris-box img { width: 145px; height: 145px; object-fit: contain; margin: 6px auto; display: block; }
