/* ============================================================================
   Auth + account pages — same Film Lab language as the app, but centred and
   quiet: one lit panel in a dark room.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600;700&family=Chakra+Petch:wght@600;700&family=IBM+Plex+Mono:wght@400&display=swap');

:root {
  --ink: #100c0a;
  --panel: #17120f;
  --panel-2: #1f1814;
  --panel-3: #2a211b;
  --line: #2e241d;
  --line-hot: #4a3728;
  --text: #f4ece2;
  --text-2: #c3b3a3;
  --text-dim: #8a7969;
  --text-faint: #5f5348;
  --amber: #f2a049;
  --amber-hot: #ffb867;
  --amber-deep: #b8702a;
  --teal: #4fc7c0;
  --ok: #6fc98a;
  --err: #e8685f;
  --font-body: 'Bai Jamjuree', 'Leelawadee UI', 'Noto Sans Thai', 'Segoe UI', sans-serif;
  --font-display: 'Chakra Petch', 'Bai Jamjuree', 'Leelawadee UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Consolas', monospace;
  --r: 8px;
  --r-lg: 14px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  position: relative;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(760px 460px at 50% -10%, rgba(242,160,73,.13), transparent 62%);
}

/* ------------------------------------------------------------- the card */

.auth {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  box-shadow: 0 28px 70px -24px rgba(0,0,0,.9);
  animation: rise .45s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.auth.wide { max-width: 660px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 15px;
  letter-spacing: .13em; text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--text);
  text-decoration: none;
}
.brand i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(242,160,73,.16), 0 0 14px var(--amber);
}

.auth h1 {
  font-family: var(--font-display);
  font-size: 21px; font-weight: 700;
  margin: 14px 0 4px;
}
.auth .lede { color: var(--text-dim); font-size: 13.5px; margin: 0 0 24px; }

/* -------------------------------------------------------------- fields */

label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 7px;
}

input[type=text], input[type=email], input[type=password] {
  width: 100%;
  font: inherit; font-size: 14px;
  color: var(--text);
  background: #120e0c;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 11px 13px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}
input:focus {
  outline: none;
  border-color: var(--amber-deep);
  background: var(--panel-2);
  box-shadow: 0 0 0 3px rgba(242,160,73,.11);
}
input::placeholder { color: var(--text-faint); }

.field { margin-bottom: 17px; }

/* ------------------------------------------------------------- buttons */

.btn {
  font: inherit; font-size: 14px; font-weight: 500;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 11px 16px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .16s var(--ease);
  text-decoration: none;
}
.btn:hover:not(:disabled) { background: var(--panel-3); border-color: var(--line-hot); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  width: 100%;
  background: linear-gradient(var(--amber), var(--amber-deep));
  border-color: var(--amber-hot);
  color: #1a1005; font-weight: 700;
  box-shadow: 0 6px 22px -8px rgba(242,160,73,.65);
}
.btn-primary:hover:not(:disabled) { background: linear-gradient(var(--amber-hot), var(--amber)); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-danger { border-color: rgba(232,104,95,.4); color: #f0aaa4; }
.btn-danger:hover:not(:disabled) { background: rgba(232,104,95,.1); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------- notices */

.note {
  border-radius: var(--r);
  padding: 10px 13px;
  font-size: 13px;
  border: 1px solid;
  line-height: 1.55;
  margin-top: 14px;
}
.note.info    { background: rgba(79,199,192,.07);  border-color: rgba(79,199,192,.28);  color: #a5e2df; }
.note.success { background: rgba(111,201,138,.07); border-color: rgba(111,201,138,.28); color: #a9dcb8; }
.note.error   { background: rgba(232,104,95,.07);  border-color: rgba(232,104,95,.30);  color: #f0aaa4; }

.foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}
.foot a { color: var(--amber); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* -------------------------------------------------------- account page */

.acct-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px;
}
.acct-head .grow { flex: 1; }

.key {
  background: #120e0c;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 12px;
}
.key h3 {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  margin: 0 0 3px;
  display: flex; align-items: center; gap: 9px;
}
.key .desc { font-size: 12.5px; color: var(--text-faint); margin: 0 0 12px; }
.key .state {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--line-hot);
  color: var(--text-dim);
  font-weight: 400; letter-spacing: 0; text-transform: none;
}
.key .state.on { color: var(--ok); border-color: rgba(111,201,138,.4); }
/* Running on the shared key rather than the user's own — informational, not
   a problem, so it reads teal instead of green. */
.key .state.shared { color: var(--teal); border-color: rgba(79,199,192,.4); }

.key-row { display: flex; gap: 8px; }
.key-row input { flex: 1; font-family: var(--font-mono); font-size: 12px; }

@media (max-width: 560px) {
  .auth { padding: 26px 20px; }
  .key-row { flex-direction: column; }
}
