/* Cloud Fixation — Vault design system (Dark "Cyber Matte" app canvas) */
:root {
  --bg: #0B0F19;            /* Cyber Matte Black — primary app background */
  --bg2: #111827;           /* nav bars, sidebars, input surfaces */
  --card: #111827;          /* solid surface */
  --card2: #161E2E;         /* hover / secondary surface */
  --border: #1F2937;        /* default dark border */
  --border-accent: #8E2DE2; /* brand purple — active / selected */
  --text: #EEF2F8;
  --muted: #94A3B8;
  --accent: #00D2FF;        /* Electric Blue — focus, links, glows */
  --purple: #8E2DE2;        /* brand purple */
  --grad1: #2D7FF9;         /* gradient blue */
  --grad2: #8E2DE2;         /* gradient purple */
  --danger: #F0616D;
  --ok: #34D399;
  --warn: #FBBF24;
  --r-sm: 8px;              /* buttons, inputs, badges */
  --r-lg: 16px;             /* cards, lists, containers */
  --shadow: 0 10px 30px -10px rgba(0,0,0,.5);     /* dark security glow */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --glass: rgba(17,24,39,0.7);
  --glass-border: rgba(255,255,255,0.08);
  --topbar-bg: rgba(17,24,39,.82);
  --modal-overlay: rgba(5,8,14,.62);
  --body-glow1: rgba(142,45,226,.16);
  --body-glow2: rgba(0,210,255,.10);
}
/* ---- Light mode (marketing-grade clean canvas) ---- */
:root[data-theme="light"] {
  --bg: #FFFFFF;
  --bg2: #F8FAFC;
  --card: #FFFFFF;
  --card2: #F1F5F9;
  --border: #E2E8F0;
  --border-accent: #8E2DE2;
  --text: #0B0F19;
  --muted: #64748B;
  --accent: #0094B3;        /* deepened electric blue for contrast on white */
  --shadow: 0 4px 20px -2px rgba(11,15,25,.08);
  --glass: rgba(255,255,255,0.75);
  --glass-border: rgba(15,23,42,0.06);
  --topbar-bg: rgba(248,250,252,.85);
  --modal-overlay: rgba(15,23,42,.32);
  --body-glow1: rgba(142,45,226,.07);
  --body-glow2: rgba(0,210,255,.06);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background:
    radial-gradient(1100px 560px at 82% -12%, var(--body-glow1) 0%, transparent 55%),
    radial-gradient(900px 520px at -10% 112%, var(--body-glow2) 0%, transparent 52%),
    var(--bg);
  transition: background .25s var(--ease), color .25s var(--ease);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.screen { min-height: 100vh; }
.hidden { display: none !important; }

/* ---------- login ---------- */
.login-screen { display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.login-glow {
  position: absolute; width: 540px; height: 540px; border-radius: 50%;
  background: radial-gradient(circle, rgba(142,45,226,.30), transparent 62%);
  filter: blur(46px); top: -130px; right: -130px; z-index: 0; pointer-events: none;
}
/* glassmorphism card */
.login-card {
  position: relative; z-index: 1;
  background: var(--glass);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 40px 34px;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow);
  text-align: center;
}
.logo {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--grad1), var(--grad2));
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  box-shadow: 0 12px 30px -8px rgba(142,45,226,.5);
}
.brand-logo { width: 88px; height: 88px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 26px rgba(0,210,255,.30)); }
.brandline { color: var(--muted); font-size: 13px; margin: 2px 0 16px; }
.brandline b { color: var(--text); font-weight: 700; }
.tagline { margin-top: 20px; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.brand-mark-img { width: 26px; height: 26px; object-fit: contain; vertical-align: middle; }
.brand-by { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-left: 4px; padding: 2px 7px; border: 1px solid var(--border); border-radius: 999px; }
.login-card h1 { margin: 0; font-size: 30px; letter-spacing: -.02em; }
.login-card .sub { color: var(--muted); margin: 6px 0 24px; }
.login-card form { text-align: left; }
.tabs { display: flex; gap: 4px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 4px; margin-bottom: 16px; }
.tab { flex: 1; background: transparent; color: var(--muted); padding: 10px; border-radius: var(--r-sm); font-weight: 600; transition: all .25s var(--ease); }
.tab:hover { color: var(--text); background: rgba(0,210,255,.10); }
.tab.active { background: linear-gradient(135deg, var(--grad1), var(--grad2)); color: #fff; box-shadow: 0 6px 18px -6px rgba(142,45,226,.6); }
.tab.active:hover { background: linear-gradient(135deg, var(--grad1), var(--grad2)); }
/* icon input fields */
.field { position: relative; display: flex; align-items: center; margin-top: 12px; }
.field .fi { position: absolute; left: 13px; font-size: 15px; opacity: .65; pointer-events: none; }
.field input { flex: 1; padding-left: 40px; padding-right: 44px; height: 48px; }
.field .eye { right: 8px; }
.field.hidden { display: none; }
button.primary.big { height: 50px; font-size: 15px; margin-top: 18px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 18px 0 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.zoho-btn { width: 100%; background: #fff; color: #1a1a1a; border: 1px solid var(--border); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; gap: 8px; transition: all .25s var(--ease); }
.zoho-btn::before { content: "Z"; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; background: #e42527; color: #fff; border-radius: 4px; font-weight: 800; font-size: 12px; }
.zoho-btn:hover { filter: brightness(0.97); box-shadow: 0 6px 18px -8px rgba(0,0,0,.5); }
a.ghost { text-decoration: none; display: inline-flex; align-items: center; }
label { display: block; font-size: 11px; color: var(--muted); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .06em; }
input, textarea, select {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text); padding: 12px 13px; font-size: 14px; outline: none;
  transition: all .25s var(--ease);
}
/* focused fields — electric-blue glowing frame */
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,210,255,.15); }
textarea { resize: vertical; }
.pw-row { position: relative; display: flex; }
.pw-row input { flex: 1; padding-right: 44px; }
.pw-row input[id="f-password"] { padding-right: 82px; }
.eye2 { right: 42px; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; cursor: pointer; font-size: 15px; color: var(--muted);
  width: 34px; height: 34px; border-radius: var(--r-sm); padding: 0; transition: all .25s var(--ease);
}
.eye:hover { background: rgba(0,210,255,.12); color: var(--text); }

button { cursor: pointer; border: none; border-radius: var(--r-sm); padding: 12px 16px; font-size: 14px; font-weight: 600; transition: all .25s var(--ease); }
button:active { transform: translateY(1px); }
button.primary { background: linear-gradient(135deg, var(--grad1), var(--grad2)); color: white; width: 100%; margin-top: 22px; box-shadow: 0 10px 28px -10px rgba(142,45,226,.6); }
button.primary:hover { filter: brightness(1.08); box-shadow: 0 12px 32px -8px rgba(142,45,226,.7); }
button.primary.small, button.small { width: auto; margin-top: 0; padding: 9px 14px; }
button.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--border); }
button.ghost:hover { background: rgba(0,210,255,.10); border-color: var(--accent); }
button.danger { background: var(--danger); color: white; }
button.danger:hover { filter: brightness(1.06); }

