/* ====== KostKu — Morphic style: indigo gradient + glass + floating nav ====== */
:root {
  --accent: #8b5cf6;          /* ungu */
  --accent2: #6366f1;         /* indigo */
  --blue: #60a5fa;
  --green: #34d399;
  --pink: #ec4899;
  --warn: #fbbf24;
  --err: #f87171;
  --text: #e8eaf6;
  --muted: #9aa3c0;
  --glass: rgba(30, 41, 82, .35);
  --glass-line: rgba(255, 255, 255, .09);
  --glass2: rgba(51, 61, 105, .55);
  --shadow: 0 10px 40px rgba(2, 6, 23, .45);
  --nav-w: 84px;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--text); font-size: 15px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
  background-attachment: fixed; min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 4px 0 18px; letter-spacing: -.02em; color: #fff; }
h2 { font-size: 16px; margin: 20px 0 10px; color: #fff; }
.muted { color: var(--muted); font-size: 13px; }
.right { text-align: right; }

/* ====== Floating nav ====== */
.floatnav {
  position: fixed; left: 18px; top: 50%; transform: translateY(-50%);
  z-index: 50; display: flex; flex-direction: column; gap: 8px;
  padding: 14px 10px; border-radius: 60px;
  background: rgba(30, 41, 82, .55); backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-line); box-shadow: var(--shadow);
}
.floatnav .flogo {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  color: #fff; font-weight: 800; font-size: 18px; margin-bottom: 6px; cursor: pointer;
}
.floatnav a.fitem {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #aab3d4; position: relative; transition: background .15s, color .15s, transform .15s;
}
.floatnav a.fitem svg { width: 20px; height: 20px; }
.floatnav a.fitem:hover { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; transform: scale(1.06); }
.floatnav a.fitem.active {
  background: linear-gradient(135deg, #8b5cf6, #6366f1); color: #fff;
  box-shadow: 0 4px 18px rgba(139, 92, 246, .45);
}
.floatnav .fgroup { width: 26px; height: 1px; margin: 4px auto; background: rgba(255, 255, 255, .14); }
.floatnav .fspace { flex: 1; }
.floatnav .fitem .tip {
  position: absolute; left: 54px; top: 50%; transform: translateY(-50%);
  background: rgba(15, 23, 42, .92); color: #fff; font-size: 12px; white-space: nowrap;
  padding: 6px 12px; border-radius: 8px; opacity: 0; pointer-events: none;
  transition: opacity .12s; border: 1px solid var(--glass-line);
}
.floatnav a.fitem:hover .tip { opacity: 1; }

/* ====== Konten ====== */
main.content { margin-left: calc(var(--nav-w) + 40px); padding: 24px 30px 40px; max-width: 1180px; }

/* ====== Kartu kaca ====== */
.card {
  background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-line); border-radius: 20px;
  padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.grid.c4 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { position: relative; overflow: hidden; }
.stat .n { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: #fff; }
.stat .n.ok { color: var(--green); }
.stat .n.bad { color: var(--err); }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--blue)); }
.stat.warn::before { background: linear-gradient(180deg, #fbbf24, #f59e0b); }
.stat.bad::before { background: linear-gradient(180deg, #f87171, #ec4899); }
.stat.info::before { background: linear-gradient(180deg, #60a5fa, #6366f1); }
.stat.ok::before { background: linear-gradient(180deg, #34d399, #10b981); }

/* ====== Tombol & form kaca ====== */
.btn, button, input, select, textarea {
  font: inherit; color: var(--text);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; padding: 8px 14px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #7c86ab; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .25);
}
select option { background: #1e2952; color: var(--text); }
button, .btn { cursor: pointer; }
.btn:hover, button:hover { border-color: var(--accent); background: rgba(255, 255, 255, .1); }
.btn.primary, button.primary {
  background: linear-gradient(135deg, #8b5cf6, #6366f1); border-color: transparent; color: #fff;
  font-weight: 600; box-shadow: 0 4px 16px rgba(139, 92, 246, .4);
}
.btn.primary:hover, button.primary:hover { filter: brightness(1.08); }
.btn.danger, button.danger { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .4); color: #f87171; }
.btn.sm, button.sm { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
form.inline { display: inline; }

/* ====== Tabel ====== */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255, 255, 255, .04); }

/* ====== Badge ====== */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge.kosong, .badge.checkout, .badge.kredit, .badge.ditolak, .badge.batal { background: rgba(148,163,184,.15); color: #cbd5e1; }
.badge.terisi, .badge.lunas, .badge.aktif, .badge.cair, .badge.disetujui, .badge.checkin { background: rgba(52,211,153,.14); color: var(--green); }
.badge.booking, .badge.trial { background: rgba(96,165,250,.14); color: var(--blue); }
.badge.maintenance, .badge.tunggu, .badge.minta { background: rgba(251,191,36,.14); color: var(--warn); }
.badge.belum { background: rgba(248,113,113,.14); color: var(--err); }
.badge.owner { background: rgba(167,139,250,.14); color: #c4b5fd; }
.badge.petugas { background: rgba(96,165,250,.14); color: var(--blue); }
.badge.superadmin { background: rgba(236,72,153,.14); color: #f9a8d4; }
.badge.mitra { background: rgba(251,191,36,.14); color: var(--warn); }

/* ====== Flash ====== */
.flash { padding: 11px 16px; border-radius: 14px; margin-bottom: 14px; font-size: 14px; backdrop-filter: blur(10px); }
.flash.ok { background: rgba(52,211,153,.12); color: #6ee7b7; border: 1px solid rgba(52,211,153,.3); }
.flash.err { background: rgba(248,113,113,.12); color: #fca5a5; border: 1px solid rgba(248,113,113,.3); }

/* ====== Kamar grid ====== */
.floor { margin-bottom: 22px; }
.floor h3 { margin: 0 0 10px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.roomgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.roomtile {
  display: block; padding: 13px 12px; border-radius: 16px; text-align: center;
  border: 1px solid var(--glass-line); background: rgba(255, 255, 255, .05);
  color: var(--text); transition: transform .12s, border-color .12s, background .12s;
}
.roomtile:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--accent); background: rgba(139, 92, 246, .12); }
.roomtile .no { font-weight: 700; font-size: 17px; }
.roomtile .who { font-size: 11px; color: var(--muted); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roomtile.s-terisi .no { color: var(--green); }
.roomtile.s-booking .no { color: var(--blue); }
.roomtile.s-maintenance .no { color: var(--warn); }

/* ====== Grafik ====== */
.bars { display: flex; align-items: flex-end; gap: 7px; height: 130px; margin-bottom: 22px; }
.bars .b { flex: 1; background: linear-gradient(180deg, #a78bfa, #6366f1);
  border-radius: 6px 6px 0 0; min-height: 3px; position: relative; }
.bars .b span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); }
.mrows { display: flex; flex-direction: column; gap: 8px; }
.mrow { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.mrow .bar { height: 10px; border-radius: 5px; }
.mrow .cap { width: 90px; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }

/* ====== Hero beranda ====== */
.hero {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(99, 102, 241, .55), rgba(139, 92, 246, .45) 60%, rgba(236, 72, 153, .35));
  border: 1px solid rgba(255, 255, 255, .16); padding: 24px 28px;
}
.hero .hero-title { font-size: 21px; font-weight: 700; color: #fff; }
.hero .hero-sub { color: rgba(255, 255, 255, .75); font-size: 13px; margin: 4px 0 16px; }
.hero .hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .hero-actions .btn, .hero .hero-actions button {
  background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); color: #fff; }
.hero .hero-actions .btn.primary {
  background: #fff; color: #4c1d95; border-color: transparent; box-shadow: 0 4px 18px rgba(0, 0, 0, .25); }
.hero .hero-right { display: flex; gap: 26px; align-items: center; }
.hero .stat-inline .n { font-size: 20px; font-weight: 700; color: #fff; }
.hero .stat-inline .n.bad { color: #fecdd3; }
.hero .stat-inline .l { color: rgba(255, 255, 255, .75); font-size: 12px; }
.wave { font-size: 18px; }

/* donut + status */
.donut-row { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.donut-box { flex: none; }
.status-list { display: flex; flex-direction: column; gap: 10px; min-width: 210px; }
.status-item { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.status-item b { margin-right: 4px; color: #fff; }
.status-item .muted { margin-left: auto; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.right-col { border-left: 1px solid rgba(255, 255, 255, .1); padding-left: 28px; min-width: 220px; }
.mini-stat .n { font-size: 22px; font-weight: 700; color: var(--green); }
.mini-stat .l { color: var(--muted); font-size: 12px; margin-bottom: 8px; }

/* area chart */
.chart-head { display: flex; align-items: baseline; gap: 12px; }
.areachart { display: block; }
.chart-labels { display: flex; margin-top: 6px; }
.chart-labels span { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted); }
.chart-placeholder { background: rgba(255, 255, 255, .04); border: 1px dashed rgba(255, 255, 255, .18);
  border-radius: 12px; padding: 26px; text-align: center; color: var(--muted); font-size: 13px; }
.mtrack { flex: 1; background: rgba(255, 255, 255, .08); border-radius: 5px; height: 10px; overflow: hidden; }
.mtrack .bar { height: 100%; border-radius: 5px; }
.mtrack .bar.c1 { background: linear-gradient(90deg, #8b5cf6, #6366f1); }
.mtrack .bar.c2 { background: linear-gradient(90deg, #60a5fa, #38bdf8); }
.mtrack .bar.c3 { background: linear-gradient(90deg, #ec4899, #f472b6); }
.mtrack .bar.c4 { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.mval { min-width: 90px; text-align: right; font-size: 13px; font-weight: 600; color: #fff; }
.roomchip { background: rgba(139, 92, 246, .18); color: #c4b5fd; font-weight: 700;
  padding: 2px 9px; border-radius: 8px; font-size: 12.5px; }
.empty-ok { background: rgba(52, 211, 153, .1); color: #6ee7b7; border-radius: 12px;
  padding: 26px; text-align: center; font-weight: 600; }

/* ====== Login (glass di atas gradient) ====== */
.login-page { display: flex; min-height: 100vh; }
.login-hero {
  flex: 1; padding: 56px 52px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.login-hero::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 340px; height: 340px;
  border-radius: 50%; background: radial-gradient(circle, rgba(139, 92, 246, .35), transparent 70%); }
.login-hero .logo-big { width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 24px; color: #fff; margin-bottom: 28px; box-shadow: 0 8px 30px rgba(139, 92, 246, .5); }
.login-hero h1 { color: #fff; font-size: 34px; line-height: 1.2; margin-bottom: 12px; }
.login-hero p { color: #b9c2e8; font-size: 15px; max-width: 400px; line-height: 1.6; }
.login-hero ul { margin: 26px 0 0; padding: 0; list-style: none; }
.login-hero li { padding: 7px 0; color: #dfe4f7; font-size: 14.5px; display: flex; gap: 10px; align-items: center; }
.login-hero li::before { content: "✓"; font-weight: 700; color: #a78bfa; }
.login-panel { width: 420px; display: flex; flex-direction: column; justify-content: center;
  padding: 40px 44px; margin: auto 48px; border-radius: 24px;
  background: rgba(255, 255, 255, .06); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: var(--shadow); }
.login-panel h2 { font-size: 20px; margin: 0 0 4px; color: #fff; }
.login-panel .sub { color: var(--muted); margin-bottom: 20px; font-size: 13.5px; }
.login-panel label { font-size: 12.5px; font-weight: 600; color: var(--text); display: block; margin-bottom: 5px; }
.login-panel input { width: 100%; padding: 10px 13px; border-radius: 10px; margin-bottom: 14px; font-size: 14px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: #fff; }
.login-panel button { width: 100%; padding: 10px; border-radius: 10px; font-size: 14px; }
.login-panel .demo { margin-top: 18px; background: rgba(255, 255, 255, .05);
  border: 1px solid var(--glass-line); border-radius: 12px; padding: 12px 14px; }
.login-panel .demo b { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.login-panel .demo table { font-size: 12px; }
.login-panel .demo td { padding: 3px 8px 3px 0; border: none; }
.login-panel .demo code { background: rgba(255, 255, 255, .1); border-radius: 6px; padding: 1px 6px; font-size: 11.5px; color: #c4b5fd; }
@media (max-width: 900px) { .login-hero { display: none; } .login-panel { width: 100%; margin: 24px; } }

/* ====== Kwitansi ====== */
.receipt { max-width: 560px; margin: 0 auto; background: #fff; color: #17222e;
  border-radius: 16px; padding: 30px; box-shadow: var(--shadow); }
.receipt .rhead { text-align: center; border-bottom: 2px solid #6366f1; padding-bottom: 14px; }
.receipt .rhead .name { font-size: 20px; font-weight: 700; color: #4c1d95; }
.receipt .rhead .muted { color: #64748b; }
.receipt .rows { margin: 18px 0; }
.receipt .rrow { display: flex; justify-content: space-between; padding: 6px 0; }
.receipt .rrow .k { color: #64748b; }
.receipt .total { border-top: 1px solid #e2e8f0; font-weight: 700; font-size: 18px; margin-top: 6px; }
.receipt .foot { text-align: center; color: #94a3b8; font-size: 12px; margin-top: 22px;
  border-top: 1px solid #e2e8f0; padding-top: 12px; }
.masked { letter-spacing: 2px; color: #94a3b8; }
@media print {
  .floatnav, .noprint, .flash { display: none !important; }
  body, main.content { background: #fff; margin: 0; padding: 0; }
  .receipt { box-shadow: none; max-width: 100%; }
}
