/* بوابة العميلة — ألوان البراند: زيتوني #7E7C24 وتراكوتا #AD7A64 */
:root {
  --bg: #f4f4ef;
  --surface: #fff;
  --ink: #17170f;
  --muted: #6d6f63;
  --line: #e2e2d8;
  --olive: #7e7c24;
  --olive-soft: #f0efd8;
  --clay: #ad7a64;
  --clay-soft: #f6e8e1;
  --danger: #b42318;
  --radius: 14px;
  --shadow: 0 18px 44px rgba(23, 23, 15, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.portal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.portal-top img { height: 34px; }

.portal-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  display: grid;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

h1 { margin: 0 0 6px; font-size: 24px; }
h2 { margin: 0 0 14px; font-size: 17px; }
.lede { margin: 0 0 18px; color: var(--muted); line-height: 1.6; }
.note { margin: 14px 0 0; color: var(--muted); font-size: 13.5px; text-align: center; }
.note a { color: var(--olive); font-weight: 600; }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; margin-bottom: 6px; font-size: 13.5px; color: var(--muted); }
.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.field input:focus { outline: 2px solid var(--olive-soft); border-color: var(--olive); }
.code-input { text-align: center; letter-spacing: 10px; font-size: 22px; font-weight: 700; }

.checkbox { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; font-size: 14px; }

.primary {
  display: block;
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--olive);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}
.primary:disabled { opacity: .55; cursor: not-allowed; }
.as-link { display: grid; place-items: center; text-decoration: none; margin-top: 16px; }

.ghost {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  color: var(--ink);
  font-size: 13.5px;
}
.row-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }

.error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecea;
  color: var(--danger);
  font-size: 13.5px;
}

.hello .stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.hello .stat-row > div {
  background: var(--olive-soft);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
}
.hello .stat-row strong { display: block; font-size: 22px; }
.hello .stat-row span { font-size: 12.5px; color: var(--muted); }

.appt {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.appt.past { opacity: .72; }
.appt-when { font-weight: 700; margin-bottom: 4px; }
.appt-what { color: var(--muted); font-size: 14px; }
.appt-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 10px; }
.tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--clay-soft);
  color: #7a4c3a;
}
.tag.ok { background: var(--olive-soft); color: #53521a; }
.tag.off { background: #f1f1ee; color: var(--muted); }
.link-danger { border: 0; background: none; color: var(--danger); font-size: 13.5px; font-weight: 600; }

.pack { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.bar { height: 8px; border-radius: 999px; background: var(--line); margin-top: 10px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--clay); }

.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translate(-50%, -30px);
  background: var(--ink);
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  opacity: 0;
  transition: 180ms ease;
  z-index: 50;
  max-width: 92vw;
  text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 420px) {
  .hello .stat-row { grid-template-columns: repeat(3, 1fr); }
  .hello .stat-row strong { font-size: 19px; }
}
