/* app.css — additions on top of v3.css for sign-in, /me view, and loading states */

/* ── Sign-in / landing screen ───────────────────────────────── */
.signin-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fafaf7 0%, #f5f4f1 100%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.signin-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}
.signin-bg-orb-mint {
  width: 480px; height: 480px;
  background: #80FFD1;
  top: -180px;
  left: -180px;
}
.signin-bg-orb-coral {
  width: 420px; height: 420px;
  background: #FF7A8A;
  bottom: -160px;
  right: -160px;
  opacity: 0.25;
}
.signin-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 18px;
  padding: 48px 44px 36px;
  text-align: center;
  box-shadow: 0 12px 48px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.02);
}
.signin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: #111;
  margin-bottom: 36px;
}
.signin-brand .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #80FFD1;
  box-shadow: 0 0 16px rgba(128,255,209,0.7);
}
.signin-card h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  color: #111;
}
.signin-card .signin-sub {
  font-size: 14px;
  line-height: 1.5;
  color: #6b7280;
  margin: 0 auto 32px;
  max-width: 340px;
}
.signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  background: #111;
  color: #fff;
  border: 0;
  border-radius: 10px;
  font: 600 14px 'Inter', sans-serif;
  cursor: pointer;
  transition: transform 0.1s, background 0.1s, box-shadow 0.1s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.signin-btn:hover:not(:disabled) {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.signin-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.signin-foot {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line-2, #f0f0ee);
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.5;
}
.signin-error {
  margin-top: 20px;
  padding: 12px 16px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 10px;
  font-size: 12px;
  text-align: left;
  line-height: 1.5;
}

/* ── App-level loading / error ─────────────────────────────── */
.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--paper-3, #f5f4f1);
}
.boot-screen .spinner {
  width: 32px; height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #111;
  border-radius: 50%;
  animation: bootspin 0.7s linear infinite;
}
@keyframes bootspin { to { transform: rotate(360deg); } }
.boot-screen .meta { margin-top: 14px; font-size: 12px; color: #6b7280; }

.app-error {
  margin: 40px auto;
  max-width: 540px;
  padding: 28px;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 12px;
  color: #b91c1c;
  font-size: 13px;
}

/* ── /me shell — annotator self-view ───────────────────────── */
.me-shell { min-height: 100vh; background: var(--paper-3, #f5f4f1); }
.me-hdr {
  background: #fff;
  border-bottom: 1px solid var(--line, #e5e7eb);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.me-brand { display: inline-flex; align-items: center; gap: 9px; }
.me-brand .sb-brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #80FFD1;
  box-shadow: 0 0 10px rgba(128,255,209,0.6);
}
.me-nav { flex: 1; display: flex; gap: 4px; margin-left: 14px; }
.me-nav button {
  background: transparent; border: 0;
  padding: 8px 14px;
  font: 600 13px 'Inter', sans-serif;
  border-radius: 7px;
  cursor: pointer;
  color: #6b7280;
}
.me-nav button:hover { color: #111; background: #f5f4f1; }
.me-nav button.active { background: #111; color: #fff; }
.me-user { display: flex; align-items: center; gap: 10px; }
.me-main {
  padding: 28px 36px 60px;
  max-width: 1100px;
  margin: 0 auto;
}
.me-week {
  width: 100%;
  border-collapse: collapse;
}
.me-week th {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #6b7280;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line-2, #f0f0ee);
}

/* ── Toast (clock-in actions) ───────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 100;
  animation: toastIn 0.2s ease-out;
}
@keyframes toastIn {
  from { transform: translate(-50%, 8px); opacity: 0; }
  to   { transform: translate(-50%, 0);    opacity: 1; }
}

/* ── Sidebar refresh button ─────────────────────────────────── */
.sb-refresh {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  font: 600 11px 'Inter', sans-serif;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  margin-bottom: 8px;
}
.sb-refresh:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.sb-refresh:disabled { opacity: 0.65; cursor: default; }
.sb-refresh-icon { display: inline-block; }
@keyframes sbspin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ── Modal (Log action) ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 200;
  padding: 20px;
  animation: modalFade 0.15s ease-out;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 4px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  animation: modalRise 0.18s ease-out;
}
@keyframes modalRise { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line-2, #f0f0ee);
}
.modal-hd h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
  color: #111;
}
.modal-x {
  background: none;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-x:hover { background: #f5f4f1; color: #111; }
.modal-bd {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modal-lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin-top: 8px;
}
.modal-lbl:first-child { margin-top: 0; }
.modal-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  font: 400 13px 'Inter', sans-serif;
  color: #111;
  background: #fff;
  resize: vertical;
}
.modal-input:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17,17,17,0.05);
}
select.modal-input { cursor: pointer; }
.modal-err {
  margin-top: 10px;
  padding: 8px 12px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 12px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line-2, #f0f0ee);
}

/* ── Admin panel ─────────────────────────────────────────────── */
.page-admin .admin-nav {
  display: inline-flex;
  background: #f3f4f6;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
  margin-bottom: 8px;
}
.page-admin .admin-nav button {
  background: transparent; border: 0;
  font: 600 12px 'Inter', sans-serif;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  color: #6b7280;
}
.page-admin .admin-nav button:hover { color: #111; }
.page-admin .admin-nav button.active {
  background: #fff; color: #111;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.admin-section { display: flex; flex-direction: column; gap: 14px; }
.admin-section-hd {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.admin-section-hd h2 {
  font-size: 17px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 4px;
}
.admin-search {
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  padding: 9px 14px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 9px;
  max-width: 420px;
}
.admin-search input {
  flex: 1; border: 0; outline: none;
  font: 400 13px 'Inter', sans-serif;
  background: transparent;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.admin-table th {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #6b7280;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2, #f0f0ee);
  background: #fafaf9;
}
.admin-table th.num { text-align: right; }
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2, #f0f0ee);
  vertical-align: middle;
}
.admin-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-num {
  width: 90px;
  padding: 5px 8px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  font: 600 12px 'Inconsolata', monospace;
  text-align: right;
  background: #fff;
}
.admin-num:focus {
  outline: none; border-color: #111;
  box-shadow: 0 0 0 3px rgba(17,17,17,0.05);
}

/* Toggle switch */
.admin-toggle {
  width: 48px; height: 28px;
  background: #d1d5db;
  border: 0; border-radius: 99px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
  padding: 0;
}
.admin-toggle.on { background: #b91c1c; }
.admin-toggle:disabled { opacity: 0.5; cursor: not-allowed; }
.admin-toggle-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.15s;
}
.admin-toggle.on .admin-toggle-knob { transform: translateX(20px); }

.admin-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  padding: 7px 12px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 9px;
  background: #fff;
}
.admin-checkbox input { margin: 0; }

.modal-card-wide { max-width: 560px; }
.modal-card-wide .modal-input code { font-size: 11px; }
.modal-card-xwide { max-width: 880px; }

/* ── App shell uses .app from v3.css; rename mismatches here ─ */
.ydx.app-shell { /* compat with design's class */
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100vh;
  overflow: hidden;
}
