
/* ShiftApron — web app styles */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #e3e6ea;
  --text: #1c2430;
  --muted: #66707d;
  --accent: #e0662e;
  --accent-dark: #c4531f;
  --accent-soft: #fdf0e9;
  --green: #1f8a5d;
  --green-soft: #e7f5ee;
  --red: #c43d3d;
  --red-soft: #fbeaea;
  --blue: #2e6fe0;
  --blue-soft: #eaf1fd;
  --amber: #a4700c;
  --amber-soft: #fdf5e2;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(20, 30, 40, 0.07), 0 4px 14px rgba(20, 30, 40, 0.05);
  font-size: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.7rem; margin: 0 0 4px; }
h2 { font-size: 1.25rem; margin: 24px 0 10px; }
h3 { font-size: 1.02rem; margin: 0 0 6px; }

/* ---------- top nav ---------- */
nav.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 4px;
  padding: 0 16px; height: 56px;
}
.brand {
  font-weight: 800; font-size: 1.15rem; color: var(--text);
  display: flex; align-items: center; gap: 8px; margin-right: 12px; text-decoration: none !important;
}
.brand .logo {
  width: 28px; height: 28px; border-radius: 8px; background: var(--accent);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}
nav.topbar a.navlink {
  color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 0.94rem;
  text-decoration: none !important;
}
nav.topbar a.navlink:hover { background: var(--bg); color: var(--text); }
nav.topbar a.navlink.active { color: var(--accent-dark); background: var(--accent-soft); }
.nav-spacer { flex: 1; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.bell { position: relative; cursor: pointer; padding: 8px; border-radius: 8px; color: var(--muted); background: none; border: none; font-size: 18px; }
.bell:hover { background: var(--bg); }
.bell .dot {
  position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; border: none;
}
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }

/* ---------- layout ---------- */
main { max-width: 980px; margin: 0 auto; padding: 24px 16px 80px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sub { color: var(--muted); font-size: 0.94rem; margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); margin-bottom: 12px;
}
.card.clickable { cursor: pointer; transition: border-color 0.12s, transform 0.12s; }
.card.clickable:hover { border-color: var(--accent); }
.card-title { font-weight: 700; font-size: 1.05rem; }
.meta { color: var(--muted); font-size: 0.88rem; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- badges & pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 650; letter-spacing: 0.01em;
}
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.gray { background: #eef0f3; color: var(--muted); }
.badge.accent { background: var(--accent-soft); color: var(--accent-dark); }
.pay { font-weight: 750; color: var(--green); white-space: nowrap; }

/* ---------- buttons ---------- */
button, .btn {
  font: inherit; cursor: pointer; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); padding: 9px 16px; border-radius: 9px; font-weight: 600; font-size: 0.92rem;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important;
}
button:hover, .btn:hover { background: var(--bg); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-danger { color: var(--red); border-color: #f0cfcf; }
.btn-danger:hover { background: var(--red-soft); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-sm { padding: 5px 11px; font-size: 0.84rem; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- forms ---------- */
label.field { display: block; margin-bottom: 14px; font-weight: 600; font-size: 0.9rem; }
label.field > span { display: block; margin-bottom: 5px; }
label.field .hint { font-weight: 400; color: var(--muted); font-size: 0.82rem; margin-top: 3px; }
input[type='text'], input[type='email'], input[type='number'], input[type='date'], input[type='time'],
input[type='datetime-local'], input[type='password'], select, textarea {
  font: inherit; width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border);
  border-radius: 999px; cursor: pointer; font-weight: 500; font-size: 0.88rem; background: var(--surface);
}
.checks label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
.checks input { accent-color: var(--accent); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters select, .filters input { width: auto; padding: 7px 10px; font-size: 0.88rem; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.switch input { width: 36px; height: 20px; accent-color: var(--accent); }

/* ---------- notices ---------- */
.notice {
  border-radius: 10px; padding: 12px 14px; font-size: 0.87rem; margin: 12px 0; line-height: 1.45;
  border: 1px solid;
}
.notice.info { background: var(--blue-soft); border-color: #c8daf7; color: #1d4fa8; }
.notice.warn { background: var(--amber-soft); border-color: #f0dfae; color: var(--amber); }
.notice.danger { background: var(--red-soft); border-color: #f0cccc; color: var(--red); }
.notice.legal { background: #f2f3f5; border-color: var(--border); color: var(--muted); font-size: 0.8rem; }

/* ---------- chat ---------- */
.chat-box { display: flex; flex-direction: column; height: calc(100vh - 250px); min-height: 380px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 8px 4px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 72%; padding: 9px 13px; border-radius: 14px; font-size: 0.93rem; }
.msg.mine { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.theirs { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg .msg-time { display: block; font-size: 0.68rem; opacity: 0.7; margin-top: 3px; }
.msg.flagged { outline: 2px solid var(--red); }
.chat-input { display: flex; gap: 8px; padding-top: 10px; }
.chat-input input { flex: 1; }

/* ---------- misc ---------- */
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty .big { font-size: 2.4rem; margin-bottom: 8px; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200;
  background: var(--text); color: #fff; padding: 11px 20px; border-radius: 10px; font-weight: 600;
  font-size: 0.92rem; box-shadow: 0 6px 24px rgba(0,0,0,0.25); max-width: 90vw;
}
.toast.error { background: var(--red); }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 20, 28, 0.5); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal { background: var(--surface); border-radius: 14px; padding: 22px; width: 460px; max-width: 100%; max-height: 88vh; overflow-y: auto; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
table.simple { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.simple th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.8rem; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.simple td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.stat .num { font-size: 1.6rem; font-weight: 800; }
.stat .lbl { color: var(--muted); font-size: 0.8rem; font-weight: 600; }

/* ---------- landing ---------- */
.hero { text-align: center; padding: 48px 16px 32px; }
.hero h1 { font-size: 2.3rem; margin-bottom: 10px; }
.hero p { color: var(--muted); font-size: 1.08rem; max-width: 560px; margin: 0 auto 22px; }
.hero .row { justify-content: center; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 24px 0; }
.step-num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark);
  font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 24px 16px; text-align: center; color: var(--muted); font-size: 0.82rem; }
footer .row { justify-content: center; margin-bottom: 8px; }

/* auth */
.auth-wrap { max-width: 440px; margin: 40px auto; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.role-pick button { flex-direction: column; padding: 22px 14px; text-align: center; gap: 8px; font-size: 1rem; }
.role-pick button .emoji { font-size: 1.8rem; }
.role-pick button.selected { border-color: var(--accent); background: var(--accent-soft); }
.otp-code-hint { text-align: center; background: var(--amber-soft); border: 1px dashed var(--amber); border-radius: 10px; padding: 10px; margin: 12px 0; font-size: 0.9rem; }
.otp-code-hint b { font-size: 1.3rem; letter-spacing: 3px; }

/* Language switcher */
.lang-switcher {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; font-size: 0.88rem; color: var(--text); margin-right: 12px;
  cursor: pointer; transition: border-color 0.2s;
}
.lang-switcher:hover { border-color: var(--accent); }
.lang-switcher:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 640px) {
  nav.topbar { overflow-x: auto; }
  nav.topbar a.navlink { padding: 8px 9px; white-space: nowrap; }
  .msg { max-width: 86%; }
  .lang-switcher { font-size: 0.8rem; padding: 5px 8px; }
}


