:root {
  --bg:         #1e2847;
  --surface:    #303C6C;
  --surface2:   #3a4a80;
  --border:     rgba(180,223,229,0.22);
  --accent:     #F4976C;
  --accent-dim: rgba(244,151,108,0.15);
  --yellow:     #FBE8A6;
  --yellow-dim: rgba(251,232,166,0.15);
  --light:      #B4DFE5;
  --lightest:   #D2FDFF;
  --muted:      rgba(212,253,255,0.5);
  --teal:       #2ECFCE;
  --radius:     14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Outfit', sans-serif; background: var(--bg); color: var(--lightest); min-height: 100vh; }

/* ── Header ── */
.header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 12px 24px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.logo-area { display: flex; align-items: center; gap: 10px; }
.logo-img  { height: 32px; width: auto; }
.logo-text {
  font-family: 'Rajdhani', 'Syne', sans-serif;
  font-size: 1.45rem; font-weight: 700;
  letter-spacing: 5px; color: var(--teal);
  text-transform: uppercase; line-height: 1;
}
.logo-text .tilde { color: rgba(46,207,206,0.55); letter-spacing: 4px; }
.logo-sub { font-size: 0.56rem; color: var(--muted); letter-spacing: 2.5px;
            text-transform: uppercase; margin-top: 4px; line-height: 1; }
.header-right { display: flex; align-items: center; gap: 14px; }
/* #17 date removed from header */
.header-link {
  color: var(--accent); text-decoration: none; font-size: 0.88rem; font-weight: 500;
  padding: 8px 16px; border: 1px solid var(--accent); border-radius: 8px; transition: all 0.2s;
  font-family: 'Rajdhani', sans-serif; letter-spacing: 1px;
}
.header-link:hover { background: var(--accent-dim); }

/* ── Tabs ── */
.tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  background: var(--surface); padding: 0 24px;
  position: sticky; top: 58px; z-index: 9;
}
.tab-btn {
  padding: 10px 18px; cursor: pointer; font-family: 'Outfit', sans-serif;
  font-size: 0.86rem; font-weight: 500; color: var(--muted);
  border: none; background: none; border-bottom: 2px solid transparent;
  transition: all 0.2s; letter-spacing: 0.5px;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn:hover  { color: var(--lightest); }

/* ── Main ── */
.main { max-width: 720px; margin: 0 auto; padding: 24px 20px 80px; }
.page-title { font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; font-weight: 700;
              letter-spacing: 2px; text-transform: uppercase; color: var(--lightest); margin-bottom: 4px; }
.page-sub   { color: var(--muted); font-size: 0.92rem; margin-bottom: 22px; }

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Status bar */
#statusBar {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 16px; margin-bottom: 20px;
  font-size: 0.86rem; color: var(--muted); display: flex; align-items: center; gap: 10px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.dot.loading { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.dot.ready   { background: #7ecf7e; }
.dot.error   { background: #ff6b6b; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* Staff grid */
.staff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (min-width: 500px) { .staff-grid { grid-template-columns: repeat(3, 1fr); } }

.staff-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 14px;
  cursor: pointer; transition: all 0.2s ease;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  position: relative; overflow: hidden;
}
.staff-card:hover  { border-color: var(--accent); transform: translateY(-2px); background: var(--surface2); }
.staff-card:active { transform: scale(0.97); }
.staff-card.registered { border-color: rgba(251,232,166,0.45); }
.staff-card.registered::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--yellow);
}
.re-register-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: 0.58rem; background: var(--accent-dim); color: var(--accent);
  border: 1px solid var(--accent); border-radius: 10px; padding: 2px 6px; display: none;
}
.staff-card.registered:hover .re-register-badge { display: block; }

/* Avatar shows photo or #19 two-letter initials */
.avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent-dim); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Rajdhani', sans-serif; font-size: 1.3rem; font-weight: 700;
  color: var(--accent); overflow: hidden; flex-shrink: 0;
  transition: border-color 0.3s;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.staff-card.registered .avatar { border-color: var(--yellow); }
.staff-name   { font-family: 'Rajdhani', sans-serif; font-size: 1rem; font-weight: 700;
                letter-spacing: 1px; text-transform: uppercase; color: var(--lightest); }
