/* ═══════════════════════════════════════════════════════
   Binarest Tools — style.css
   ═══════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep:    #080c14;
  --bg-main:    #0d1321;
  --bg-card:    #111b2e;
  --accent:     #29a8e0;
  --accent-dim: rgba(41,168,224,0.12);
  --text:       #e8edf5;
  --muted:      #7a8aaa;
  --border:     rgba(41,168,224,0.18);
  --border-dim: rgba(255,255,255,0.06);
  --red:        #e05c5c;
  --orange:     #e09a3a;
  --green:      #3acf8f;
  --font:       'Lato', sans-serif;
}

html, body { height: 100%; font-family: var(--font); background: var(--bg-main); color: var(--text); }
a { text-decoration: none; color: inherit; }
input, textarea, button, select { font-family: var(--font); }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus { outline: none; }
textarea { resize: vertical; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ─── SCREENS ─────────────────────────────────────────── */
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; }

/* ─── BOOT ────────────────────────────────────────────── */
#screen-boot {
  align-items: center; justify-content: center;
  flex-direction: column; background: var(--bg-deep); gap: 20px;
}
.boot-logo { font-size: 42px; color: var(--accent); }
.boot-spinner {
  width: 24px; height: 24px;
  border: 2px solid rgba(41,168,224,.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── LOGIN ───────────────────────────────────────────── */
#screen-login {
  align-items: center; justify-content: center;
  background: var(--bg-deep); position: relative; overflow: hidden;
}
.login-glow {
  position: absolute; top: 30%; left: 50%;
  transform: translate(-50%,-50%);
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(41,168,224,.09) 0%, transparent 65%);
  pointer-events: none;
}
.login-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 40px 36px; width: 360px;
  position: relative; z-index: 1;
}
.login-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--accent); font-weight: 900; font-size: 14px;
  letter-spacing: 4px; margin-bottom: 6px;
}
.login-sub { font-size: 12px; color: var(--muted); margin-bottom: 28px; letter-spacing: .5px; }
.login-field {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-main); border: 1px solid var(--border-dim);
  border-radius: 6px; padding: 0 14px; margin-bottom: 8px; color: var(--muted);
  transition: border-color .15s;
}
.login-field.error { border-color: var(--red); }
.login-field input { flex: 1; background: transparent; border: none; padding: 12px 0; color: var(--text); font-size: 14px; }
.login-err { font-size: 12px; color: var(--red); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; min-height: 20px; }

@keyframes shake {
  0%,100% { transform:translateX(0); }
  20%      { transform:translateX(-8px); }
  40%      { transform:translateX(8px); }
  60%      { transform:translateX(-5px); }
  80%      { transform:translateX(5px); }
}
.shake { animation: shake .5s ease; }

/* ─── HUB ─────────────────────────────────────────────── */
#screen-hub { flex-direction: column; background: var(--bg-deep); }

.hub-topbar {
  background: var(--bg-deep); border-bottom: 1px solid var(--border);
  padding: 14px 40px; display: flex; align-items: center;
  justify-content: space-between;
}
.hub-brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 900; font-size: 13px; letter-spacing: 3px;
}
.hub-content {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 24px;
}
.hub-header { text-align: center; margin-bottom: 48px; }
.hub-title { font-size: 28px; font-weight: 900; margin-bottom: 8px; }
.hub-sub   { color: var(--muted); font-size: 14px; }

.hub-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px; max-width: 760px; width: 100%;
}
.hub-card {
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: 14px; padding: 28px 24px;
  display: flex; align-items: center; gap: 20px;
  cursor: pointer; text-align: left;
  transition: border-color .2s, transform .15s, background .2s;
}
.hub-card:hover {
  border-color: var(--accent); background: rgba(41,168,224,.05);
  transform: translateY(-2px);
}
.hub-card-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--accent-dim); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 22px; flex-shrink: 0;
}
.hub-card-body { flex: 1; }
.hub-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.hub-card-desc  { font-size: 12px; color: var(--muted); line-height: 1.6; }
.hub-card-arrow { color: var(--muted); font-size: 14px; flex-shrink: 0; transition: color .2s; }
.hub-card:hover .hub-card-arrow { color: var(--accent); }

/* ─── ADMIN LAYOUT ────────────────────────────────────── */
#screen-admin,
#screen-signature-admin { flex-direction: row; background: var(--bg-main); }

