/* Pages outside the admin shell: sign in, sign up, forgot password, reset password.
   These are Nasma's own pages, so they always use the nasma.si palette (as theme.css does by
   default); a company's accent colour only applies after sign-in. Follows the light/dark
   choice saved by the panel (a tiny script in each page's <head> sets data-theme before first paint). */
:root {
  --font: 'Manrope', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-alt: #ecf0f5;
  --border: rgba(11,18,32,0.10);
  --border-strong: rgba(11,18,32,0.18);
  --text: #0b1220;
  --text-2: #485267;
  --muted: #5d677c;
  --signal: #13cdb5;
  --accent: #0a7c6e;
  --accent-rgb: 10,124,110;
  --accent-hover: #08665b;
  --accent-text: #0a7c6e;
  --on-accent: #fff;
  --success: #067647;
  --error: #d92d20;
  --info: #175cd3;
  --input-bg: #ffffff;
  --shadow-sm: 0 1px 2px rgba(11,18,32,0.05);
  --shadow-lg: 0 20px 40px -12px rgba(11,18,32,0.14), 0 2px 6px rgba(11,18,32,0.04);
  --aside-bg: #ecf0f5;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --surface: #131d33;
  --surface-alt: #0f1729;
  --border: rgba(197,233,255,0.10);
  --border-strong: rgba(197,233,255,0.20);
  --text: #f5f7fa;
  --text-2: #a9b4c7;
  --muted: #8792a8;
  --accent: #13cdb5;
  --accent-rgb: 19,205,181;
  --accent-hover: #3fdcc7;
  --accent-text: #13cdb5;
  --on-accent: #06231f;
  --success: #3ccb7f;
  --error: #f97066;
  --info: #6ba6ff;
  --input-bg: #0f1729;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-lg: 0 24px 48px -12px rgba(0,0,0,0.6);
  --aside-bg: #0f1729;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid rgba(var(--accent-rgb), 0.55); outline-offset: 2px; }

/* ── Brand ── */
.brand { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 2.5rem; color: var(--text); }
/* The nasma.si symbol: the letter nun in the text colour with its dot in signal teal. */
.brand-mark { flex-shrink: 0; width: 34px; height: 34px; display: block; color: var(--text); }
.brand-mark .dot { fill: var(--signal); stroke: var(--signal); stroke-width: 1.2; stroke-linejoin: round; }
.brand-name { font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; }

/* ── Single card pages (forgot / reset password) ── */
body.auth-card { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.card {
  width: 100%;
  max-width: 440px;
  padding: 2.25rem 2.25rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}
.card .brand { margin-bottom: 1.75rem; }

/* ── Split pages (sign in / sign up) ── */
.page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.form-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: 3rem 2rem;
  background: var(--surface);
}
.form-inner { width: 100%; max-width: 400px; margin: 0 auto; }
.aside-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: 3rem clamp(2rem, 6vw, 5rem);
  background: var(--aside-bg);
  border-left: 1px solid var(--border);
}
.aside-inner { max-width: 460px; }
.aside-title { font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.2; font-weight: 650; letter-spacing: -0.025em; margin-bottom: 0.9rem; }
.aside-sub { font-size: 1rem; line-height: 1.6; color: var(--text-2); margin-bottom: 2.25rem; }
.points { list-style: none; display: grid; gap: 1.35rem; }
.points li { display: flex; gap: 0.9rem; align-items: flex-start; }
.point-icon {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--accent-text);
  box-shadow: var(--shadow-sm);
}
.point-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.points strong { display: block; font-size: 0.95rem; font-weight: 600; margin-bottom: 0.1rem; }
.points span { font-size: 0.875rem; color: var(--muted); line-height: 1.5; }

/* ── Form ── */
.form-title { font-size: 1.6rem; font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; margin-bottom: 0.45rem; }
.form-sub { color: var(--muted); font-size: 0.9375rem; line-height: 1.55; margin-bottom: 1.75rem; }

.result { display: none; padding: 0.7rem 0.9rem; border-radius: 8px; font-size: 0.8125rem; margin-bottom: 1.1rem; border: 1px solid var(--border); line-height: 1.5; background: var(--surface-alt); color: var(--text-2); }
.result.show { display: block; }
.result.success { background: rgba(6,118,71,0.07); border-color: rgba(6,118,71,0.2); color: var(--success); }
.result.error   { background: rgba(217,45,32,0.06); border-color: rgba(217,45,32,0.2); color: var(--error); }
.result.info    { background: rgba(23,92,211,0.06); border-color: rgba(23,92,211,0.18); color: var(--info); }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.8125rem; color: var(--text-2); font-weight: 500; margin-bottom: 0.4rem; }
.field input {
  width: 100%;
  height: 42px;
  padding: 0 0.85rem;
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16); }
.field input::placeholder { color: var(--muted); opacity: 0.7; }
.field input:disabled, .field input[readonly] { opacity: 0.7; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.label-row a { font-size: 0.8125rem; }

.btn-submit {
  width: 100%;
  height: 42px;
  margin-top: 0.35rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.14);
  transition: background 0.12s;
}
.btn-submit:hover:not(:disabled) { background: var(--accent-hover); }
.btn-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.form-footer { display: flex; justify-content: space-between; margin-top: 1.5rem; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.875rem; color: var(--muted); }
.form-footer a { font-size: 0.875rem; }

@media (max-width: 920px) {
  .page { grid-template-columns: 1fr; }
  .aside-panel { display: none; }
}
@media (max-width: 480px) {
  .card { padding: 1.75rem 1.25rem; }
  .form-panel { padding: 2rem 1.25rem; }
}
