/* ============================================================================
   Project Atlas — Vodafone IoT design system
   ========================================================================== */
:root {
  --vf-red:      #e60000;
  --vf-red-2:    #ff3b3b;
  --vf-aqua:     #00b0ca;
  --vf-aqua-2:   #2ed9ef;
  --bg:          #0a0c0f;
  --bg-2:        #0e1116;
  --panel:       #14181d;
  --panel-2:     #181d23;
  --border:      #242b33;
  --border-2:    #2f3741;
  --text:        #eaf0f6;
  --muted:       #93a0ad;
  --muted-2:     #6b7682;
  --green:       #8ec63f;
  --amber:       #fecb00;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 18px 50px rgba(0,0,0,.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--vf-aqua-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }

/* Ambient background glow */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg-orbs::before, .bg-orbs::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(120px); opacity: .25;
}
.bg-orbs::before { width: 540px; height: 540px; background: var(--vf-red); top: -180px; right: -120px; }
.bg-orbs::after  { width: 480px; height: 480px; background: var(--vf-aqua); bottom: -200px; left: -140px; opacity:.18; }

/* ── Brand mark ─────────────────────────────────────────────────────────── */
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { width: 38px; height: 38px; flex: 0 0 auto; }
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand .brand-text strong { font-size: 16px; letter-spacing: -.01em; }
.brand .brand-text span { font-size: 10.5px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); }

/* ── Auth screens ───────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
@media (max-width: 900px){ .auth-wrap { grid-template-columns: 1fr; } .auth-aside { display:none; } }
.auth-aside {
  position: relative; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(1200px 600px at 0% 0%, rgba(230,0,0,.22), transparent 55%),
    radial-gradient(900px 500px at 100% 100%, rgba(0,176,202,.16), transparent 55%),
    var(--bg-2);
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.auth-aside .glyph { position:absolute; right:-80px; bottom:-60px; width: 460px; opacity:.06; }
.auth-hero h1 { font-size: 42px; margin: 28px 0 14px; max-width: 12ch; }
.auth-hero p { color: var(--muted); font-size: 16px; max-width: 42ch; }
.auth-points { list-style: none; padding: 0; margin: 36px 0 0; display:flex; flex-direction:column; gap:14px; }
.auth-points li { display:flex; gap:12px; align-items:flex-start; color: var(--text); font-size: 14.5px; }
.auth-points .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; background: var(--vf-aqua); flex:0 0 auto; box-shadow: 0 0 12px var(--vf-aqua); }
.confidential { color: var(--muted-2); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 26px; margin: 22px 0 6px; }
.auth-card .sub { color: var(--muted); margin: 0 0 28px; font-size: 14.5px; }
.auth-card .sub b { color: var(--text); }

/* ── Forms ──────────────────────────────────────────────────────────────── */
label.field { display:block; margin-bottom: 16px; }
label.field .lbl { display:block; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; letter-spacing:.3px; }
input, select, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border-2); color: var(--text);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 15px; font-family: var(--font);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--vf-aqua); box-shadow: 0 0 0 3px rgba(0,176,202,.18);
}
textarea { resize: vertical; min-height: 86px; }
.otp-input { letter-spacing: 14px; text-align: center; font-size: 28px; font-weight: 700; padding: 16px; }