.sidebar {
  width: 220px; min-height: 100vh; background: var(--bg-deep);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px; padding: 20px;
  color: var(--accent); font-weight: 900; font-size: 13px; letter-spacing: 4px;
  border-bottom: 1px solid var(--border);
}
.sidebar-nav { padding: 12px 10px; flex: 1; }
.nav-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 6px; border: none;
  background: transparent; color: var(--muted); font-size: 13px;
  cursor: pointer; margin-bottom: 2px; text-align: left; transition: all .15s;
}
.nav-btn:hover { color: var(--text); background: var(--border-dim); }
.nav-btn.active { background: var(--accent-dim); color: var(--accent); }
.nav-btn--back  { color: var(--muted); margin-bottom: 0; }
.nav-btn--back:hover { color: var(--text); }
.nav-divider { height: 1px; background: var(--border-dim); margin: 8px 0; }
.nav-badge {
  margin-left: auto; background: var(--accent-dim); color: var(--accent);
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
}
.sidebar-bottom { padding: 12px 10px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.sig-public-link { padding: 8px 2px; }

.btn-logout {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid var(--border-dim); border-radius: 6px;
  background: transparent; color: var(--muted); font-size: 12px;
  cursor: pointer; transition: all .15s;
}
.btn-logout:hover { color: var(--red); border-color: var(--red); }

.admin-main { flex: 1; overflow: auto; }
.main-content { padding: 32px 36px; max-width: 1100px; margin: 0 auto; }

.tab { display: none; }
.tab.active-tab { display: block; }

/* ─── PAGE HEADER ─────────────────────────────────────── */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; gap: 12px; flex-wrap: wrap; }
.page-title { font-size: 22px; font-weight: 900; color: var(--text); }
.page-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ─── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 6px; padding: 9px 18px;
  font-weight: 700; font-size: 13px; cursor: pointer;
  text-decoration: none; transition: opacity .15s;
  white-space: nowrap; border: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary  { background: var(--accent); color: white; }
.btn--primary:hover:not(:disabled) { opacity: .88; }
.btn--secondary {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-dim);
}
.btn--secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn--danger   { background: var(--red); color: white; }
.btn--danger:hover { opacity: .88; }
.btn--full     { width: 100%; justify-content: center; }

.btn-back {
  background: transparent; border: none; color: var(--muted);
  cursor: pointer; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0; margin-bottom: 8px; transition: color .15s;
}
.btn-back:hover { color: var(--text); }

.btn-icon {
  background: transparent; border: none; color: var(--muted);
  cursor: pointer; padding: 5px 7px; border-radius: 4px;
  font-size: 13px; transition: all .15s;
}
.btn-icon:hover       { color: var(--text); background: var(--border-dim); }
.btn-icon--red:hover  { color: var(--red); background: rgba(224,92,92,.1); }
.btn-icon--green:hover { color: var(--green); background: rgba(58,207,143,.1); }

/* ─── REPORT GRID ─────────────────────────────────────── */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.report-card {
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: 10px; padding: 20px; display: flex; flex-direction: column;
  gap: 10px; transition: border-color .2s;
}
.report-card:hover { border-color: var(--border); }
.report-card-header { display: flex; justify-content: space-between; align-items: center; }
.client-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-dim); color: var(--accent);
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 4px; letter-spacing: .5px;
}
.card-actions { display: flex; gap: 4px; }
.report-card-title { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }
.report-url { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-row { display: flex; gap: 6px; flex-wrap: wrap; }
.score-chip {
  background: var(--bg-deep); border: 1px solid var(--border-dim);
  border-radius: 6px; padding: 6px 10px;
  display: flex; flex-direction: column; align-items: center;
  min-width: 54px; gap: 2px;
}
.score-chip .score-val { font-size: 15px; font-weight: 900; line-height: 1; }
.score-chip .score-key { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.report-meta { display: flex; gap: 14px; font-size: 11px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.card-btns { display: flex; gap: 8px; margin-top: 4px; }
.card-btns .btn { flex: 1; justify-content: center; }

/* ─── SIGNATURE TEMPLATE LIST ─────────────────────────── */
.sig-template-list { display: flex; flex-direction: column; gap: 12px; }
.sig-template-card {
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: 10px; padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  transition: border-color .2s;
}
.sig-template-card:hover { border-color: var(--border); }
.sig-template-card.is-active { border-color: var(--green); }
.sig-template-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--accent-dim); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 16px; flex-shrink: 0;
}
.sig-template-icon.active-icon { background: rgba(58,207,143,.12); border-color: rgba(58,207,143,.3); color: var(--green); }
.sig-template-body { flex: 1; }
.sig-template-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.sig-template-meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.active-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(58,207,143,.12); color: var(--green);
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 4px; letter-spacing: .5px;
}
.sig-template-actions { display: flex; gap: 4px; }

/* ─── SIGNATURE VARS ──────────────────────────────────── */
.sig-vars-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sig-var-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-deep); border: 1px solid var(--border);
  color: var(--accent); font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 4px; letter-spacing: .5px;
  font-family: monospace;
}

