:root {
  color-scheme: dark;
  --bg: #07090e;
  --panel: rgba(17, 20, 29, 0.82);
  --line: rgba(255, 255, 255, 0.1);
  --muted: #959cab;
  --text: #f6f7fb;
  --cyan: #79e8ff;
  --violet: #a98cff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; color: var(--text); background: var(--bg); }
button, input { font: inherit; }
button { color: inherit; }

.login-page {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 22% 18%, rgba(82, 52, 148, .28), transparent 30rem),
    radial-gradient(circle at 78% 75%, rgba(36, 133, 154, .18), transparent 32rem),
    linear-gradient(135deg, #07080d, #0b0d15 62%, #080a0f);
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  opacity: .12;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.login-shell { width: min(92vw, 480px); padding: 32px 0; }
.login-panel {
  position: relative;
  overflow: hidden;
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(24, 27, 39, .9), rgba(12, 14, 21, .92));
  box-shadow: 0 32px 90px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.05);
  backdrop-filter: blur(22px);
}
.login-panel::after {
  content: ""; position: absolute; width: 180px; height: 180px; right: -75px; top: -90px;
  background: var(--violet); opacity: .12; filter: blur(30px); border-radius: 50%;
}
.brand-mark { display: flex; gap: 5px; height: 28px; align-items: end; margin-bottom: 34px; }
.brand-mark span { width: 7px; border-radius: 6px; background: linear-gradient(to top, var(--violet), var(--cyan)); }
.brand-mark span:nth-child(1) { height: 13px; }
.brand-mark span:nth-child(2) { height: 27px; }
.brand-mark span:nth-child(3) { height: 19px; }
.eyebrow { color: var(--cyan); font-size: 11px; letter-spacing: .22em; font-weight: 700; margin: 0 0 12px; }
.login-panel h1, .intro h1 { letter-spacing: -.04em; margin: 0; font-weight: 620; }
.login-panel h1 { font-size: clamp(34px, 8vw, 46px); }
.login-copy { color: var(--muted); line-height: 1.65; margin: 14px 0 32px; }
.login-form label { display: block; color: #c4c8d2; font-size: 13px; margin-bottom: 10px; }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.password-row input {
  min-width: 0; padding: 14px 16px; color: white; border: 1px solid var(--line); border-radius: 12px;
  outline: none; background: rgba(0, 0, 0, .28); transition: border-color .2s, box-shadow .2s;
}
.password-row input:focus { border-color: rgba(121,232,255,.65); box-shadow: 0 0 0 4px rgba(121,232,255,.08); }
.password-row button {
  border: 0; border-radius: 12px; padding: 0 21px; cursor: pointer; font-weight: 700; color: #071014;
  background: linear-gradient(135deg, #b5f5ff, var(--cyan)); box-shadow: 0 8px 28px rgba(121,232,255,.15);
}
.login-error { color: #ff9aa9; font-size: 13px; margin: 12px 0 0; }
.security-note { color: #737b8b; font-size: 12px; margin-top: 31px; display: flex; align-items: center; gap: 8px; }
.security-note i, .online-dot { width: 6px; height: 6px; border-radius: 50%; background: #6ff7ad; box-shadow: 0 0 10px rgba(111,247,173,.75); }

.portal-page { overflow-x: hidden; background: radial-gradient(circle at 50% -20%, #171929, var(--bg) 46%); }
.ambient { position: fixed; border-radius: 50%; pointer-events: none; filter: blur(80px); opacity: .09; }
.ambient-one { width: 450px; height: 450px; background: var(--violet); top: 15%; left: -260px; }
.ambient-two { width: 520px; height: 520px; background: var(--cyan); right: -330px; bottom: -180px; }
.topbar { width: min(1180px, calc(100% - 48px)); height: 92px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { display: flex; gap: 12px; align-items: center; color: white; text-decoration: none; font-size: 14px; font-weight: 650; }
.wordmark-glyph { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: #0c0c12; background: linear-gradient(135deg, #fff, #aeb7c8); }
.logout { border: 1px solid var(--line); background: rgba(255,255,255,.035); border-radius: 10px; padding: 9px 14px; cursor: pointer; color: #b9bfca; font-size: 12px; }
.logout:hover { color: white; border-color: rgba(255,255,255,.24); }
.portal-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 74px 0 80px; }
.intro h1 { font-size: clamp(38px, 6vw, 64px); max-width: 700px; }
.intro > p:last-child { color: var(--muted); margin: 18px 0 0; }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 48px; }
.app-card { position: relative; min-height: 390px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); text-decoration: none; color: white; transition: transform .25s, border-color .25s, box-shadow .25s; }
a.app-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.22); box-shadow: 0 24px 60px rgba(0,0,0,.34); }
.card-art { height: 210px; position: relative; overflow: hidden; background-image: var(--card-image), radial-gradient(circle at 65% 35%, rgba(121,232,255,.25), transparent 26%), linear-gradient(135deg, #23263b, #0b0d15); background-position: center; background-size: cover; }
.accent-violet .card-art { background-image: var(--card-image), radial-gradient(circle at 65% 35%, rgba(169,140,255,.3), transparent 30%), linear-gradient(135deg, #25213c, #0c0d15); }
.art-grid { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px); background-size: 30px 30px; mask-image: linear-gradient(to bottom, black, transparent); }
.card-body { position: relative; padding: 24px 26px 26px; }
.card-meta { color: #9ca3b2; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #62efa5; box-shadow: 0 0 10px rgba(98,239,165,.55); }
.disabled .status-dot { background: #70798a; box-shadow: none; }
.card-body h2, .add-card h2 { font-size: 24px; letter-spacing: -.025em; margin: 13px 0 8px; }
.card-body p, .add-card p { color: var(--muted); line-height: 1.55; margin: 0; font-size: 14px; max-width: 85%; }
.card-arrow { position: absolute; right: 25px; bottom: 27px; font-size: 24px; color: var(--cyan); }
.card-soon { position: absolute; right: 25px; bottom: 27px; font-size: 11px; color: #818897; border: 1px solid var(--line); border-radius: 20px; padding: 6px 9px; }
.disabled { opacity: .67; }
.add-card { min-height: 128px; grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 26px; border-style: dashed; background: rgba(255,255,255,.018); }
.add-icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; font-size: 26px; color: #7d8493; }
.add-card h2 { font-size: 16px; margin: 0 0 4px; }
.add-card p { font-size: 13px; }
footer { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 35px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; color: #656c7a; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
footer b { color: #363b46; }

@media (max-width: 720px) {
  .login-panel { padding: 32px 24px; }
  .password-row { grid-template-columns: 1fr; }
  .password-row button { padding: 14px; }
  .topbar, .portal-shell, footer { width: min(100% - 30px, 1180px); }
  .topbar { height: 76px; }
  .portal-shell { padding-top: 52px; }
  .app-grid { grid-template-columns: 1fr; }
  .app-card { min-height: 350px; }
  .add-card { grid-column: auto; min-height: 110px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