.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px; cursor:pointer;
  border: none; border-radius: var(--radius-sm); padding: 12px 20px; font-size: 14.5px; font-weight: 600;
  font-family: var(--font); transition: transform .08s, filter .15s, background .15s; text-decoration:none;
}
.btn:hover { text-decoration:none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--vf-red), #b30000); color: #fff; box-shadow: 0 8px 24px rgba(230,0,0,.3); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-2); }
.btn-ghost:hover { border-color: var(--vf-aqua); color: var(--vf-aqua-2); }
.btn-aqua { background: linear-gradient(135deg, var(--vf-aqua), #0089a3); color:#001316; box-shadow:0 8px 24px rgba(0,176,202,.25); }
.btn-danger { background: transparent; border: 1px solid #5a2330; color: #ff7a8a; }
.btn-danger:hover { background: #3a1620; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.linkish { background:none; border:none; color: var(--vf-aqua-2); cursor:pointer; font-size: 14px; padding:0; font-family:var(--font); }

/* ── App shell ──────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--border); padding: 24px 18px; display:flex; flex-direction:column; gap: 8px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 4px 8px 20px; }
.nav { display:flex; flex-direction:column; gap: 4px; flex: 1; }
.nav a {
  display:flex; align-items:center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-sm);
  color: var(--muted); font-size: 14.5px; font-weight: 500; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--panel); color: var(--text); text-decoration:none; }
.nav a.active { background: rgba(230,0,0,.12); color: #fff; box-shadow: inset 3px 0 0 var(--vf-red); }
.nav a svg { width: 18px; height: 18px; flex:0 0 auto; opacity:.85; }
.nav .nav-section { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted-2); padding: 16px 14px 6px; }
.side-user { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 8px; }
.side-user .who { font-size: 13px; }
.side-user .who b { display:block; }
.side-user .who span { color: var(--muted); font-size: 12px; }
.badge-role { display:inline-block; font-size: 10px; letter-spacing:1px; text-transform:uppercase; padding: 2px 8px; border-radius: 999px; margin-top:6px; }
.badge-role.admin { background: rgba(230,0,0,.18); color: var(--vf-red-2); }
.badge-role.member { background: rgba(0,176,202,.15); color: var(--vf-aqua-2); }

.main { padding: 34px 40px 60px; max-width: 1180px; }
@media (max-width: 760px){ .shell { grid-template-columns: 1fr; } .sidebar { position:static; height:auto; flex-direction:row; flex-wrap:wrap; } .nav { flex-direction:row; flex-wrap:wrap; } .main { padding: 24px 18px 48px; } }

.page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom: 28px; flex-wrap:wrap; }
.page-head h1 { font-size: 30px; margin: 0; }
.page-head .eyebrow { color: var(--vf-aqua-2); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.page-head p.lead { color: var(--muted); margin: 6px 0 0; }

/* ── Cards & grid ───────────────────────────────────────────────────────── */
.grid { display:grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 920px){ .cols-2, .cols-3 { grid-template-columns: 1fr; } }
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px;
}
.card.pad-lg { padding: 28px 30px; }
.card h3 { margin: 0 0 14px; font-size: 16px; }
.card .card-sub { color: var(--muted); font-size: 13px; margin-top:-8px; margin-bottom:16px; }

.stat { display:flex; flex-direction:column; gap: 4px; }
.stat .num { font-size: 34px; font-weight: 800; letter-spacing:-.03em; }
.stat .num.aqua { color: var(--vf-aqua-2); }
.stat .num.red { color: var(--vf-red-2); }
.stat .lbl { color: var(--muted); font-size: 13px; }

/* Status banner */
.status-banner { display:flex; align-items:center; gap:18px; padding: 22px 26px; border-radius: var(--radius);
  border:1px solid var(--border); background: linear-gradient(135deg, rgba(142,198,63,.10), var(--panel)); }
.status-banner.at-risk { background: linear-gradient(135deg, rgba(254,203,0,.12), var(--panel)); }
.status-banner.off-track { background: linear-gradient(135deg, rgba(230,0,0,.14), var(--panel)); }
.status-pill { display:inline-flex; align-items:center; gap:8px; font-weight:700; font-size:13px; letter-spacing:.5px;
  text-transform:uppercase; padding: 7px 14px; border-radius:999px; white-space:nowrap; }
.status-pill .ping { width:9px; height:9px; border-radius:50%; }
.status-pill.on-track { background: rgba(142,198,63,.16); color: var(--green); }
.status-pill.on-track .ping { background: var(--green); box-shadow:0 0 0 0 rgba(142,198,63,.6); animation: ping 1.8s infinite; }
.status-pill.at-risk { background: rgba(254,203,0,.16); color: var(--amber); }
.status-pill.at-risk .ping { background: var(--amber); }
.status-pill.off-track { background: rgba(230,0,0,.18); color: var(--vf-red-2); }
.status-pill.off-track .ping { background: var(--vf-red-2); }
@keyframes ping { 0%{box-shadow:0 0 0 0 rgba(142,198,63,.5);} 70%{box-shadow:0 0 0 8px rgba(142,198,63,0);} 100%{box-shadow:0 0 0 0 rgba(142,198,63,0);} }

/* Timeline */
.timeline { list-style:none; margin:0; padding: 4px 0 0; }
.timeline li { position:relative; padding: 0 0 22px 30px; border-left: 2px solid var(--border); }
.timeline li:last-child { border-left-color: transparent; padding-bottom:0; }
.timeline .node { position:absolute; left:-8px; top:2px; width:15px; height:15px; border-radius:50%; background: var(--bg); border:2px solid var(--border-2); }
.timeline li.done .node { background: var(--green); border-color: var(--green); }
.timeline li.active .node { background: var(--vf-aqua); border-color: var(--vf-aqua); box-shadow:0 0 0 4px rgba(0,176,202,.2); }
.timeline .t-title { font-weight:600; font-size: 14.5px; }
.timeline .t-detail { color: var(--muted); font-size: 13px; margin-top:2px; }
.timeline .t-tag { font-size:10px; letter-spacing:1.5px; text-transform:uppercase; color: var(--muted-2); }

/* Lists / rows */
.row-list { display:flex; flex-direction:column; }
.list-row { display:flex; align-items:center; gap:16px; padding:14px 4px; border-bottom:1px solid var(--border); }
.list-row:last-child { border-bottom:none; }
.list-row .ic { width:42px; height:42px; flex:0 0 auto; border-radius:11px; display:grid; place-items:center;
  background: rgba(0,176,202,.12); color: var(--vf-aqua-2); }
.list-row .ic.doc { background: rgba(230,0,0,.12); color: var(--vf-red-2); }
.list-row .meta { flex:1; min-width:0; }
.list-row .meta b { display:block; font-size:14.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.list-row .meta span { color: var(--muted); font-size: 12.5px; }
.list-row .actions { display:flex; gap:8px; align-items:center; }

.tag { display:inline-block; font-size:11px; padding: 3px 10px; border-radius:999px; background: var(--panel-2); border:1px solid var(--border-2); color: var(--muted); }

/* Link cards */
.link-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap:16px; }
.link-card { display:block; padding: 20px; border-radius: var(--radius); border:1px solid var(--border);
  background: var(--panel); transition: transform .12s, border-color .12s, box-shadow .12s; position:relative; }
.link-card:hover { transform: translateY(-3px); border-color: var(--vf-aqua); box-shadow: var(--shadow); text-decoration:none; }
.link-card .lk-ic { width:40px;height:40px;border-radius:11px;display:grid;place-items:center;margin-bottom:14px;
  background: linear-gradient(135deg, rgba(230,0,0,.25), rgba(0,176,202,.2)); color:#fff; }
.link-card b { display:block; color: var(--text); font-size:15px; }
.link-card span { color: var(--muted); font-size:13px; }
.link-card .go { position:absolute; top:18px; right:18px; color: var(--muted); }

/* Flash */
.flash { padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 22px; font-size:14px; display:flex; align-items:center; gap:10px; }
.flash.msg { background: rgba(0,176,202,.12); border:1px solid rgba(0,176,202,.35); color: var(--vf-aqua-2); }
.flash.err { background: rgba(230,0,0,.12); border:1px solid rgba(230,0,0,.4); color: var(--vf-red-2); }

/* Tables */
table.tbl { width:100%; border-collapse: collapse; }
table.tbl th { text-align:left; font-size:11px; letter-spacing:1px; text-transform:uppercase; color:var(--muted-2); padding:10px 12px; border-bottom:1px solid var(--border); }
table.tbl td { padding: 13px 12px; border-bottom:1px solid var(--border); font-size:14px; vertical-align:middle; }
table.tbl tr:last-child td { border-bottom:none; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size:12.5px; color:var(--muted); }

.divider { height:1px; background:var(--border); margin: 26px 0; border:none; }
.section-title { font-size:12px; letter-spacing:2px; text-transform:uppercase; color: var(--vf-aqua-2); margin: 0 0 16px; }
.muted { color: var(--muted); }
.inline-form { display:inline; }
.flex { display:flex; } .gap8{gap:8px;} .gap12{gap:12px;} .items-center{align-items:center;} .between{justify-content:space-between;} .wrap{flex-wrap:wrap;}
.mt8{margin-top:8px;} .mt16{margin-top:16px;} .mt24{margin-top:24px;} .mb0{margin-bottom:0;}
.empty { text-align:center; padding: 40px 20px; color: var(--muted); }
.empty svg { opacity:.4; margin-bottom:12px; }
details.adder { border:1px dashed var(--border-2); border-radius: var(--radius-sm); padding: 0 16px; margin-bottom: 18px; }
details.adder[open] { padding-bottom: 18px; }
details.adder summary { cursor:pointer; padding: 14px 0; font-weight:600; color: var(--vf-aqua-2); list-style:none; }
details.adder summary::-webkit-details-marker { display:none; }