/* ─── EMPTY / LOADING ─────────────────────────────────── */
.empty-state {
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: 12px; padding: 60px 40px; text-align: center;
  color: var(--muted); display: flex; flex-direction: column;
  align-items: center; gap: 10px;
}
.empty-state i    { font-size: 40px; opacity: .4; }
.empty-state h3   { color: var(--text); font-size: 16px; }
.empty-state p    { font-size: 13px; max-width: 300px; line-height: 1.6; }
.loading-msg      { padding: 40px; text-align: center; color: var(--muted); font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; }

/* ─── FORM ────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; }
.form-col { display: flex; flex-direction: column; gap: 16px; }
.form-section { background: var(--bg-card); border: 1px solid var(--border-dim); border-radius: 10px; padding: 20px; }
.form-html-section { display: flex; flex-direction: column; }
.form-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.form-hint { font-size: 12px; color: var(--muted); margin-bottom: 10px; line-height: 1.6; }
.field { margin-bottom: 12px; }
.field label { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; display: block; margin-bottom: 5px; }
.req { color: var(--red); }
.field-err { font-size: 11px; color: var(--red); margin-top: 3px; min-height: 16px; }
.input {
  width: 100%; background: var(--bg-main); border: 1px solid var(--border-dim);
  border-radius: 6px; padding: 9px 12px; color: var(--text); font-size: 13px;
  transition: border-color .15s;
}
.input:focus { border-color: var(--accent); }
.input.error  { border-color: var(--red); }
.input--mono  { font-family: 'Courier New', monospace; font-size: 12px; flex: 1; min-height: 480px; }
.scores-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.score-input  { text-align: center; font-weight: 700; font-size: 14px; }
.char-count   { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.char-warn    { color: var(--red); }

/* ─── STATS ───────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: 10px; padding: 20px; text-align: center;
}
.stat-val  { font-size: 36px; font-weight: 900; color: var(--accent); line-height: 1; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 6px; }
.top-list { background: var(--bg-card); border: 1px solid var(--border-dim); border-radius: 10px; }
.top-list-header { padding: 14px 20px; border-bottom: 1px solid var(--border-dim); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.top-list-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--border-dim); font-size: 13px; }
.top-list-item:last-child { border-bottom: none; }
.views-badge { background: var(--accent-dim); color: var(--accent); font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 10px; }

/* ─── MODAL ───────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(8,12,20,.85);
  align-items: center; justify-content: center; z-index: 100;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 36px; text-align: center;
  max-width: 360px; width: 90%;
}
.modal > i    { font-size: 36px; color: var(--red); }
.modal h3     { color: var(--text); margin: 12px 0 8px; }
.modal p      { color: var(--muted); font-size: 13px; margin-bottom: 20px; line-height: 1.6; }
.modal-btns   { display: flex; gap: 10px; justify-content: center; }

/* ─── TOAST ───────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 18px; font-size: 13px;
  display: flex; align-items: center; gap: 10px; z-index: 200;
  transform: translateY(80px); opacity: 0;
  transition: all .3s; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast i    { color: var(--green); }

/* ─── CLIENT VIEW ─────────────────────────────────────── */
#screen-client { flex-direction: column; }

.client-topbar {
  background: var(--bg-deep); border-bottom: 1px solid var(--border);
  padding: 12px 32px; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 10px;
  position: sticky; top: 0; z-index: 10;
}
.client-brand { display: flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 900; font-size: 13px; letter-spacing: 3px; }
.topbar-sep   { color: var(--border); margin: 0 4px; }
.topbar-label { color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.client-topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.client-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-dim); color: var(--accent);
  font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 4px;
}

