/* TLP Technologies company portal. Same visual language as the Workspace admin panel (frontend-admin/src/index.css):
   ink #07101E, accent #00A2ED, accessible accent text #0068A8, Archivo (wide headings), light/dark by system. Local font only. */
@font-face { font-family: "Archivo"; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("/assets/archivo-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Archivo"; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("/assets/archivo-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: 245 246 248; --surface: 255 255 255; --surface-2: 249 250 251; --muted: 238 241 244;
  --fg: 15 26 42; --fg-muted: 75 85 101; --fg-subtle: 107 116 130;
  --border: 227 231 236; --border-strong: 200 207 216;
  --ink: 7 16 30; --ink-fg: 255 255 255; --ink-hover: 24 38 60;
  --accent: 0 162 237; --accent-strong: 0 104 168; --accent-soft: 232 243 250;
  --success: 26 127 78; --danger: 180 35 24; --danger-soft: 252 233 231;
  --sidebar: 11 23 40; --sidebar-fg: 236 240 245; --sidebar-muted: 152 165 184; --sidebar-active: 28 43 66; --sidebar-border: 30 45 68;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: 9 17 30; --surface: 15 26 43; --surface-2: 18 31 50; --muted: 27 41 62;
    --fg: 233 238 245; --fg-muted: 160 173 192; --fg-subtle: 136 150 172;
    --border: 36 52 77; --border-strong: 56 75 103;
    --ink: 233 238 245; --ink-fg: 7 16 30; --ink-hover: 205 215 228;
    --accent: 51 181 241; --accent-strong: 110 204 247; --accent-soft: 12 47 72;
    --success: 74 222 128; --danger: 252 129 129; --danger-soft: 66 22 26;
    --sidebar: 5 12 23; --sidebar-fg: 233 238 245; --sidebar-muted: 150 163 182; --sidebar-active: 24 38 60; --sidebar-border: 27 41 62;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: rgb(var(--bg)); color: rgb(var(--fg)); font: 0.9375rem/1.5 "Archivo", ui-sans-serif, system-ui, sans-serif; font-stretch: 100%; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
h1, h2, h3 { font-stretch: 112%; letter-spacing: -0.015em; text-wrap: balance; margin: 0; font-weight: 600; }
h1 { font-size: 1.5rem; line-height: 1.25; }
h2 { font-size: 1.05rem; }
p { text-wrap: pretty; margin: 0; }
a { color: rgb(var(--accent-strong)); }
:focus-visible { outline: 2px solid rgb(var(--accent-strong)); outline-offset: 2px; }
::selection { background: rgb(var(--accent) / 0.25); }
.muted { color: rgb(var(--fg-muted)); }
.small { font-size: .8125rem; }

/* ---------- controls (same shapes as the admin panel: 6px radius, ink primary button, 1px borders) ---------- */
label { display: flex; flex-direction: column; gap: .375rem; font-size: .8125rem; font-weight: 500; }
label.check { flex-direction: row; align-items: center; gap: .6rem; font-weight: 400; font-size: .9rem; min-height: 40px; }
input, select { font: inherit; font-size: .9375rem; height: 40px; padding: 0 .75rem; border: 1px solid rgb(var(--border)); border-radius: 6px; background: rgb(var(--surface)); color: rgb(var(--fg)); width: 100%; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover { border-color: rgb(var(--border-strong)); }
input:focus-visible, select:focus-visible { outline: none; border-color: rgb(var(--accent-strong)); box-shadow: 0 0 0 3px rgb(var(--accent) / 0.3); }
input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: rgb(var(--accent-strong)); }
.hint { font-size: .75rem; color: rgb(var(--fg-muted)); font-weight: 400; }
.pw { position: relative; }
.pw input { padding-right: 2.75rem; }
.pw button { position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; border: 0; background: transparent; color: rgb(var(--fg-muted)); border-radius: 6px; cursor: pointer; font-size: 0; }
.pw button:hover { background: rgb(var(--muted)); color: rgb(var(--fg)); }
.pw button svg { width: 16px; height: 16px; }
.btn { font: inherit; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: 0 1.25rem; border: 1px solid rgb(var(--ink)); border-radius: 6px; background: rgb(var(--ink)); color: rgb(var(--ink-fg)); cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s; }
.btn:hover { background: rgb(var(--ink-hover)); border-color: rgb(var(--ink-hover)); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 .9rem; font-size: .8125rem; }
.btn.secondary { background: rgb(var(--surface)); color: rgb(var(--fg)); border-color: rgb(var(--border)); }
.btn.secondary:hover { background: rgb(var(--muted)); border-color: rgb(var(--border-strong)); }
.btn.danger { background: transparent; color: rgb(var(--danger)); border-color: rgb(var(--danger) / .4); }
.btn.danger:hover { background: rgb(var(--danger-soft)); }
.btn.ghost-on-dark { background: transparent; color: rgb(var(--sidebar-fg)); border-color: rgb(var(--sidebar-border)); min-height: 36px; font-size: .8125rem; }
.btn.ghost-on-dark:hover { background: rgb(var(--sidebar-active)); }
.card { background: rgb(var(--surface)); border: 1px solid rgb(var(--border)); border-radius: 8px; padding: 1.5rem; margin: 0 0 1.25rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
fieldset { border: 1px solid rgb(var(--border)); border-radius: 6px; padding: .5rem 1rem; margin: 0; }
legend { padding: 0 .4rem; font-size: .8125rem; font-weight: 500; }
.alert, .err { padding: .6rem .8rem; border-radius: 6px; border: 1px solid rgb(var(--danger) / .3); background: rgb(var(--danger-soft)); color: rgb(var(--danger)); font-size: .875rem; }
.flash { padding: .6rem .8rem; border-radius: 6px; margin-bottom: 1rem; border: 1px solid rgb(var(--border)); background: rgb(var(--surface)); font-size: .875rem; }
.flash.ok { border-color: rgb(var(--success) / .4); color: rgb(var(--success)); }
.flash.err { border-color: rgb(var(--danger) / .3); color: rgb(var(--danger)); background: rgb(var(--danger-soft)); }

/* ---------- login / 2FA: split layout like the Workspace admin ---------- */
.auth { display: grid; min-height: 100dvh; grid-template-columns: minmax(360px, 5fr) 7fr; }
.auth aside { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 2.5rem; background: rgb(var(--sidebar)); color: rgb(var(--sidebar-fg)); border-right: 1px solid rgb(var(--sidebar-border)); }
.auth aside .big-logo { height: 52px; width: auto; display: block; }
.auth aside .sub { margin-top: 1rem; font-size: .875rem; }
.auth aside .sub span { display: block; color: rgb(var(--sidebar-muted)); }
.auth aside h2 { font-size: 1.6rem; line-height: 1.3; font-weight: 600; max-width: 22rem; }
.auth aside p.lead { margin-top: .75rem; font-size: .875rem; color: rgb(var(--sidebar-muted)); max-width: 24rem; }
.auth aside .foot { font-size: .75rem; color: rgb(var(--sidebar-muted)); }
.auth main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1rem; }
.auth .box { width: 100%; max-width: 24rem; }
.auth .mlogo { display: none; margin-bottom: 1.5rem; }
.auth .mlogo img { height: 36px; width: auto; }
.auth .tag { display: inline-block; border-radius: 3px; background: rgb(var(--ink)); color: rgb(var(--ink-fg)); font-size: .75rem; font-weight: 600; padding: .1rem .5rem; }
.auth h1 { margin-top: .75rem; }
.auth .ahead { margin-bottom: 1.5rem; }
.auth .ahead p { margin-top: .25rem; font-size: .875rem; color: rgb(var(--fg-muted)); }
.auth form { padding: 1.5rem; border: 1px solid rgb(var(--border)); border-radius: 8px; background: rgb(var(--surface)); }
.auth .alert { margin-bottom: 1rem; }
.auth .note { margin-top: 1rem; font-size: .75rem; color: rgb(var(--fg-muted)); display: flex; gap: .5rem; align-items: flex-start; }
.auth .note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.code-in { letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.qr { width: 200px; max-width: 100%; margin: 0 auto 1rem; background: #fff; padding: 8px; border-radius: 6px; border: 1px solid rgb(var(--border)); }
.qr svg { display: block; width: 100%; height: auto; }
.secret { word-break: break-all; font-size: .9rem; }
.codes { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.codes code { font-size: 1rem; }
.light-logo { display: block; } .dark-logo { display: none; }
@media (prefers-color-scheme: dark) { .light-logo { display: none; } .dark-logo { display: block; } }
@media (max-width: 1023px) {
  .auth { grid-template-columns: 1fr; }
  .auth aside { display: none; }
  .auth .mlogo { display: block; }
  .auth main { align-items: flex-start; padding-top: 2.5rem; }
}

/* ---------- app shell ---------- */
.top { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding: .75rem 1.5rem; background: rgb(var(--sidebar)); color: rgb(var(--sidebar-fg)); border-bottom: 1px solid rgb(var(--sidebar-border)); }
.top .brand img { height: 34px; width: auto; display: block; }
.nav { display: flex; gap: .25rem; flex: 1; }
.nav a { padding: 0 .85rem; min-height: 40px; display: inline-flex; align-items: center; border-radius: 6px; text-decoration: none; color: rgb(var(--sidebar-muted)); font-size: .875rem; transition: background-color .15s, color .15s; }
.nav a:hover { background: rgb(var(--sidebar-active)); color: rgb(var(--sidebar-fg)); }
.nav a[aria-current=page] { background: rgb(var(--sidebar-active)); color: rgb(var(--sidebar-fg)); }
.top :focus-visible { outline-color: rgb(var(--accent)); }
.who { display: flex; align-items: center; gap: .75rem; margin-left: auto; font-size: .875rem; color: rgb(var(--sidebar-muted)); }
.who form { margin: 0; }
main.page { max-width: 1160px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* ---------- home ---------- */
.welcome { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
.welcome h1 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.15; }
.welcome p { margin-top: .5rem; color: rgb(var(--fg-muted)); }
.corner { min-width: 15rem; padding: 1rem 1.25rem; border: 1px solid rgb(var(--border)); border-radius: 8px; background: rgb(var(--surface)); text-align: right; }
.time { font-size: 2rem; font-weight: 600; font-stretch: 112%; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.date { color: rgb(var(--fg-muted)); font-size: .875rem; margin-top: .15rem; }
.weather { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid rgb(var(--border)); display: flex; gap: .6rem; justify-content: flex-end; align-items: baseline; }
.weather[hidden] { display: none; }
.w-temp { font-weight: 600; font-size: 1.1rem; } .w-txt { color: rgb(var(--fg-muted)); font-size: .8125rem; }
@media (max-width: 600px) { .corner { text-align: left; width: 100%; } .weather { justify-content: flex-start; } }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; list-style: none; padding: 0; }
.tile { position: relative; display: flex; flex-direction: column; height: 100%; background: rgb(var(--surface)); border: 1px solid rgb(var(--border)); border-radius: 12px; overflow: hidden; color: rgb(var(--fg)); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.tile .plate { display: flex; align-items: center; justify-content: center; height: 128px; padding: 1.5rem; background: #fff; border-bottom: 1px solid rgb(var(--border)); }
.tile .plate img { max-height: 64px; max-width: 78%; width: auto; height: auto; display: block; }
.tile .plate img.sq { height: 72px; max-height: 72px; }
.tile .body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.t-name { font-weight: 600; font-size: 1.15rem; font-stretch: 112%; letter-spacing: -0.015em; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.t-name svg { width: 18px; height: 18px; color: rgb(var(--fg-subtle)); flex: none; transition: transform .2s, color .2s; }
.t-desc { color: rgb(var(--fg-muted)); font-size: .875rem; }
a.tile:hover { border-color: rgb(var(--accent)); box-shadow: 0 8px 24px rgb(var(--ink) / 0.10); transform: translateY(-2px); }
a.tile:hover .t-name svg, a.tile:focus-visible .t-name svg { color: rgb(var(--accent-strong)); transform: translate(2px, -2px); }
a.tile:focus-visible { outline: 3px solid rgb(var(--accent-strong)); outline-offset: 3px; }
.tile.soon { background: rgb(var(--surface-2)); border-style: dashed; cursor: not-allowed; }
.tile.soon .plate img { filter: grayscale(1); opacity: .45; }
.tile.soon .t-name, .tile.soon .t-desc { opacity: .75; }
.badge { align-self: flex-start; margin-top: .5rem; font-size: .75rem; font-weight: 500; padding: .15rem .6rem; border-radius: 99px; border: 1px solid rgb(var(--border-strong)); color: rgb(var(--fg-muted)); background: rgb(var(--surface)); }
.calendar { border-style: dashed; background: rgb(var(--surface-2)); }

/* ---------- tables / lists ---------- */
.tablewrap { overflow-x: auto; padding: .4rem 1rem; }
table { border-collapse: collapse; width: 100%; font-size: .875rem; }
th, td { text-align: left; padding: .7rem .5rem; border-bottom: 1px solid rgb(var(--border)); vertical-align: top; }
th { color: rgb(var(--fg-muted)); font-weight: 500; font-size: .75rem; }
tr:last-child td { border-bottom: 0; }
.pill { padding: .1rem .55rem; border-radius: 99px; font-size: .75rem; border: 1px solid currentColor; }
.pill.ok { color: rgb(var(--success)); } .pill.off { color: rgb(var(--fg-muted)); }
@media (max-width: 700px) {
  main.page { padding: 1.25rem 16px 2.5rem; }
  .top { padding: .75rem 16px; gap: .75rem; }
  .tiles { grid-template-columns: 1fr; gap: 1rem; }
  .tile .plate { height: 104px; }
  thead { display: none; }
  tr { display: block; padding: .6rem 0; border-bottom: 1px solid rgb(var(--border)); }
  td { display: flex; gap: .6rem; border: 0; padding: .15rem 0; }
  td::before { content: attr(data-l); min-width: 6rem; color: rgb(var(--fg-muted)); font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; } a.tile:hover { transform: none; } }

.mb { margin-bottom: 1rem; } .mt { margin-top: .4rem; }
.card.narrow { max-width: 32rem; }
.tile .plate img.sym { max-height: 44px; }
