:root {
  --deep: #012027;
  --petrol: #01323a;
  --teal: #046b78;
  --aqua: #82cad1;
  --lime: #cbd300;
  --gold: #c5af87;
  --ink: #1e353a;
  --muted: #6a7e83;
  --line: #dbe6e7;
  --canvas: #edf3f4;
  --white: #fff;
  --danger: #9c3e3e;
  --success: #26705d;
  --warning: #806d1e;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 0%, rgba(130, 202, 209, .22), transparent 32rem),
    var(--canvas);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.shell { width: min(100% - 32px, 1320px); margin: 0 auto; padding: 28px 0 52px; }

.login-card {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  width: min(100%, 820px);
  min-height: 470px;
  margin: 7vh auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 85px rgba(1, 50, 58, .17);
}
.login-art {
  position: relative;
  display: grid;
  place-content: center;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(rgba(1, 50, 58, .78), rgba(1, 32, 39, .9)),
    url('/iftar-ornament.png') right center / auto 110% no-repeat,
    var(--petrol);
}
.moon { font-family: Georgia, serif; font-size: 6rem; line-height: 1; text-shadow: 0 15px 40px rgba(0, 0, 0, .2); }
.accent-lines { display: flex; justify-content: center; gap: 16px; margin-top: 22px; }
.accent-lines span { width: 80px; height: 7px; border-radius: 999px; }
.accent-lines span:first-child { background: var(--aqua); }
.accent-lines span:last-child { background: var(--lime); }
.login-content { padding: 58px 54px; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.login-content h1, .heading-row h1 { margin: 0; color: var(--petrol); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.login-content h1 { font-size: 2.3rem; }
.login-intro { margin: 12px 0 28px; color: var(--muted); }
label { display: block; margin-bottom: 7px; color: var(--petrol); font-weight: 700; }
input { width: 100%; min-height: 47px; padding: 10px 12px; border: 1px solid #c8d8da; border-radius: 8px; background: #fff; color: var(--ink); }
input:focus { outline: 3px solid rgba(130, 202, 209, .28); border-color: var(--teal); }
.primary, .secondary, .ghost { min-height: 46px; padding: 10px 17px; border-radius: 8px; font-weight: 750; }
.primary { border: 1px solid var(--teal); color: #fff; background: var(--teal); box-shadow: 0 9px 22px rgba(4, 107, 120, .18); }
.secondary { border: 1px solid #bcd0d2; color: var(--petrol); background: #fff; }
.ghost { border: 1px solid rgba(255, 255, 255, .35); color: #fff; background: rgba(255, 255, 255, .08); }
.login-content .primary { width: 100%; margin-top: 18px; }
.error { margin-top: 13px; padding: 11px 13px; border: 1px solid #eecbcb; border-radius: 8px; color: var(--danger); background: #faeeee; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--petrol) 64%, var(--deep));
  box-shadow: 0 16px 45px rgba(1, 50, 58, .15);
}
.brand, .top-actions { display: flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--aqua); background: rgba(255, 255, 255, .1); font-size: 1.5rem; }
.brand strong, .brand small { display: block; }
.brand small { color: #c9e7e9; font-size: .78rem; }

.heading-row { display: flex; justify-content: space-between; align-items: end; gap: 28px; padding: 36px 4px 24px; }
.heading-row h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.heading-row p:not(.eyebrow) { max-width: 720px; margin: 8px 0 0; color: var(--muted); }

.metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; margin-bottom: 18px; }
.metrics article { padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 7px 22px rgba(1, 50, 58, .05); }
.metrics span { display: block; color: var(--muted); font-size: .78rem; }
.metrics strong { display: block; margin-top: 3px; color: var(--petrol); font-size: 1.65rem; }

.workspace { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 14px 42px rgba(1, 50, 58, .08); }
.toolbar { display: grid; grid-template-columns: minmax(240px, 1.5fr) minmax(210px, .75fr) auto; align-items: end; gap: 13px; padding: 18px; border-bottom: 1px solid var(--line); background: #f8fafa; }
.toolbar label { font-size: .82rem; }
.compact { min-height: 47px; }
.dashboard-error { margin: 16px 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 15px; border-bottom: 1px solid #e6eeee; text-align: left; vertical-align: top; }
th { color: #5d7479; background: #f5f8f8; font-size: .73rem; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
td { font-size: .88rem; }
td strong, .sub, .code { display: block; }
.sub { margin-top: 3px; color: var(--muted); font-size: .78rem; }
.code { margin-top: 3px; color: #71858a; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .7rem; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.badge-success { color: var(--success); background: #e6f3ee; }
.badge-danger { color: var(--danger); background: #f8e9e9; }
.badge-warning { color: var(--warning); background: #f4f0df; }
.badge-neutral { color: #5c7176; background: #edf2f3; }
.empty { padding: 36px; color: var(--muted); text-align: center; }
.table-footer { display: flex; justify-content: space-between; gap: 18px; padding: 12px 17px; color: var(--muted); background: #f8fafa; font-size: .77rem; }

@media (max-width: 960px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 18px, 1320px); padding-top: 10px; }
  .login-card { grid-template-columns: 1fr; margin-top: 0; }
  .login-art { min-height: 180px; }
  .moon { font-size: 4.5rem; }
  .login-content { padding: 32px 24px; }
  .topbar, .heading-row, .table-footer { align-items: stretch; flex-direction: column; }
  .top-actions { width: 100%; }
  .top-actions button { flex: 1; }
  .heading-row .accent-lines { justify-content: flex-start; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { grid-template-columns: 1fr; }
}