.client-hero {
  background: var(--bg-deep); border-bottom: 1px solid var(--border);
  padding: 48px 48px 40px; position: relative; overflow: hidden;
  display: flex; justify-content: center;
}
.hero-glow {
  position: absolute; top: -100px; right: -100px; width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(41,168,224,.1) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner  { position: relative; z-index: 1; max-width: 900px; width: 100%; }
.hero-badge  {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-dim); color: var(--accent);
  font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  padding: 4px 14px; border-radius: 4px; margin-bottom: 14px;
}
.hero-title  { font-size: 32px; font-weight: 900; color: white; margin-bottom: 8px; line-height: 1.2; }
.hero-url    { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; margin-bottom: 24px; }
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; background: rgba(41,168,224,.04);
  margin-bottom: 24px; max-width: 740px;
}
.meta-item { padding: 14px 20px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.meta-item:last-child { border-right: none; }
.meta-item:nth-last-child(-n+2) { border-bottom: none; }
.meta-item label { font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 5px; font-weight: 700; }
.meta-item span  { font-size: 13px; color: var(--text); font-weight: 400; line-height: 1.5; }

.client-scores { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.client-score-card {
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: 8px; padding: 14px 18px;
  display: flex; flex-direction: column; align-items: center; min-width: 80px; gap: 4px;
}
.client-score-val   { font-size: 26px; font-weight: 900; line-height: 1; }
.client-score-label { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 2px; }

.client-note {
  background: rgba(41,168,224,.06); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 6px;
  padding: 12px 16px; display: flex; gap: 10px;
  color: var(--muted); font-size: 13px; margin-bottom: 20px; line-height: 1.6;
}
.client-note i { margin-top: 2px; flex-shrink: 0; color: var(--accent); }

.client-auditor {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: 8px; padding: 14px 18px; max-width: 520px;
}
.auditor-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent-dim); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 16px; flex-shrink: 0;
}
.auditor-name     { font-weight: 700; color: var(--text); font-size: 14px; }
.auditor-role     { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.auditor-contacts { display: flex; gap: 16px; flex-wrap: wrap; }
.auditor-contact  { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 12px; text-decoration: none; }
.auditor-contact:hover { text-decoration: underline; }

.iframe-wrap    { background: var(--bg-main); }
.iframe-header  {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 32px; background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  color: var(--muted); font-size: 12px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
}
#report-frame   { width: 100%; border: none; display: block; background: white; min-height: 600px; }

.client-footer {
  background: var(--bg-deep); border-top: 1px solid var(--border);
  padding: 16px 32px; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 11px; color: var(--muted);
}
.brand-footer { color: var(--accent); font-weight: 900; letter-spacing: 3px; font-size: 12px; }

/* ─── SIGNATURE GENERATOR (publiczny) ────────────────── */
#screen-signature { flex-direction: column; }

.sig-gen-layout {
  flex: 1; display: grid;
  grid-template-columns: 420px 1fr;
  min-height: calc(100vh - 53px);
}
.sig-gen-left {
  background: var(--bg-deep); border-right: 1px solid var(--border);
  padding: 40px 36px; overflow-y: auto;
}
.sig-gen-right {
  background: var(--bg-main);
  padding: 40px 36px; overflow-y: auto;
}
.sig-gen-header { margin-bottom: 28px; }
.sig-gen-title  { font-size: 20px; font-weight: 900; margin: 10px 0 6px; }
.sig-gen-sub    { color: var(--muted); font-size: 13px; line-height: 1.6; }
.sig-gen-fields { display: flex; flex-direction: column; gap: 0; }

.sig-gen-preview-box {
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: 10px; overflow: hidden;
}
.sig-gen-preview-header {
  padding: 12px 16px; border-bottom: 1px solid var(--border-dim);
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 8px;
}
.sig-gen-preview-content {
  background: white; padding: 24px; min-height: 120px;
}

/* ─── NOT FOUND ───────────────────────────────────────── */
#screen-notfound {
  align-items: center; justify-content: center;
  flex-direction: column; gap: 12px; background: var(--bg-deep);
  text-align: center; padding: 40px;
}
#screen-notfound h2 { font-size: 20px; font-weight: 900; }
#screen-notfound p  { color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 300px; }

/* ─── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 900px) {
  .sig-gen-layout { grid-template-columns: 1fr; }
  .sig-gen-right  { border-top: 1px solid var(--border); }
}
@media (max-width: 820px) {
  .form-grid { grid-template-columns: 1fr; }
  .main-content { padding: 20px 16px; }
  .sidebar { width: 56px; }
  .sidebar-logo span,
  .nav-btn > span:not(.nav-badge),
  .btn-logout > span,
  .sig-public-link { display: none; }
  .nav-btn { justify-content: center; padding: 10px; }
  .nav-btn--back { justify-content: center; }
  .sidebar-logo { justify-content: center; padding: 16px 10px; }
  .client-hero { padding: 28px 20px; }
  .hero-title  { font-size: 22px; }
  .client-topbar, .iframe-header { padding: 10px 16px; }
  .hub-topbar { padding: 14px 20px; }
  .hub-content { padding: 40px 20px; }
  .hub-grid { grid-template-columns: 1fr; }
  .sig-gen-left, .sig-gen-right { padding: 24px 20px; }
}
@media (max-width: 560px) {
  .report-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: stretch; }
  .client-footer { flex-direction: column; text-align: center; }
  .login-card { width: 100%; max-width: 340px; padding: 28px 24px; }
}

@media print {
  .no-print { display: none !important; }
  .client-hero { border-bottom: 1px solid #ddd; }
  #report-frame { min-height: auto !important; }
}
