/* =============================================================================
   Alpha Victor Studios — Signature Tool UI
   Shared styling for the employee page + admin tool.
   ============================================================================ */

:root {
  --paper:      #F4F3EF;   /* warm off-white background */
  --surface:    #FCFBF9;   /* cards */
  --surface-2:  #FFFFFF;   /* inputs / inset */
  --ink:        #16181C;
  --ink-soft:   #5A5F68;
  --ink-faint:  #9A9EA6;
  --line:       #E4E2DB;
  --line-soft:  #EDEBE5;
  --accent:     #2B50E0;
  --accent-ink: #FFFFFF;
  --accent-wash:#EAEEFC;
  --ok:         #1F9D6B;
  --warn:       #B7791F;

  --r-sm: 7px;
  --r-md: 11px;
  --r-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(20,24,28,.05), 0 1px 1px rgba(20,24,28,.04);
  --shadow-md: 0 6px 22px -10px rgba(20,24,28,.22), 0 2px 6px -2px rgba(20,24,28,.08);

  --font-display: "Space Grotesk", "Hanken Grotesk", system-ui, sans-serif;
  --font-ui:      "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); }

/* ---- type helpers -------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin: 0; }
.display { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }

/* ---- top bar ------------------------------------------------------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 30;
}
.brandmark { display: flex; align-items: center; gap: 12px; }
.brandmark .dot {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: -.02em;
}
.brandmark .name { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brandmark .sub  { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }

/* ---- buttons ------------------------------------------------------------- */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); font-family: var(--font-ui); font-size: 14px; font-weight: 600;
  padding: 10px 16px; border-radius: var(--r-sm); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; line-height: 1;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { border-color: var(--ink-faint); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); border-color: color-mix(in srgb, var(--accent) 88%, black); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #000; }
.btn-ghost { background: transparent; box-shadow: none; border-color: transparent; }
.btn-ghost:hover { background: var(--line-soft); border-color: transparent; }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn .ico { width: 16px; height: 16px; display: inline-block; }

/* ---- form controls ------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-soft);
}
.input, .textarea, select.input {
  appearance: none; width: 100%; font-family: var(--font-ui); font-size: 15px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, select.input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.input::placeholder { color: var(--ink-faint); }
.textarea { resize: vertical; line-height: 1.5; }
.hint { font-size: 12.5px; color: var(--ink-faint); }

/* toggle */
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; gap: 10px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: var(--line); transition: background .18s; flex: none; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .18s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }

/* ---- card / panel -------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }

/* ---- toast --------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--paper); padding: 13px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100;
  display: flex; align-items: center; gap: 9px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .ok { color: #6ee7b7; }

/* ---- signature preview surface ------------------------------------------ */
.sig-stage {
  background:
    linear-gradient(0deg, rgba(0,0,0,.012), rgba(0,0,0,.012)),
    repeating-linear-gradient(45deg, #fff 0 11px, #fbfaf8 11px 22px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 30px;
  overflow: auto;
}
.sig-paper {
  background: #fff; border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
  padding: 26px 28px;
  display: inline-block; min-width: 240px;
}
.sig-broken-img {
  display: inline-flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg,#eef0f3 0 7px,#e7eaee 7px 14px);
  color: #9aa0aa; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: .1em; border: 1px dashed #cfd4db; text-align: center; padding: 8px;
}

/* scrollbar polish */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #d9d6cf; border-radius: 999px; border: 3px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: #c6c3bb; }
