:root{
  --bg:#f3fbff;
  --bg-soft:#f8fdff;
  --card:rgba(255,255,255,.92);
  --text:#0f172a;
  --muted:#64748b;
  --border:#dcebf7;
  --primary:#4d84f7;
  --primary-dark:#356eea;
  --primary2:#5ccbef;
  --primary3:#7ee7e0;
  --primary-soft:#eaf8ff;
  --success:#12b76a;
  --success-soft:#dcfae6;
  --danger:#f04438;
  --danger-soft:#fee4e2;
  --shadow:0 26px 80px rgba(15,23,42,.12);
  --shadow-soft:0 16px 48px rgba(48,112,192,.10);
  --radius:26px;
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}
button,input,textarea{font:inherit}
button{cursor:pointer}
button:disabled{opacity:.65;cursor:not-allowed}
svg{width:20px;height:20px;fill:currentColor;flex:0 0 auto}

.app-body{background:radial-gradient(circle at top right,rgba(95,201,239,.18),transparent 30%),linear-gradient(180deg,#fff 0,#edf8ff 240px,var(--bg) 100%)}
.topbar{height:82px;background:rgba(255,255,255,.94);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 2.2rem;position:sticky;top:0;z-index:10;backdrop-filter:blur(16px)}
.brand{font-weight:900;letter-spacing:.04em;color:var(--primary);font-size:1.55rem;display:flex;align-items:center;gap:.65rem}
.brand-icon,.logo-mark{width:44px;height:44px;border-radius:14px;display:inline-grid;place-items:center;color:#fff;background:linear-gradient(135deg,var(--primary),var(--primary2));box-shadow:0 14px 30px rgba(79,132,248,.20);font-size:1.9rem;line-height:1;font-weight:900}
.brand-icon.asset,.logo-mark.asset,.profile-logo.asset{background:#fff;border:1px solid #d9ecfb;box-shadow:0 10px 22px rgba(79,132,248,.14);padding:6px;overflow:hidden}
.brand-icon.asset img,.logo-mark.asset img,.profile-logo.asset img{width:100%;height:100%;display:block;object-fit:contain}
.brand-icon.asset,.logo-mark.asset{font-size:0;line-height:0}
.top-actions{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.nav-pill,.ghost-btn,.row-actions button,.icon-btn{border:1px solid var(--border);background:#fff;color:#344054;border-radius:12px;padding:.78rem 1.1rem;font-weight:800;display:inline-flex;align-items:center;gap:.55rem;box-shadow:0 4px 12px rgba(17,24,39,.03)}
.nav-pill:hover,.ghost-btn:hover,.row-actions button:hover,.icon-btn:hover{border-color:#b7d9fb;color:var(--primary);background:#f7fcff}
.nav-pill.active,.side-link.active{border-color:transparent;color:#fff;background:linear-gradient(135deg,var(--primary),var(--primary2));box-shadow:0 14px 28px rgba(79,132,248,.20)}

.elevated-card,.search-card,.results-panel,.admin-card,.stat-card,.profile-card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-soft)}
.eyebrow{color:var(--primary);font-size:.82rem;letter-spacing:.08em;text-transform:uppercase;font-weight:900;margin:0 0 .35rem}
.muted{color:var(--muted)}
.small{font-size:.9rem}
h1,h2,h3,p{margin-top:0}
h1{font-size:clamp(2rem,4vw,3rem);line-height:1.05;margin-bottom:.7rem}
h2{font-size:1.25rem;margin-bottom:.4rem}

.auth-body{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 20% 10%,#e7f7fd,transparent 28%),radial-gradient(circle at 90% 80%,#dff5ff,transparent 22%),var(--bg)}
.auth-shell{width:min(470px,92vw)}
.auth-card{padding:2.1rem;border-radius:30px}
.logo-row{display:flex;align-items:center;gap:.75rem;color:var(--primary);font-size:1.35rem;margin-bottom:1.2rem}
.auth-card h1{font-size:2.2rem;margin:.2rem 0 .6rem}
.auth-card p{color:var(--muted)}

.stack-form{display:grid;gap:1rem;margin-top:1.25rem}
.stack-form label{display:grid;gap:.45rem;font-weight:800;color:#344054}
.stack-form small{color:var(--muted);font-weight:600}
input,textarea{border:1px solid var(--border);border-radius:13px;padding:.9rem 1rem;background:#fff;outline:none;color:var(--text);transition:border-color .15s,box-shadow .15s}
input::placeholder,textarea::placeholder{color:#98a2b3}
input:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(79,132,248,.14)}
.stack-form button[type=submit],.search-card button,.import-row button{border:0;border-radius:14px;padding:.95rem 1.2rem;color:#fff;background:linear-gradient(135deg,var(--primary),#58bff1);font-weight:900;box-shadow:0 15px 30px rgba(79,132,248,.22)}
.form-status{min-height:1.3rem;color:var(--muted);font-weight:800;margin:.85rem 0 0}
.form-status.ok{color:var(--success)}
.form-status.error,.error-state{color:var(--danger)}

.admin-shell{display:grid;grid-template-columns:250px minmax(0,1fr);min-height:calc(100vh - 82px)}
.admin-sidebar{border-right:1px solid var(--border);padding:1.5rem 1rem;background:rgba(255,255,255,.76);display:flex;flex-direction:column;justify-content:space-between;gap:1.5rem}
.side-nav{display:grid;gap:.7rem;position:sticky;top:106px}
.side-link{display:flex;align-items:center;gap:.85rem;padding:1rem 1.1rem;border-radius:13px;font-weight:850;color:#344054;border:1px solid transparent}
.side-link:not(.active):hover{background:#fff;border-color:var(--border);color:var(--primary)}
.profile-card{padding:1rem;margin-top:auto}
.profile-logo{width:56px;height:56px;border:1px solid var(--border);border-radius:14px;display:grid;place-items:center;font-size:2rem;color:var(--primary);margin-bottom:.8rem}
.profile-logo.asset{padding:8px}
.profile-card strong{display:block;color:var(--primary);font-size:1.1rem}
.profile-card span{display:block;color:var(--muted);margin-top:.25rem}
.admin-content{padding:2.2rem;display:grid;gap:1.35rem;min-width:0}
.hero-section{display:flex;justify-content:space-between;gap:1rem;align-items:flex-end}

.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.1rem;margin:0}
.stat-card{padding:1.25rem;display:flex;align-items:center;gap:1rem;min-height:112px}
.stat-icon,.mini-icon{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#eef8ff,#e6fbff);color:var(--primary);box-shadow:inset 0 0 0 1px rgba(79,132,248,.08)}
.stat-card span:not(.stat-icon){color:#344054;font-weight:800;font-size:.92rem}
.stat-card strong{display:block;font-size:2rem;color:var(--primary);line-height:1;margin-top:.35rem}

.admin-workspace{display:grid;grid-template-columns:minmax(0,1fr) 370px;gap:1.35rem;align-items:start}
.admin-card{padding:1.35rem;overflow:hidden}
.accounts-card{min-height:400px}
.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.section-head.compact{margin-bottom:.8rem}
.table-wrap{overflow:auto;border-radius:16px}
table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid var(--border);border-radius:16px;overflow:hidden;background:#fff;min-width:760px}
th,td{padding:1rem;text-align:left;border-bottom:1px solid var(--border);vertical-align:middle}
th{background:linear-gradient(180deg,#fbfdff,#f3f9ff);color:#344054;font-size:.85rem;font-weight:900}
tr:last-child td{border-bottom:0}
td{color:#344054}
.row-actions{display:flex;gap:.45rem;flex-wrap:wrap}
.row-actions button{border-radius:10px;padding:.5rem .7rem;font-size:.82rem;box-shadow:none}
.status{display:inline-flex;align-items:center;gap:.35rem;border-radius:999px;padding:.35rem .7rem;font-size:.78rem;font-weight:900}
.status::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.status.active{background:var(--success-soft);color:#079455}
.status.inactive{background:var(--danger-soft);color:#d92d20}
.empty-state{border:1px dashed #d0d5dd;border-radius:16px;padding:1rem;color:var(--muted);background:#fff}

.form-panel{position:sticky;top:104px}
.form-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.switch-row{display:flex!important;align-items:center;justify-content:space-between;grid-template-columns:1fr auto!important;position:relative;padding:.25rem 0;color:#344054;font-weight:900}
.switch-row input{position:absolute;opacity:0;pointer-events:none}
.switch-ui{width:48px;height:28px;border-radius:999px;background:#d0d5dd;position:relative;transition:.15s}
.switch-ui::after{content:"";width:22px;height:22px;border-radius:50%;background:#fff;position:absolute;top:3px;left:3px;box-shadow:0 2px 5px rgba(0,0,0,.2);transition:.15s}
.switch-row input:checked + .switch-ui{background:linear-gradient(135deg,var(--primary),var(--primary2))}
.switch-row input:checked + .switch-ui::after{left:23px}

.flow-card h2{color:var(--primary)}
.flow-steps{display:flex;align-items:center;gap:1.2rem;flex-wrap:wrap}
.flow-steps article{width:132px;min-height:112px;border:1px solid var(--border);border-radius:14px;display:grid;place-items:center;text-align:center;padding:.8rem;background:#fff}
.flow-steps article span{font-size:2.2rem;font-weight:900;line-height:1}
.netflix-icon{color:#e50914}.gmail-icon{color:#ea4335}.app-icon,.shield-icon{color:var(--primary)}
.flow-steps strong{font-size:.9rem}.flow-steps small{color:var(--muted)}.flow-arrow{font-size:2rem;color:#667085;font-weight:900}
.import-row{display:flex;gap:1rem;flex-wrap:wrap;align-items:center}
.security-note{background:linear-gradient(135deg,#fff,#fbf8ff)}

.user-shell{width:min(1220px,94vw);margin:2.2rem auto;display:grid;grid-template-columns:380px minmax(0,1fr);gap:1.35rem;align-items:start}
.user-hero-card{display:grid;gap:1rem}
.user-hero-card h1{font-size:2.55rem}.user-hero-card .search-card{padding:1.25rem}
.search-card form{display:grid;gap:.85rem}.search-card label{display:grid;gap:.45rem;font-weight:800;color:#344054}
.results-panel{padding:1.35rem;min-height:520px}
.panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.counter{background:var(--primary-soft);color:var(--primary);font-weight:900;border-radius:999px;padding:.42rem .78rem;min-width:38px;text-align:center}
.results-list{display:grid;gap:1rem}
.result-item{border:1px solid var(--border);border-radius:18px;padding:1rem;background:#fff;box-shadow:0 8px 22px rgba(17,24,39,.04)}
.result-top{display:flex;justify-content:space-between;gap:1rem}.result-subject{font-weight:900;font-size:1.05rem;margin:.2rem 0 .6rem;color:#1d2939}
.pill{display:inline-flex;align-items:center;border-radius:999px;padding:.3rem .7rem;font-size:.78rem;font-weight:900;background:var(--success-soft);color:#079455}.home-item .pill{background:var(--primary-soft);color:var(--primary)}
.otp-row{display:flex;align-items:center;gap:1rem;justify-content:space-between;background:#f4fbff;border-radius:14px;padding:.9rem;margin:.9rem 0}.otp-row span{font-weight:900;color:#079455;font-size:.8rem}.otp-row strong{letter-spacing:.35em;font-size:1.35rem;color:#111827}.otp-row button{border:1px solid var(--border);background:#fff;border-radius:999px;padding:.55rem 1rem;font-weight:900;color:var(--primary)}
.mini-flow{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center;color:#667085}.mini-flow span{background:#fff;border:1px solid var(--border);border-radius:999px;padding:.5rem .8rem;font-weight:850}.mini-flow b{color:var(--primary)}

.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.66);display:grid;place-items:center;padding:1rem;z-index:20}.modal{width:min(760px,94vw);background:#fff;border-radius:20px;overflow:hidden;box-shadow:var(--shadow)}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.2rem;border-bottom:1px solid var(--border)}.modal-header button{border:1px solid var(--border);background:#fff;border-radius:50%;width:36px;height:36px;font-weight:900}.modal-content{padding:1.2rem}.modal-content pre{white-space:pre-wrap;background:#f7f7fb;border-radius:14px;padding:1rem;max-height:280px;overflow:auto}.open-link{display:inline-flex;margin:.5rem .5rem .5rem 0;background:var(--primary);color:#fff;border-radius:999px;padding:.7rem 1rem;font-weight:900}.modal-subject{font-weight:900;font-size:1.1rem}

@media(max-width:1180px){.admin-workspace{grid-template-columns:1fr}.form-panel{position:static}.stats-grid{grid-template-columns:repeat(2,1fr)}.user-shell{grid-template-columns:1fr}}
@media(max-width:900px){.topbar{height:auto;min-height:82px;padding:1rem;align-items:flex-start;gap:1rem;flex-direction:column}.top-actions{width:100%;justify-content:flex-start}.admin-shell{grid-template-columns:1fr}.admin-sidebar{border-right:0;border-bottom:1px solid var(--border);position:static}.side-nav{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}.profile-card{display:none}.admin-content{padding:1.2rem}.flow-steps{gap:.6rem}.flow-arrow{display:none}}
@media(max-width:620px){.stats-grid,.side-nav{grid-template-columns:1fr}.nav-pill,.ghost-btn{padding:.65rem .78rem}.admin-content,.user-shell{width:100%;margin:0;padding:1rem}.top-actions{gap:.45rem}.brand{font-size:1.25rem}.brand-icon{width:38px;height:38px}.otp-row{align-items:flex-start;flex-direction:column}.flow-steps article{width:100%}table{min-width:680px}}

/* V4 hardening: SVG icons keep safe dimensions even if browser cache mixes old HTML/CSS. */
.topbar svg,.admin-sidebar svg,.stat-icon svg,.mini-icon svg,.nav-pill svg,.side-link svg,.ghost-btn svg,.row-actions svg{width:20px!important;height:20px!important;max-width:20px!important;max-height:20px!important;display:inline-block!important;fill:currentColor!important;flex:0 0 20px!important;}
.stat-icon svg,.mini-icon svg{width:28px!important;height:28px!important;max-width:28px!important;max-height:28px!important;flex-basis:28px!important;}
.top-actions .nav-pill{min-height:52px;}

/* V5: Lucide-style outline icons, local inline SVG (no CDN dependency). */
svg.lucide{
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:2.15!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
.nav-pill svg.lucide,.side-link svg.lucide,.ghost-btn svg.lucide,.row-actions svg.lucide{
  width:20px!important;height:20px!important;max-width:20px!important;max-height:20px!important;flex:0 0 20px!important;
}
.stat-icon svg.lucide,.mini-icon svg.lucide{
  width:30px!important;height:30px!important;max-width:30px!important;max-height:30px!important;flex:0 0 30px!important;stroke-width:2!important;
}
.stat-icon,.mini-icon{
  background:linear-gradient(135deg,#f3ecff,#e9ddff);
  color:var(--primary);
  border:1px solid rgba(109,40,255,.10);
}
.stack-form button[type=submit],.search-card button,.import-row button{
  display:inline-flex;align-items:center;justify-content:center;gap:.6rem;
}
.stack-form button[type=submit] svg.lucide,.search-card button svg.lucide,.import-row button svg.lucide{
  width:20px!important;height:20px!important;stroke:white!important;
}


/* ==============================
   Reqool Premium UI - v7
   ============================== */
body{background:#f3fbff}
.app-body{
  background:
    radial-gradient(circle at 5% 0%, rgba(126,231,224,.20), transparent 26%),
    radial-gradient(circle at 88% 8%, rgba(77,132,247,.16), transparent 32%),
    linear-gradient(180deg,#ffffff 0,#f0faff 245px,#f6fbff 100%);
}
.topbar{
  height:88px;
  border-bottom:1px solid rgba(133,173,213,.22);
  background:rgba(255,255,255,.82);
  box-shadow:0 8px 35px rgba(15,23,42,.045);
}
.brand{font-size:1.62rem;letter-spacing:.015em;color:#256fdc;text-transform:none}
.brand-icon,.logo-mark{width:50px;height:50px;border-radius:17px;background:#fff}
.brand-icon.asset,.logo-mark.asset,.profile-logo.asset{
  border:1px solid rgba(92,203,239,.35);
  box-shadow:0 18px 36px rgba(77,132,247,.16), inset 0 0 0 1px rgba(255,255,255,.9);
}
.nav-pill,.ghost-btn,.row-actions button,.icon-btn{
  border:1px solid rgba(137,167,204,.30);
  background:rgba(255,255,255,.80);
  backdrop-filter:blur(14px);
  border-radius:16px;
  color:#1e293b;
  box-shadow:0 10px 28px rgba(15,23,42,.045);
}
.nav-pill:hover,.ghost-btn:hover,.row-actions button:hover,.icon-btn:hover{
  border-color:rgba(77,132,247,.35);
  color:#256fdc;
  background:#fff;
  transform:translateY(-1px);
}
.nav-pill.active,.side-link.active,.stack-form button[type=submit],.search-card button,.import-row button{
  background:linear-gradient(135deg,#4d84f7 0%,#55b7f3 55%,#5ccbef 100%);
  box-shadow:0 18px 38px rgba(77,132,247,.24);
}
.elevated-card,.search-card,.results-panel,.admin-card,.stat-card,.profile-card{
  background:rgba(255,255,255,.90);
  border:1px solid rgba(139,174,212,.28);
  box-shadow:0 18px 50px rgba(50,95,150,.095);
  backdrop-filter:blur(16px);
}
h1{letter-spacing:-.045em;color:#0f172a}
h2{letter-spacing:-.018em;color:#0f172a}.eyebrow{color:#2f80ed;letter-spacing:.12em}.muted{color:#66758a}
.admin-shell{grid-template-columns:272px minmax(0,1fr)}
.admin-sidebar{
  padding:1.6rem 1.15rem;
  background:linear-gradient(180deg,rgba(255,255,255,.78),rgba(245,251,255,.72));
  backdrop-filter:blur(22px);
}
.side-link{border-radius:18px;padding:1.05rem 1.15rem;color:#25344a;font-weight:900}
.side-link:not(.active):hover{background:rgba(255,255,255,.92);border-color:rgba(77,132,247,.18)}
.profile-card{border-radius:24px;background:linear-gradient(180deg,#fff,rgba(247,252,255,.94));padding:1.15rem}
.profile-card strong{color:#256fdc}
.admin-content{padding:2.45rem;gap:1.55rem}
.hero-section{
  padding:1.15rem 1.25rem;
  border-radius:28px;
  background:linear-gradient(135deg,rgba(255,255,255,.72),rgba(236,249,255,.62));
  border:1px solid rgba(139,174,212,.20);
}
.hero-section h1{font-size:clamp(2.25rem,3.4vw,3.55rem);margin-bottom:.55rem}
.stats-grid{gap:1.25rem}
.stat-card{
  min-height:124px;
  border-radius:24px;
  padding:1.35rem;
  position:relative;
  overflow:hidden;
}
.stat-card::after{
  content:"";
  position:absolute;
  inset:auto -18% -42% auto;
  width:150px;height:150px;
  background:radial-gradient(circle,rgba(92,203,239,.18),transparent 65%);
  pointer-events:none;
}
.stat-icon,.mini-icon{
  width:64px;height:64px;
  background:linear-gradient(135deg,rgba(77,132,247,.12),rgba(92,203,239,.18));
  color:#3f7fec;
  box-shadow:inset 0 0 0 1px rgba(77,132,247,.12),0 12px 28px rgba(77,132,247,.10);
}
.stat-card strong{
  font-size:2.16rem;
  background:linear-gradient(135deg,#356eea,#55b7f3,#58d4db);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.admin-workspace{gap:1.55rem;grid-template-columns:minmax(0,1fr) 392px}
.admin-card{border-radius:28px;padding:1.55rem}
.accounts-card{min-height:430px}
table{border-color:rgba(139,174,212,.32);border-radius:20px;box-shadow:0 10px 24px rgba(50,95,150,.045)}
th{background:linear-gradient(180deg,#fbfeff,#eff9ff);color:#334155;letter-spacing:.02em}
td{color:#334155}.row-actions button{border-radius:13px;font-weight:900}
.status{border-radius:999px;padding:.42rem .78rem}.status.active{background:#e7f9ef;color:#08965a}.status.inactive{background:#fff0ef;color:#d92d20}
.form-panel{top:112px;background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(250,253,255,.92))}
input,textarea{
  border-color:rgba(139,174,212,.35);
  background:rgba(255,255,255,.86);
  border-radius:16px;
}
input:focus,textarea:focus{border-color:#58bff1;box-shadow:0 0 0 5px rgba(92,203,239,.16)}
.switch-ui{background:#cbd5e1}.switch-row input:checked + .switch-ui{background:linear-gradient(135deg,#4d84f7,#5ccbef)}
.flow-card{background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(238,250,255,.86))}.flow-card h2{color:#256fdc}
.flow-steps article{border-radius:20px;border-color:rgba(139,174,212,.32);box-shadow:0 12px 24px rgba(50,95,150,.055)}
.import-row input[type=file]{background:#fff}
.security-note{background:linear-gradient(135deg,#ffffff,#ebf9ff)}
.auth-body{
  background:
    radial-gradient(circle at 15% 8%,rgba(126,231,224,.28),transparent 30%),
    radial-gradient(circle at 92% 80%,rgba(77,132,247,.18),transparent 28%),
    linear-gradient(180deg,#fff,#f2fbff);
}
.auth-card{padding:2.35rem;border-radius:34px;box-shadow:0 28px 80px rgba(50,95,150,.14)}
.logo-row{font-size:1.52rem;color:#256fdc}.auth-card h1{letter-spacing:-.04em}
.user-shell{gap:1.55rem}.user-hero-card{padding:1.35rem;border-radius:28px;background:linear-gradient(135deg,rgba(255,255,255,.74),rgba(235,249,255,.62));border:1px solid rgba(139,174,212,.20)}
.results-panel{border-radius:30px}.result-item{border-radius:22px;box-shadow:0 14px 34px rgba(50,95,150,.07)}
.counter,.home-item .pill{background:#eaf8ff;color:#256fdc}.otp-row{background:#f1faff}.otp-row button{color:#256fdc}
.open-link{background:linear-gradient(135deg,#4d84f7,#5ccbef)}
@media(max-width:1180px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-workspace{grid-template-columns:1fr}.form-panel{position:static}}
@media(max-width:860px){.topbar{height:auto;min-height:82px;padding:1rem}.admin-shell{grid-template-columns:1fr}.admin-sidebar{border-right:0;border-bottom:1px solid var(--border)}.side-nav{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}.profile-card{display:none}.admin-content{padding:1.25rem}.hero-section{padding:1rem}.user-shell{grid-template-columns:1fr}}
@media(max-width:620px){.stats-grid,.side-nav{grid-template-columns:1fr}.brand{font-size:1.35rem}.brand-icon,.logo-mark{width:44px;height:44px}.admin-card{padding:1.1rem;border-radius:22px}.stat-card{min-height:108px}.top-actions{width:100%;justify-content:flex-start}.nav-pill{flex:1;justify-content:center}.flow-steps article{width:100%}}


/* V8 panel usuario limpio */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.clean-user-shell{grid-template-columns:360px minmax(0,1fr);align-items:start}
.panel-search-clean{padding:1.4rem 1.35rem 1.5rem;background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(246,252,255,.92));}
.panel-search-clean h1{font-size:2.05rem;line-height:1.08;letter-spacing:-.04em;margin:0 0 .75rem;color:#14213d}
.panel-search-clean > p{font-size:1rem;line-height:1.5;margin-bottom:1.2rem;max-width:28ch}
.clean-search-form{display:grid;gap:.95rem}
.clean-label{display:block}
.clean-label input{width:100%;padding:1rem 1.05rem;border-radius:16px;font-weight:700}
.clean-search-form button{width:100%}
.clean-user-shell .results-panel{min-height:560px}
@media(max-width:1180px){.clean-user-shell{grid-template-columns:1fr}}


/* V9 login premium similar a referencia */
.auth-shell-premium{width:min(470px,92vw)}
.auth-card-premium{padding:2.15rem 2rem 1.9rem;border-radius:34px;background:rgba(255,255,255,.92);border:1px solid rgba(160,198,229,.40);box-shadow:0 28px 80px rgba(50,95,150,.14)}
.auth-brand-center{display:flex;align-items:center;justify-content:center;gap:.8rem;color:#2f6fd7;font-size:1.02rem;font-weight:900;margin:.1rem 0 2rem}
.auth-brand-center .logo-mark{width:58px;height:58px;border-radius:18px;padding:7px}
.auth-brand-center strong{font-size:1.22rem;letter-spacing:.01em}
.quote-card{border:1px solid rgba(173,201,228,.50);border-radius:22px;background:rgba(255,255,255,.72);padding:1rem 1rem 1.15rem;margin:0 auto 2rem;max-width:330px;box-shadow:inset 0 1px 0 rgba(255,255,255,.75)}
.quote-card-head{display:flex;align-items:center;justify-content:space-between;gap:.8rem;margin-bottom:.8rem}
.quote-title{display:inline-flex;align-items:center;gap:.5rem;color:#635bff;font-weight:900;font-size:1rem}
.quote-title svg.lucide{width:18px!important;height:18px!important;stroke:#635bff!important}
.quote-badge{width:28px;height:28px;border-radius:999px;background:#eef2f7;display:grid;place-items:center;color:#667085;border:1px solid rgba(173,201,228,.45)}
.quote-badge svg.lucide{width:15px!important;height:15px!important;stroke:#667085!important;stroke-width:2.2!important}
.quote-card blockquote{margin:0;color:#4b5563;font-family:Georgia, 'Times New Roman', serif;font-style:italic;font-size:1.08rem;line-height:1.55;text-align:center}
.login-clean-form{gap:1.15rem;margin-top:0}
.login-clean-form label{gap:.55rem;font-size:1rem;font-weight:900;color:#334155}
.login-clean-form input{padding:1rem 1.1rem;border-radius:16px;background:rgba(255,255,255,.92);font-weight:700}
.login-clean-form button{margin-top:.15rem;padding:1rem 1.2rem;border-radius:16px;font-size:1.04rem}
.form-status-note{margin-top:1.15rem;text-align:center;color:#8a94a7;background:rgba(255,248,241,.68);border-radius:0;padding:.2rem .5rem;display:table;margin-left:auto;margin-right:auto;min-height:auto;font-weight:500}
.form-status.error{background:transparent;color:var(--danger);font-weight:800;display:block}.form-status.ok{background:transparent;color:var(--success);font-weight:800;display:block}
@media(max-width:620px){.auth-card-premium{padding:1.55rem 1.2rem 1.35rem}.auth-brand-center{margin-bottom:1.55rem}.quote-card{max-width:none}.quote-card blockquote{font-size:1rem}}


/* V10 panel usuario ajustado a referencia */
.clean-user-shell{width:min(1180px,94vw);margin:2rem auto 2.4rem;grid-template-columns:358px minmax(0,1fr);gap:1.6rem;align-items:start}
.panel-search-clean{padding:1.45rem 1.35rem 1.25rem;border-radius:34px;min-height:350px;background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(246,252,255,.94));box-shadow:0 20px 55px rgba(50,95,150,.10)}
.panel-search-clean h1{font-size:3rem;line-height:1.02;letter-spacing:-.055em;margin:0 0 1.25rem;color:#172554;font-weight:900}
.panel-search-clean > p{font-size:1rem;line-height:1.5;max-width:250px;margin:0 0 2rem;color:#64748b}
.clean-search-form{gap:1.05rem}
.clean-label input{padding:1.05rem 1.08rem;border-radius:18px;background:rgba(255,255,255,.96);color:#334155;font-size:1rem;font-weight:800;border:1px solid #c9d9ea}
.clean-label input::placeholder{color:#94a3b8;font-weight:800}
.clean-search-form button{width:100%;padding:1rem 1.15rem;border-radius:18px;font-size:1rem;font-weight:900;box-shadow:0 18px 38px rgba(77,132,247,.25)}
.panel-status{min-height:0;margin:0;font-size:.92rem;color:#6b7280}
.panel-status:empty{display:none}
.clean-user-shell .results-panel{min-height:520px;padding:1.35rem 1.35rem 1.25rem;border-radius:34px;background:rgba(255,255,255,.94);box-shadow:0 20px 55px rgba(50,95,150,.10)}
.clean-user-shell .panel-heading{margin-bottom:1.4rem}
.clean-user-shell .panel-heading .eyebrow{font-size:.85rem;letter-spacing:.14em;font-weight:900;margin-bottom:.45rem;color:#3b82f6}
.clean-user-shell .panel-heading h2{font-size:1.15rem;margin:.1rem 0 .45rem;color:#0f172a;font-weight:900}
.clean-user-shell .panel-heading .small{font-size:.98rem;color:#64748b;text-transform:none}
.clean-user-shell .counter{background:#eaf4ff;color:#256fdc;min-width:34px;height:34px;display:grid;place-items:center;padding:0;border-radius:999px;font-size:1rem;box-shadow:none}
.clean-user-shell .empty-state{border:1px dashed #d6dee8;border-radius:20px;background:#fff;color:#7c8aa0;padding:1.05rem 1.15rem;font-size:1rem}
@media(max-width:1180px){.clean-user-shell{grid-template-columns:1fr}}
@media(max-width:620px){.clean-user-shell{width:100%;margin:0;padding:1rem}.panel-search-clean h1{font-size:2.35rem}.panel-search-clean{min-height:auto}}


/* V11 flow icons modernizados */
.flow-steps article{gap:.35rem}
.flow-icon{width:54px;height:54px;display:grid;place-items:center;margin-bottom:.2rem;border-radius:16px;background:linear-gradient(135deg,#f8fcff,#eef7ff)}
.flow-steps article span.flow-icon{font-size:2rem;line-height:1;font-weight:900}
.flow-icon svg.lucide{width:28px!important;height:28px!important;max-width:28px!important;max-height:28px!important;stroke-width:2.1!important}
.netflix-icon{color:#e50914;background:linear-gradient(135deg,#fff5f5,#fff)}
.gmail-icon{color:#ea4335;background:linear-gradient(135deg,#fff7f2,#fff)}
.app-icon{color:#4d84f7;background:linear-gradient(135deg,#f2f7ff,#fff)}
.otp-icon{color:#4d84f7;background:linear-gradient(135deg,#f2f7ff,#fff)}


/* V12 fix: botón Buscar código con degradado celeste */
.clean-search-form button{
  border:0;
  border-radius:18px;
  padding:1rem 1.15rem;
  color:#fff;
  background:linear-gradient(135deg,#4d84f7 0%,#55b7f3 55%,#5ccbef 100%);
  font-weight:900;
  box-shadow:0 18px 38px rgba(77,132,247,.25);
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.clean-search-form button:hover{
  filter:brightness(1.02);
}
.clean-search-form button:focus{
  outline:none;
  box-shadow:0 0 0 4px rgba(92,203,239,.18),0 18px 38px rgba(77,132,247,.25);
}

/* V21 - permisos, acceso compartido y bandeja admin */
select{
  width:100%;
  border:1px solid rgba(139,174,212,.35);
  background:rgba(255,255,255,.94);
  border-radius:14px;
  padding:.78rem .9rem;
  color:#334155;
  font-weight:700;
}
select:focus{outline:none;border-color:#58bff1;box-shadow:0 0 0 4px rgba(92,203,239,.14)}
.status.warning{background:#fff7e8;color:#b76e00}
.status.danger{background:#fff0ef;color:#d92d20}
.v2-workspace{margin-top:1.35rem}
.inline-rule-form{display:grid;grid-template-columns:minmax(280px,2fr) minmax(170px,.8fr) minmax(150px,.7fr) auto;gap:.75rem;align-items:center;margin:1rem 0}
.inline-rule-form input,.inline-rule-form select{min-height:48px}
.table-input{min-width:320px;padding:.7rem .8rem;border-radius:12px}
.rules-table select{min-width:160px;padding:.65rem .7rem}
.rules-table input[type=checkbox]{width:20px;height:20px}
.event-preview{margin-top:.35rem;max-width:700px;line-height:1.35}
.pending-dot{display:inline-flex;margin-top:.3rem;border-radius:999px;padding:.22rem .5rem;background:#fff7e8;color:#b76e00;font-size:.72rem;font-weight:900}
#import .import-actions{display:flex;gap:.8rem;align-items:center;flex-wrap:wrap;margin-top:1rem}
#import .import-form{display:flex;gap:.65rem;align-items:center;flex-wrap:wrap}
#import input[type=file]{max-width:360px}
.clean-label select{width:100%;padding:1.05rem 1.08rem;border-radius:18px;background:rgba(255,255,255,.96);color:#334155;font-size:1rem;font-weight:800;border:1px solid #c9d9ea}
.top-actions .muted{align-self:center}
@media(max-width:980px){.inline-rule-form{grid-template-columns:1fr 1fr}.inline-rule-form input{grid-column:1/-1}}
@media(max-width:620px){.inline-rule-form{grid-template-columns:1fr}.inline-rule-form input{grid-column:auto}.table-input{min-width:220px}}

.portal-label {
  margin: -2px 0 14px;
  text-align: center;
  font-weight: 800;
  color: #52637a;
  letter-spacing: .02em;
}


/* V3.1 - Sistema visual de iconos Lucide (SVG local, sin CDN) */
svg.lucide{
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:2!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
.nav-pill svg.lucide,.side-link svg.lucide,.ghost-btn svg.lucide,.row-actions button svg.lucide,
.stack-form button svg.lucide,.inline-rule-form button svg.lucide,.import-form button svg.lucide,.clean-search-form button svg.lucide{
  width:18px!important;height:18px!important;max-width:18px!important;max-height:18px!important;flex:0 0 18px!important;
}
.side-link svg.lucide{color:#65758b;transition:color .15s ease,transform .15s ease}
.side-link:hover svg.lucide{color:var(--primary);transform:translateY(-1px)}
.side-link.active svg.lucide{color:#fff}
.nav-pill.active svg.lucide{color:#fff}

.stat-card{justify-content:flex-start}
.stat-icon{flex:0 0 58px}
.stat-icon svg.lucide{width:27px!important;height:27px!important;max-width:27px!important;max-height:27px!important}
.stat-icon-blue{background:linear-gradient(135deg,#e8f2ff,#def7ff);color:#3679ec}
.stat-icon-green{background:linear-gradient(135deg,#e5faef,#e2fbf5);color:#11945c}
.stat-icon-violet{background:linear-gradient(135deg,#f0ebff,#e9f0ff);color:#6857df}
.stat-icon-amber{background:linear-gradient(135deg,#fff4df,#fff0e4);color:#d78625}

.section-title-wrap{display:flex;align-items:flex-start;gap:.85rem;min-width:0}
.section-title-wrap>div{min-width:0}
.section-icon{
  width:42px;height:42px;flex:0 0 42px;border-radius:14px;display:grid;place-items:center;
  background:linear-gradient(135deg,rgba(77,132,247,.11),rgba(92,203,239,.15));
  color:#3d7fe8;border:1px solid rgba(77,132,247,.12);
  box-shadow:0 8px 22px rgba(60,118,190,.08);
}
.section-icon svg.lucide{width:21px!important;height:21px!important;max-width:21px!important;max-height:21px!important}
.section-title-wrap .eyebrow{margin-top:.05rem}
.section-title-wrap h2{margin-bottom:.35rem}

.row-actions button{display:inline-flex;align-items:center;gap:.42rem}
.row-actions button svg.lucide{width:15px!important;height:15px!important;max-width:15px!important;max-height:15px!important;flex-basis:15px!important}
.row-actions button[data-account-delete],.row-actions button[data-rule-delete],.row-actions button[data-event-block]{color:#b42318}
.row-actions button[data-event-user]{color:#087a4d}
.row-actions button[data-event-admin]{color:#b86b13}

.stack-form button[type=submit],.inline-rule-form button[type=submit],.import-form button[type=submit],.clean-search-form button[type=submit]{display:inline-flex;align-items:center;justify-content:center;gap:.55rem}
.import-actions .ghost-btn{display:inline-flex;align-items:center;gap:.55rem}

@media(max-width:620px){
  .top-actions .nav-pill span{display:none}
  .top-actions .nav-pill{flex:0 0 auto;padding:.72rem}
  .top-actions .nav-pill svg.lucide{width:20px!important;height:20px!important;max-width:20px!important;max-height:20px!important}
  .section-icon{width:38px;height:38px;flex-basis:38px;border-radius:12px}
}

/* V40 - seguridad, auditoría, alertas y operación */
.nav-badge{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#ef4444;color:#fff;font-size:.72rem;font-weight:900;margin-left:.2rem}
.nav-badge[hidden]{display:none!important}
.ops-stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin:1rem 0 1.2rem}
.mini-stat{background:rgba(255,255,255,.84);border:1px solid rgba(139,174,212,.26);border-radius:20px;padding:1rem 1.1rem;box-shadow:0 12px 32px rgba(50,95,150,.06)}
.mini-stat span{display:block;color:#64748b;font-size:.84rem;font-weight:800;margin-bottom:.35rem}
.mini-stat strong{font-size:1.65rem;color:#1d4ed8}
.compact-alerts{margin-bottom:1.2rem}
.alerts-list{display:grid;gap:.65rem}
.alert-item{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.85rem 1rem;border-radius:16px;border:1px solid #dbe7f3;background:#fff}
.alert-item strong{color:#172554}.alert-item p{margin:.25rem 0 0;color:#64748b;font-size:.86rem}.alert-item time{white-space:nowrap;color:#94a3b8;font-size:.78rem}
.alert-pending{border-color:#f5d89a;background:#fffaf0}.alert-blocked,.alert-gmail_error{border-color:#fecaca;background:#fff7f7}
.temporary-note{margin-top:.35rem;color:#b86b13;font-size:.72rem;font-weight:800;white-space:nowrap}
.subsection-title{font-size:1rem;color:#334155;margin:1.4rem 0 .7rem}
.security-center{background:linear-gradient(180deg,#fff,#f9fcff)}
.security-status-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;margin:1rem 0 1.2rem}
.security-status-grid article{border:1px solid rgba(139,174,212,.28);border-radius:16px;background:#fff;padding:.9rem 1rem}
.security-status-grid span{display:block;color:#64748b;font-size:.78rem;font-weight:800;margin-bottom:.28rem}.security-status-grid strong{color:#0f172a;font-size:.95rem}
.security-columns{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin:1rem 0}
.security-box{border:1px solid rgba(139,174,212,.28);border-radius:18px;background:#fff;padding:1rem}.security-box h3{margin:.05rem 0 .5rem;color:#172554}
.twofa-setup{margin:.8rem 0;padding:.85rem;border-radius:14px;background:#f6faff;border:1px dashed #bfd5ee}.twofa-setup code{word-break:break-all;color:#1d4ed8;font-weight:900}
.inline-security-form{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}.inline-security-form input{min-width:180px;max-width:240px}
.danger-outline{background:#fff!important;color:#b42318!important;border:1px solid #f0b8b4!important;box-shadow:none!important}
.danger-outline:hover{background:#fff5f4!important}
#sessionsTable table,#healthTable table,#auditTable table{min-width:820px}
#security .table-wrap{margin-top:.4rem}
#import code{background:#f1f5f9;border-radius:6px;padding:.08rem .3rem}
@media(max-width:1180px){.ops-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.security-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.security-columns{grid-template-columns:1fr}.security-status-grid{grid-template-columns:1fr}.alert-item{align-items:flex-start;flex-direction:column}.alert-item time{white-space:normal}}
@media(max-width:620px){.ops-stats-grid{grid-template-columns:1fr}}

/* V4.1 - alertas revisables y estado de endurecimiento */
.alert-main{min-width:0;flex:1}.alert-actions{display:flex;align-items:flex-end;gap:.65rem;flex-direction:column;flex:0 0 auto}
.alert-title-row{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap}.alert-level{display:inline-flex;align-items:center;border-radius:999px;padding:.18rem .5rem;font-size:.68rem;font-weight:900;letter-spacing:.02em;background:#eef2ff;color:#4f46e5}
.alert-severity-warning .alert-level{background:#fff3d6;color:#b86b13}.alert-severity-security .alert-level{background:#ffe4e6;color:#be123c}
.alert-review-btn{font-size:.76rem!important;padding:.45rem .65rem!important;min-height:auto!important;white-space:nowrap}
.alert-severity-security{border-color:#fda4af;background:#fff6f7}.alert-severity-warning{border-color:#f5d89a;background:#fffaf0}
@media(max-width:760px){.alert-actions{align-items:flex-start;width:100%}}