.status { margin-top: 14px; font-size: 13px; min-height: 18px; }
.status.err { color: var(--danger); }
.status.ok { color: var(--ok); }
.hint { color: var(--muted); font-size: 12px; margin-top: 16px; line-height: 1.5; }

/* ---------- topbar (nav surface) ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5;
  background: var(--topbar-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand-mark { font-size: 16px; }
.search-wrap { flex: 1; position: relative; max-width: 480px; }
.search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 16px; }
.search-wrap input { padding-left: 34px; }
.user-chip { display: flex; align-items: center; gap: 7px; background: var(--card2); border: 1px solid var(--border); padding: 7px 12px; border-radius: 999px; font-size: 13px; color: var(--muted); cursor: pointer; max-width: 200px; transition: all .25s var(--ease); }
.user-chip:hover { border-color: var(--border-accent); color: var(--text); }
.user-chip #who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.profile-grid { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin-top: 6px; }
.prow { display: flex; justify-content: space-between; gap: 14px; padding: 12px 14px; background: var(--card); }
.prow .plabel { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.prow .pval { color: var(--text); font-weight: 600; font-size: 14px; text-align: right; word-break: break-word; }

/* ---------- items / lists ---------- */
main { max-width: 760px; margin: 0 auto; padding: 20px 18px 60px; }
.stats { color: var(--muted); font-size: 13px; margin: 4px 2px 14px; }
.items { display: flex; flex-direction: column; gap: 10px; }
.item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 14px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer;
  transition: all .25s var(--ease);
}
.item:hover { border-color: var(--border-accent); background: var(--card2); box-shadow: var(--shadow); }
.item .avatar {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; color: white;
}
.item .meta { flex: 1; min-width: 0; }
.item .title { font-weight: 600; }
.item .username { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .actions { display: flex; gap: 6px; }
.icon-btn {
  background: var(--card2); border: 1px solid var(--border); color: var(--muted);
  width: 36px; height: 36px; padding: 0; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); font-size: 15px; transition: all .25s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); background: rgba(0,210,255,.10); }
.empty { text-align: center; color: var(--muted); margin-top: 60px; }
.empty-ico { font-size: 40px; margin-bottom: 8px; }
.empty p { margin: 0 0 16px; }

/* ---------- modal (glass) ---------- */
.modal { position: fixed; inset: 0; background: var(--modal-overlay); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 20; }
/* theme toggle */
.theme-btn { background: var(--card2); border: 1px solid var(--border); color: var(--text); cursor: pointer; border-radius: var(--r-sm); transition: all .25s var(--ease); }
.theme-btn:hover { border-color: var(--accent); background: rgba(0,210,255,.10); }
.theme-corner { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; border-radius: 999px; }
.modal-card {
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: var(--r-lg);
  padding: 26px; width: 100%; max-width: 460px; max-height: 92vh; overflow: auto; box-shadow: var(--shadow);
}
.modal-card h2 { margin: 0 0 6px; }
.modal-card .sub { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.modal-actions { display: flex; align-items: center; gap: 8px; margin-top: 22px; }
.spacer { flex: 1; }

/* strength meter */
.strength { height: 6px; background: var(--bg2); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; border-radius: 999px; transition: all .25s var(--ease); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--ok); color: #04150f; padding: 11px 20px; border-radius: 12px;
  font-weight: 700; z-index: 50; box-shadow: var(--shadow);
}
