/* =====================================================
   AquaWash Laundry — Modern Aqua/Mint Theme
   Fully responsive, smooth micro-interactions
   ===================================================== */

:root {
  --primary: #0ea5a4;          /* teal */
  --primary-dark: #0b7d7c;
  --primary-light: #5eead4;
  --accent: #38bdf8;           /* sky */
  --ink: #0f2b2e;
  --muted: #6b8b8c;
  --line: #e3eef0;
  --bg: #f4f9f9;
  --card: #ffffff;
  --blue: #2563eb;
  --amber: #d97706;
  --red: #dc2626;
  --green: #059669;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(15, 43, 46, .06);
  --shadow: 0 12px 30px rgba(15, 43, 46, .10);
  --shadow-lg: 0 24px 60px rgba(15, 43, 46, .16);
  --sidebar-w: 260px;
  --trans: .28s cubic-bezier(.4, 0, .2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------------- AUTH / LOGIN ---------------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 10% -10%, #cffafe 0%, transparent 55%),
    radial-gradient(1000px 500px at 110% 110%, #99f6e4 0%, transparent 50%),
    linear-gradient(135deg, #ecfeff 0%, #f0fdfa 100%);
}

/* animated bubbles */
.bubble {
  position: absolute;
  bottom: -120px;
  border-radius: 50%;
  background: rgba(94, 234, 212, .35);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, .6);
  animation: rise linear infinite;
  z-index: 0;
}
@keyframes rise {
  from { transform: translateY(0) scale(1); opacity: 0; }
  10%  { opacity: 1; }
  to   { transform: translateY(-110vh) scale(1.3); opacity: 0; }
}

.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 410px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 26px;
  padding: 40px 34px;
  box-shadow: var(--shadow-lg);
  animation: pop .5s cubic-bezier(.2, .8, .2, 1);
}
@keyframes pop {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.brand {
  display: flex; align-items: center; gap: 12px;
  justify-content: center; margin-bottom: 6px;
}
.brand-logo {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-size: 26px;
  box-shadow: 0 8px 20px rgba(14, 165, 164, .4);
}
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.auth-sub { text-align: center; color: var(--muted); margin: 8px 0 26px; font-size: 14px; }

/* ---------------- FORM ---------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color var(--trans), box-shadow var(--trans);
}
.input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(14, 165, 164, .12);
}
textarea { resize: vertical; min-height: 84px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border: none; border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 700; font-family: inherit;
  cursor: pointer;
  transition: transform var(--trans), box-shadow var(--trans), background var(--trans), opacity var(--trans);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; box-shadow: 0 8px 20px rgba(14, 165, 164, .35);
}
.btn-primary:hover { box-shadow: 0 12px 26px rgba(14, 165, 164, .45); transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-ghost { background: #eef7f7; color: var(--primary-dark); }
.btn-ghost:hover { background: #e0f2f1; }
.btn-danger { background: #fee2e2; color: var(--red); }
.btn-danger:hover { background: #fecaca; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 10px; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 11px; }

/* ---------------- LAYOUT ---------------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0d4746 0%, #0a3736 100%);
  color: #cfeeed;
  position: fixed; inset: 0 auto 0 0;
  padding: 22px 16px;
  display: flex; flex-direction: column;
  z-index: 50;
  transition: transform var(--trans);
}
.sidebar .brand { justify-content: flex-start; margin-bottom: 26px; padding: 0 6px; }
.sidebar .brand-name { color: #fff; font-size: 19px; }
.sidebar-role {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--primary-light); margin: 0 8px 10px; font-weight: 700;
}
.nav-item {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 14px; border-radius: 13px;
  color: #b6dbda; font-weight: 600; font-size: 14.5px;
  margin-bottom: 4px;
  transition: background var(--trans), color var(--trans), transform var(--trans);
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: translateX(3px); }
.nav-item.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; box-shadow: 0 8px 18px rgba(14, 165, 164, .35);
}
.nav-item .ico { width: 20px; text-align: center; font-size: 17px; }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
.user-chip {
  display: flex; align-items: center; gap: 11px; padding: 8px 6px; margin-bottom: 8px;
}
.avatar {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
}
.user-chip .nm { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.2; }
.user-chip .rl { font-size: 11.5px; color: var(--primary-light); }

/* main */
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244, 249, 249, .85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 14px 26px;
  display: flex; align-items: center; gap: 14px;
}
.hamburger {
  display: none; width: 42px; height: 42px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); font-size: 20px;
  cursor: pointer; color: var(--ink);
}
.page-title { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.page-sub { font-size: 13px; color: var(--muted); }
.topbar-spacer { flex: 1; }
.content { padding: 26px; max-width: 1240px; margin: 0 auto; }

/* ---------------- CARDS / STATS ---------------- */
.stat-grid {
  display: grid; gap: 18px; margin-bottom: 24px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.stat {
  background: var(--card); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  position: relative; overflow: hidden;
  transition: transform var(--trans), box-shadow var(--trans);
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat::after {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, .22), transparent 70%);
}
.stat-ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-size: 22px; margin-bottom: 14px; color: #fff;
}
.si-teal  { background: linear-gradient(135deg, #0ea5a4, #2dd4bf); }
.si-blue  { background: linear-gradient(135deg, #2563eb, #38bdf8); }
.si-amber { background: linear-gradient(135deg, #d97706, #fbbf24); }
.si-green { background: linear-gradient(135deg, #059669, #34d399); }
.stat-val { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 600; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  margin-bottom: 22px; overflow: hidden;
}
.card-head {
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card-head h3 { font-size: 16px; font-weight: 800; }
.card-head .spacer { flex: 1; }
.card-body { padding: 22px; }
.card-body.p0 { padding: 0; }

/* ---------------- TABLE ---------------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; padding: 14px 18px; background: #f0f8f8;
  font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); font-weight: 700; white-space: nowrap;
}
table.data td { padding: 14px 18px; border-top: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:hover, table.data tr:hover td { background: #f8fcfc; }
.t-strong { font-weight: 700; }
.t-muted { color: var(--muted); font-size: 13px; }
.row-actions { display: flex; gap: 7px; }

/* ---------------- BADGES ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.badge-blue  { background: #dbeafe; color: #1d4ed8; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-teal  { background: #ccfbf1; color: #0f766e; }
.badge-gray  { background: #e5eaea; color: #526769; }
.badge-green { background: #d1fae5; color: #047857; }
.badge-red   { background: #fee2e2; color: #b91c1c; }

/* ---------------- ALERT / FLASH ---------------- */
.alert {
  padding: 13px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
  animation: slideDown .4s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; } }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ---------------- MISC ---------------- */
.grid-2 { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.grid-3 { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.flex { display: flex; align-items: center; gap: 10px; }
.gap-sm { gap: 8px; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search-box { flex: 1; min-width: 180px; }
.empty {
  text-align: center; padding: 46px 20px; color: var(--muted);
}
.empty .em-ico { font-size: 46px; margin-bottom: 10px; opacity: .5; }
.text-right { text-align: right; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* toggle switch untuk status bayar */
label.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }

/* item builder pada form transaksi */
.item-row {
  display: grid; grid-template-columns: 2fr 1fr 1.2fr auto; gap: 10px;
  align-items: end; margin-bottom: 10px;
  padding: 12px; background: #f7fbfb; border-radius: var(--radius-sm); border: 1px solid var(--line);
}
.item-row .field { margin: 0; }
.summary-box {
  background: linear-gradient(135deg, #0d4746, #0a3736); color: #fff;
  border-radius: var(--radius); padding: 22px;
}
.summary-box .line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: #b6dbda; }
.summary-box .total { border-top: 1px solid rgba(255,255,255,.15); margin-top: 8px; padding-top: 12px; }
.summary-box .total .val { font-size: 24px; font-weight: 800; color: #fff; }

/* overlay for mobile sidebar */
.overlay {
  display: none; position: fixed; inset: 0; background: rgba(10, 40, 40, .45);
  z-index: 45; backdrop-filter: blur(2px);
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 980px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .main { margin-left: 0; }
  .hamburger { display: grid; place-items: center; }
  .overlay.show { display: block; }
  .content { padding: 18px; }
  .topbar { padding: 12px 16px; }
  .item-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .auth-card { padding: 30px 22px; }
  .stat-val { font-size: 22px; }
  .item-row { grid-template-columns: 1fr; }
}

/* ---------------- PRINT (NOTA) ---------------- */
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
}