.staff-status { font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.staff-card.registered .staff-status { color: var(--yellow); }

/* ── #18 JSON Editor ── */
.json-editor-section { margin-bottom: 28px; }
.json-editor-label {
  font-family: 'Rajdhani', sans-serif; font-size: 1rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--lightest);
  margin-bottom: 6px; display: flex; align-items: center; gap: 8px;
}
.json-editor-label .file-badge {
  font-size: 0.65rem; background: var(--surface2); color: var(--teal);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px;
  font-family: 'Courier New', monospace; letter-spacing: 1px;
}
.json-textarea {
  width: 100%; min-height: 180px; resize: vertical;
  background: #0e1730; border: 1px solid var(--border); border-radius: 10px;
  color: var(--lightest); font-family: 'Courier New', monospace; font-size: 0.82rem;
  line-height: 1.6; padding: 12px 14px;
  transition: border-color 0.2s;
}
.json-textarea:focus { outline: none; border-color: var(--teal); }
.json-textarea.error { border-color: #ff6b6b; }
.json-textarea.ok    { border-color: #7ecf7e; }
.json-actions {
  display: flex; gap: 8px; margin-top: 8px; align-items: center; flex-wrap: wrap;
}
.json-msg { font-size: 0.78rem; flex: 1; min-width: 100px; }
.json-msg.ok  { color: #7ecf7e; }
.json-msg.err { color: #ff6b6b; }
.btn-sm {
  padding: 7px 16px; border: none; border-radius: 8px;
  font-family: 'Outfit', sans-serif; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-save   { background: var(--accent); color: #1e2847; }
.btn-save:hover { filter: brightness(1.1); }
.btn-reload { background: var(--surface2); color: var(--lightest); border: 1px solid var(--border); }
.btn-reload:hover { border-color: var(--teal); }

/* ── Attendance table ── */
.att-controls {
  display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap;
}
.att-controls input[type="date"] {
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--lightest); font-family: 'Outfit', sans-serif;
  font-size: 0.86rem;
}
.att-controls input[type="date"]:focus { outline: none; border-color: var(--teal); }
.att-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }
.att-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.84rem;
}
.att-table th {
  background: var(--surface2); padding: 9px 12px; text-align: left;
  font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 1px;
  color: var(--light); font-size: 0.8rem; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.att-table td {
  padding: 9px 12px; border-bottom: 1px solid rgba(180,223,229,0.1);
  color: var(--lightest);
}
.att-table tr:last-child td { border-bottom: none; }
.att-table tr:hover td { background: rgba(255,255,255,0.03); }
.att-table .name-cell { font-family: 'Rajdhani', sans-serif; font-weight: 700;
                        letter-spacing: 1px; color: var(--yellow); }
.att-table .time-in  { color: #7ecf7e; }
.att-table .time-out { color: #ff8080; }
.att-table .time-break { color: var(--light); }
.att-table .no-data { text-align: center; color: var(--muted); padding: 24px; }
.att-save-btn {
  margin-top: 12px; padding: 9px 24px; background: var(--accent); color: #1e2847;
  border: none; border-radius: 8px; font-family: 'Outfit', sans-serif;
  font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.att-save-btn:hover { filter: brightness(1.1); }
.att-edit { font-size: 0.72rem; padding: 2px 8px; background: var(--surface2);
            border: 1px solid var(--border); border-radius: 5px; color: var(--muted);
            cursor: pointer; font-family: 'Outfit', sans-serif; }
.att-edit:hover { border-color: var(--accent); color: var(--lightest); }
.att-input {
  background: var(--surface2); border: 1px solid var(--teal); border-radius: 5px;
  color: var(--lightest); padding: 3px 7px; font-family: 'Courier New', monospace;
  font-size: 0.82rem; width: 80px;
}
.att-input:focus { outline: none; }

/* Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,16,40,0.93); z-index: 100;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; width: 100%; max-width: 420px;
  overflow: hidden; animation: slideUp 0.3s ease;
}
@keyframes slideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }
.modal-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; font-weight: 700;
               letter-spacing: 2px; text-transform: uppercase; color: var(--lightest); }
.modal-title span { color: var(--accent); }
.modal-rereg { font-size: 0.65rem; color: var(--accent); background: var(--accent-dim);
               padding: 2px 7px; border-radius: 10px; margin-left: 6px; }
.close-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.3rem; padding: 4px; }
.close-btn:hover { color: var(--lightest); }
.modal-body { padding: 18px 20px; }

/* Camera */
.camera-wrap-modal {
  position: relative; background: #0e1730;
  border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; margin-bottom: 14px;
}
#regVideo  { width: 100%; height: 100%; object-fit: cover; display: block; transform: scaleX(-1); }
#regCanvas { position: absolute; inset: 0; width: 100%; height: 100%; transform: scaleX(-1); }
.face-guide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.face-oval  { width: 52%; aspect-ratio: 3/4; border: 2px dashed rgba(244,151,108,0.5); border-radius: 50%; }
.face-oval.detected { border-color: var(--yellow); border-style: solid; }

.capture-status {
  background: var(--surface2); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; text-align: center;
}
.capture-status .status-msg { font-size: 0.88rem; color: var(--muted); margin-bottom: 8px; }
.progress-dots { display: flex; gap: 8px; justify-content: center; }
.progress-dot  {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border); border: 2px solid rgba(244,151,108,0.3); transition: all 0.3s;
}
.progress-dot.done   { background: var(--accent); border-color: var(--accent); }
.progress-dot.active { background: var(--yellow); border-color: var(--yellow); animation: pulse 0.8s ease-in-out infinite; }

.btn { width: 100%; padding: 13px; border: none; border-radius: 12px; font-family: 'Outfit', sans-serif;
       font-size: 0.96rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: var(--accent); color: #1e2847; }
.btn-primary:hover    { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-success { background: var(--yellow); color: var(--bg); }
.btn-ghost   { background: transparent; border: 1px solid var(--border); color: var(--muted); margin-top: 10px; }
.btn-ghost:hover { border-color: var(--lightest); color: var(--lightest); }

.success-view { text-align: center; padding: 14px 0; }
.success-photo-wrap {
  width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 12px;
  overflow: hidden; border: 3px solid var(--yellow);
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Rajdhani', sans-serif; font-size: 2.2rem; color: var(--yellow);
}
.success-photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.success-icon  { font-size: 2.8rem; margin-bottom: 10px; }
.success-title { font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; font-weight: 700;
                 letter-spacing: 2px; color: var(--yellow); margin-bottom: 5px; text-transform: uppercase; }
.success-sub   { font-size: 0.88rem; color: var(--muted); margin-bottom: 18px; }

/* ── Monthly Attendance Overview ── */
.att-month-nav {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.att-month-nav .month-label {
  font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--lightest);
  min-width: 180px; text-align: center;
}
.att-month-btn {
  padding: 6px 14px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--lightest); cursor: pointer;
  font-family: 'Outfit', sans-serif; font-size: 0.9rem; transition: all 0.2s;
}
.att-month-btn:hover { border-color: var(--teal); }
.att-month-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.staff-att-section { margin-bottom: 28px; }
.staff-att-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; flex-wrap: wrap; gap: 8px;
}
.staff-att-name {
  font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--yellow);
}
.staff-att-totals { display: flex; gap: 14px; font-size: 0.78rem; }
.staff-att-totals .work-total { color: #7ecf7e; }
.staff-att-totals .break-total { color: var(--light); }

.att-row-wrap {
  display: flex; align-items: stretch; margin-bottom: 0;
}
.att-day-labels {
  display: flex; flex-direction: column; flex-shrink: 0; padding-top: 0;
}
.att-day-label {
  height: 22px; display: flex; align-items: center; justify-content: flex-end;
  padding-right: 6px; font-family: 'Rajdhani', sans-serif; font-size: 0.68rem;
  font-weight: 600; color: var(--accent); letter-spacing: 0.5px; min-width: 32px;
}
.att-day-label-header { height: 27px; }
.att-day-label-footer { height: 27px; }

.att-hourly-wrap {
  overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); flex: 1; min-width: 0;
}
.att-hourly { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.att-hourly th {
  background: var(--surface2); padding: 5px 2px; text-align: center;
  font-family: 'Rajdhani', sans-serif; font-weight: 600;
  color: var(--muted); font-size: 0.68rem; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border); white-space: nowrap; min-width: 28px;
}
.att-hourly th.day-col { min-width: 32px; color: var(--light); }
.att-hourly th.total-col { min-width: 44px; color: var(--light); }
.att-hourly td {
  padding: 3px 2px; text-align: center;
  border-bottom: 1px solid rgba(180,223,229,0.06);
  border-right: 1px solid rgba(180,223,229,0.06);
  min-width: 28px; height: 22px; position: relative; cursor: default;
}
.att-hourly td:last-child { border-right: none; }
.att-hourly th { border-right: 1px solid rgba(180,223,229,0.06); }
.att-hourly th:last-child { border-right: none; }
.att-hourly td.day-cell {
  font-family: 'Rajdhani', sans-serif; font-weight: 600;
  color: var(--accent); font-size: 0.75rem; min-width: 32px;
}
.att-hourly td.total-cell {
  font-size: 0.72rem; color: var(--lightest); font-weight: 500; min-width: 44px;
}
.att-hourly td.h-leave { background: rgba(255,107,107,0.2); }
.att-hourly td[title]:hover::after {
  content: attr(title); position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%); background: var(--surface); color: var(--lightest);
  padding: 4px 10px; border-radius: 6px; font-size: 0.91rem; white-space: nowrap;
  border: 1px solid var(--border); z-index: 20; pointer-events: none;
}
.att-hourly tr:hover td { filter: brightness(1.3); }
.att-hourly tfoot td {
  background: var(--surface2); font-weight: 600; color: var(--lightest);
  border-top: 1px solid var(--border); font-size: 0.75rem;
}

/* Issues table */
.issues-section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.issues-title {
  font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--lightest); margin-bottom: 14px;
}
.issues-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.issues-table th {
  background: var(--surface2); padding: 9px 12px; text-align: left;
  font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 1px;
  color: var(--light); font-size: 0.8rem; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.issues-table td {
  padding: 9px 12px; border-bottom: 1px solid rgba(180,223,229,0.1);
  color: var(--lightest); font-size: 0.84rem;
}
.issues-table .name-cell {
  font-family: 'Rajdhani', sans-serif; font-weight: 700;
  letter-spacing: 1px; color: var(--yellow);
}
.issue-tag {
  display: inline-block; font-size: 0.72rem; padding: 2px 8px; border-radius: 6px;
  margin: 1px 2px; font-family: 'Outfit', sans-serif;
}
.issue-tag.missing-break { background: rgba(255,213,79,0.2); color: #ffd54f; }
.issue-tag.missing-in { background: rgba(126,207,126,0.2); color: #7ecf7e; }
.issue-tag.missing-out { background: rgba(255,107,107,0.2); color: #ff6b6b; }

.comparison-section { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.comparison-title {
  font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--lightest); margin-bottom: 14px;
}
.comparison-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.comparison-table th {
  background: var(--surface2); padding: 9px 12px; text-align: left;
  font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 1px;
  color: var(--light); font-size: 0.8rem; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.comparison-table td {
  padding: 9px 12px; border-bottom: 1px solid rgba(180,223,229,0.1);
  color: var(--lightest); font-size: 0.84rem;
}
.comparison-table .name-cell {
  font-family: 'Rajdhani', sans-serif; font-weight: 700;
  letter-spacing: 1px; color: var(--yellow);
}
.bar-cell { padding: 9px 12px; }
.bar-wrap {
  background: rgba(180,223,229,0.08); border-radius: 4px; height: 18px;
  overflow: hidden; position: relative;
}
.bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.bar-fill.work { background: rgba(126,207,126,0.6); }
.bar-fill.break-bar { background: rgba(251,232,166,0.5); }

.main.wide { max-width: 1100px; }

.hidden { display: none !important; }

/* ── Debug ── */
#debugPanel {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(10,16,40,0.97); border-top: 1px solid var(--accent);
  font-family: 'Courier New', monospace; font-size: 0.7rem;
  z-index: 9999; max-height: 200px; display: flex; flex-direction: column;
}
#debugHeader { padding: 4px 12px; background: var(--surface2); display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid var(--border); }
#debugHeader span { color: var(--accent); font-weight: bold; font-size: 0.72rem; letter-spacing: 1px; }
#debugClear, #debugToggle { background: none; border: 1px solid var(--border); color: var(--muted);
  font-size: 0.66rem; padding: 2px 7px; border-radius: 4px; cursor: pointer; margin-left: 5px; }
#debugLog { overflow-y: auto; padding: 5px 12px; flex: 1; }
.dlog { padding: 1px 0; border-bottom: 1px solid rgba(244,151,108,0.07); line-height: 1.5; }
.dlog .ts  { color: rgba(251,232,166,0.4); margin-right: 5px; }
.dlog.info .msg { color: var(--lightest); }
.dlog.ok   .msg { color: #7ecf7e; }
.dlog.warn .msg { color: var(--yellow); }
.dlog.err  .msg { color: #ff6b6b; font-weight: bold; }
.dlog.step .msg { color: var(--accent); }
/* ── PIN Lock Screen ── */
.pin-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
}
.pin-overlay.hidden { display: none; }
.pin-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; width: 100%; max-width: 300px;
  padding: 24px 20px; text-align: center;
}
.pin-title { font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; font-weight: 700;
             letter-spacing: 2px; color: var(--lightest); margin-bottom: 4px; }
.pin-sub   { font-size: 0.8rem; color: var(--muted); margin-bottom: 16px; }
.pin-dots  { display: flex; gap: 12px; justify-content: center; margin-bottom: 16px; }
.pin-dot   { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); transition: all 0.2s; }
.pin-dot.filled { background: var(--accent); border-color: var(--accent); }
.pin-error { font-size: 0.8rem; color: #ff8080; margin-bottom: 10px; min-height: 16px; }
.pin-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pin-key {
  padding: 13px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface2); color: var(--lightest);
  font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
}
.pin-key:hover  { border-color: var(--accent); color: var(--yellow); }
.pin-key:active { transform: scale(0.92); }
.pin-key.cancel { font-family: 'Outfit', sans-serif; font-size: 0.75rem; color: var(--muted); }

/* ── Login Screen ── */
.login-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}
.login-card {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 16px; padding: 36px 32px 28px;
  width: 100%; max-width: 380px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 50px rgba(244,151,108,0.06);
  animation: fadeUp 0.4s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-logo-area { text-align: center; margin-bottom: 4px; }
.login-logo-img  { width: 48px; height: 48px; margin-bottom: 8px; }
.login-logo-text {
  font-family: 'Syne', sans-serif; font-size: 1.6rem; font-weight: 700;
  letter-spacing: 4px; color: var(--lightest); line-height: 1.2;
}
.login-tilde   { color: var(--muted); margin: 0 2px; }
.login-tagline {
  font-size: 0.65rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-top: 4px;
}
.login-divider {
  border: none; border-top: 1px solid var(--border); margin: 20px 0;
}
.login-field { margin-bottom: 14px; }
.login-label {
  display: block; font-size: 0.75rem; font-weight: 500;
  color: var(--light); margin-bottom: 5px; letter-spacing: 0.5px;
}
.login-input {
  width: 100%; padding: 10px 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--lightest);
  font-family: 'Outfit', sans-serif; font-size: 0.9rem;
  outline: none; transition: border-color 0.2s;
  box-sizing: border-box;
}
.login-input::placeholder { color: var(--muted); opacity: 0.7; }
.login-input:focus { border-color: var(--teal); }
.login-pw-wrap { position: relative; }
.login-pw-wrap .login-input { padding-right: 42px; }
.login-pw-toggle {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted);
  cursor: pointer; padding: 6px 10px; font-size: 1rem;
}
.login-pw-toggle:hover { color: var(--light); }
.login-error {
  display: none; background: rgba(255,80,80,0.1);
  border: 1px solid rgba(255,80,80,0.3); border-radius: 8px;
  padding: 10px 14px; font-size: 0.8rem; color: #ff8080;
  margin-bottom: 14px;
}
.login-btn {
  width: 100%; padding: 12px; margin-top: 6px;
  background: var(--accent); border: none; border-radius: 10px;
  color: var(--bg); font-family: 'Rajdhani', sans-serif;
  font-size: 1rem; font-weight: 700; letter-spacing: 1px;
  cursor: pointer; transition: all 0.2s;
}
.login-btn:hover { background: #e8895f; }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.login-back {
  display: block; text-align: center; margin-top: 16px;
  font-size: 0.8rem; color: var(--muted); text-decoration: none;
}
.login-back:hover { color: var(--light); }
