:root{
  --kx-bg:#edf2f7;
  --kx-bg-alt:#e6edf5;
  --kx-surface:#ffffff;
  --kx-surface-alt:#f6f9fc;
  --kx-topbar:#fbfcfe;
  --kx-line:#d4dde8;
  --kx-line-strong:#bfcddd;
  --kx-text:#121722;
  --kx-text-soft:#647389;
  --kx-heading:#0f1520;
  --kx-primary:#1497f5;
  --kx-primary-strong:#0078d4;
  --kx-primary-deep:#005ea8;
  --kx-primary-soft:#e8f3ff;
  --kx-success:#2aa56f;
  --kx-warn:#d28d22;
  --kx-danger:#c6516c;
  --kx-dark:#1c2330;
  --kx-radius:1rem;
  --kx-shadow:0 18px 36px rgba(15,23,42,.07);
  --kx-shadow-soft:0 10px 24px rgba(15,23,42,.05);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  min-height:100vh;
  margin:0;
  display:flex;
  flex-direction:column;
  background:linear-gradient(180deg,#f8fafc 0%,#f1f5fa 46%,#ebf0f6 100%);
  color:var(--kx-text);
  font:500 .91rem/1.48 "Inter","Segoe UI",sans-serif;
  overflow-x:hidden;
}
a{color:inherit;text-decoration:none}

.topbar{
  position:sticky;
  top:0;
  z-index:1030;
  background:rgba(251,252,254,.98);
  border-bottom:1px solid var(--kx-line);
  box-shadow:0 6px 16px rgba(15,23,42,.04);
}
.topbar-inner{min-height:5rem;display:flex;align-items:center}
.navbar{width:100%;min-height:5rem}
.topbar-logo{height:2.55rem;width:auto;display:block}
.topbar-nav{gap:.25rem;align-items:center}
.topbar-nav .nav-link{
  display:flex;align-items:center;gap:.52rem;padding:.72rem .9rem;border-radius:.82rem;
  color:#1b212c;font-size:.84rem;font-weight:700;transition:all .18s ease;
}
.topbar-nav .nav-link:hover,
.topbar-nav .nav-link.active{
  background:#eaf4ff;color:var(--kx-primary-deep);transform:translateY(-1px);
  box-shadow:0 8px 14px rgba(0,120,212,.08);
}
.topbar-nav .nav-link i,
.tool-link i,
.section-icon i,
.stat-icon i,
.action-icon i{transition:transform .2s ease}
.topbar-nav .nav-link:hover i,
.topbar-nav .nav-link.active i,
.tool-link:hover i{transform:translateY(-1px) scale(1.08)}
.topbar-search{width:min(100%,30rem)}
.topbar-search .input-group-text,
.topbar-search .form-control{
  border-color:rgba(18,23,34,.08);background:#fff;color:var(--kx-text);
}
.topbar-search .btn-dark{box-shadow:0 10px 18px rgba(28,35,48,.18)}
.topbar-tools{display:flex;align-items:center;gap:.45rem}
.tool-link{
  width:2.5rem;height:2.5rem;display:grid;place-items:center;border-radius:.72rem;
  border:1px solid #d8e1ec;background:#fff;color:var(--kx-primary-strong);
  transition:all .2s ease;
}
.tool-link:hover{
  transform:translateY(-2px);background:#edf6ff;border-color:#b8d8ff;
  box-shadow:0 12px 20px rgba(0,120,212,.12);
}

.copy-shell{
  display:flex;
  align-items:center;
  gap:.4rem;
}

.app-shell{
  width:100%;
  flex:1 0 auto;
  position:relative;
}

.page-stack{display:grid;gap:1rem;align-content:start}
.banner-card,
.admin-card,
.stat-card,
.surface-card{
  border:1px solid var(--kx-line)!important;
  box-shadow:var(--kx-shadow)!important;
  border-radius:var(--kx-radius)!important;
  background:#fff;
}
.banner-card{
  background:
    linear-gradient(135deg, rgba(20,151,245,.08), rgba(20,151,245,0) 24%),
    linear-gradient(180deg,#ffffff,#fbfdff);
}
.eyebrow{
  color:#647286;
  font-size:.65rem;
  font-weight:800;
  letter-spacing:.18em;
  text-transform:uppercase;
}
.page-title,
.section-title,
.brand-title,
.hero-title,
.empty-state h4,
.auth-title,
.metric-figure{
  margin:0;
  color:var(--kx-heading);
  font-family:"Space Grotesk","Inter",sans-serif;
  letter-spacing:-.035em;
}
.page-title{font-size:clamp(1.28rem,1.7vw,1.82rem)}
.section-title{font-size:clamp(1rem,1.2vw,1.28rem)}
.banner-copy,
.section-copy,
.widget-copy,
.helper-copy,
.metric-note,
.muted-copy{color:var(--kx-text-soft)!important}
.banner-pills{display:flex;flex-wrap:wrap;gap:.55rem;justify-content:flex-end}
.banner-pill,
.status-pill{
  display:inline-flex;align-items:center;gap:.42rem;padding:.54rem .8rem;border-radius:999px;
  background:#fff;border:1px solid #d7e1ec;color:#13426d;font-size:.78rem;font-weight:800;
  box-shadow:0 6px 14px rgba(15,23,42,.05);
}
.status-pill.success{color:#13643f;background:rgba(42,165,111,.12);border-color:rgba(42,165,111,.2)}
.status-pill.warn{color:#8c5f11;background:rgba(210,141,34,.13);border-color:rgba(210,141,34,.2)}
.status-pill.danger{color:#933247;background:rgba(198,81,108,.13);border-color:rgba(198,81,108,.2)}
.status-pill.info{color:#005a9e;background:#edf6ff;border-color:#bfdcff}
.status-pill.muted{color:#51657a;background:#f5f8fb;border-color:#d7e1ec}

.compact-grid{
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:1rem;
}

.flash-message{
  margin-bottom:1rem;padding:.95rem 1rem;border-radius:1rem;border:1px solid var(--kx-line);
  background:#fff;box-shadow:var(--kx-shadow-soft);font-weight:700
}
.flash-success{border-color:#bde7d2;background:#f3fcf7;color:#17633f}
.flash-error{border-color:#f3c6c6;background:#fff7f7;color:#b12626}
.floating-widget-overlay{
  position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:1rem;
  animation:fadeInSoft .2s ease both;
}
.floating-widget-backdrop{
  position:absolute;inset:0;background:rgba(22,27,35,.42);backdrop-filter:blur(4px);
}
.floating-widget{
  position:relative;z-index:1;width:min(100%,31rem);padding:1.4rem 1.3rem 1.2rem;border-radius:1.35rem;
  border:1px solid rgba(255,255,255,.55);background:linear-gradient(180deg,#ffffff,#f8fbff);
  box-shadow:0 30px 60px rgba(10,18,30,.24);text-align:center;animation:widgetRise .24s ease both;
}
.floating-widget.is-closing,
.floating-widget-overlay.is-closing{animation:fadeOutSoft .2s ease forwards}
.floating-widget-dismiss{
  position:absolute;top:.8rem;right:.8rem;width:2.2rem;height:2.2rem;border:0;border-radius:999px;
  display:grid;place-items:center;background:rgba(18,23,34,.06);color:#59677b;
}
.floating-widget-label{
  margin:0 0 .45rem;text-transform:uppercase;letter-spacing:.16em;font-size:.68rem;font-weight:800;
}
.floating-widget-title{
  margin:0;color:var(--kx-heading);font-family:"Space Grotesk","Inter",sans-serif;font-size:clamp(1.02rem,2vw,1.38rem);
  line-height:1.16;
}
.floating-widget-icon-shell{
  position:relative;width:6.1rem;height:6.1rem;margin:0 auto 1rem;display:grid;place-items:center;
}
.floating-widget-icon-ring{
  position:absolute;inset:0;border-radius:50%;animation:widgetPulse 2s ease-in-out infinite;
}
.floating-widget-icon{
  position:relative;width:4.2rem;height:4.2rem;border-radius:50%;display:grid;place-items:center;
  font-size:1.7rem;color:#fff;animation:widgetFloat 2.2s ease-in-out infinite;
}
.floating-widget-actions{
  margin-top:1rem;display:flex;justify-content:center;
}
.floating-widget-button{
  min-width:9rem;padding:.82rem 1.05rem;border-radius:.9rem;border:0;font-weight:800;
  text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
}
.floating-widget-button--primary{background:var(--kx-dark);color:#fff}
.floating-widget-button--secondary{background:#eef3f9;color:var(--kx-heading);border:1px solid var(--kx-line)}
.floating-widget--success .floating-widget-label{color:#17633f}
.floating-widget--success .floating-widget-icon{background:linear-gradient(180deg,#33b878,#1e905d)}
.floating-widget--success .floating-widget-icon-ring{background:radial-gradient(circle, rgba(42,165,111,.18), rgba(42,165,111,0) 68%)}
.floating-widget--error .floating-widget-label{color:#a23852}
.floating-widget--error .floating-widget-icon{background:linear-gradient(180deg,#d76382,#b43d5d)}
.floating-widget--error .floating-widget-icon-ring{background:radial-gradient(circle, rgba(198,81,108,.22), rgba(198,81,108,0) 68%)}
.floating-widget--warning .floating-widget-label{color:#8c5f11}
.floating-widget--warning .floating-widget-icon{background:linear-gradient(180deg,#efb84d,#cf8e18)}
.floating-widget--warning .floating-widget-icon-ring{background:radial-gradient(circle, rgba(210,141,34,.22), rgba(210,141,34,0) 68%)}
.floating-widget--info .floating-widget-label{color:#0d5f9f}
.floating-widget--info .floating-widget-icon{background:linear-gradient(180deg,#1497f5,#0a6fc7)}
.floating-widget--info .floating-widget-icon-ring{background:radial-gradient(circle, rgba(20,151,245,.22), rgba(20,151,245,0) 68%)}

.metrics-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:1rem;
}
.metric-card{
  padding:1rem;
  border:1px solid var(--kx-line);
  border-radius:1rem;
  background:#fff;
  box-shadow:var(--kx-shadow-soft);
  transition:all .18s ease;
}
.metric-card:hover{transform:translateY(-2px);box-shadow:0 14px 26px rgba(15,23,42,.08)}
.metric-label{
  color:#69788b;text-transform:uppercase;letter-spacing:.13em;font-size:.64rem;font-weight:800;margin-bottom:.32rem;
}
.metric-figure{font-size:1.35rem;line-height:1.08}
.metric-note{font-size:.76rem;margin-top:.2rem}

.dashboard-grid{
  display:grid;
  grid-template-columns:1.35fr .95fr;
  gap:1rem;
}
.stack-grid{display:grid;gap:1rem}
.panel-card{
  padding:1rem;border:1px solid var(--kx-line);border-radius:1rem;background:#fff;box-shadow:var(--kx-shadow-soft);
}
.panel-card:hover{box-shadow:0 14px 26px rgba(15,23,42,.08)}
.section-header{
  display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem;
}
.section-heading{display:flex;align-items:flex-start;gap:.85rem}
.section-icon{
  width:2.35rem;height:2.35rem;display:grid;place-items:center;border-radius:.78rem;
  background:linear-gradient(180deg,var(--kx-primary),var(--kx-primary-strong));
  color:#fff;font-size:1rem;box-shadow:0 14px 22px rgba(0,120,212,.18);
}

.hero-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:1rem;
}
.highlight-card{
  padding:1.25rem;
  background:
    linear-gradient(135deg, rgba(20,151,245,.09), rgba(20,151,245,0) 26%),
    linear-gradient(180deg,#ffffff,#fbfdff);
}
.hero-inline-stats{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:.85rem;
}
.hero-stat,
.widget-card,
.toolbar-card,
.account-chip{
  background:#fff;border:1px solid var(--kx-line);border-radius:.95rem;padding:.95rem;
  box-shadow:var(--kx-shadow-soft);
}
.hero-stat-value{display:block;font-family:"Space Grotesk","Inter",sans-serif;font-size:1.15rem;line-height:1.08}
.hero-stat-note{display:block;color:var(--kx-text-soft);font-size:.76rem}
.pulse-ring{
  width:7.2rem;height:7.2rem;display:flex;flex-direction:column;align-items:center;justify-content:center;
  border-radius:50%;background:radial-gradient(circle at 50% 38%, rgba(20,151,245,.12), transparent 42%), linear-gradient(180deg,#fff,#f7fbff);
  border:3px solid rgba(0,120,212,.8);box-shadow:inset 0 0 0 8px rgba(255,255,255,.92),0 14px 28px rgba(0,120,212,.16);
  animation:pulseGlow 2.9s ease-in-out infinite;
}
.pulse-ring-value{font:800 1.45rem/1 "Space Grotesk",sans-serif}
.pulse-ring-label{font-size:.58rem;text-transform:uppercase;letter-spacing:.16em;font-weight:800;color:var(--kx-primary-deep)}

.action-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:.9rem;
}
.action-tile{
  display:flex;flex-direction:column;gap:.45rem;min-height:164px;padding:1rem;border-radius:1rem;
  border:1px solid var(--kx-line);background:#fff;box-shadow:var(--kx-shadow-soft);transition:all .2s ease;
}
.action-tile-button{
  width:100%;appearance:none;text-align:left;cursor:pointer;font:inherit;
}
.action-tile:hover{transform:translateY(-3px);border-color:#bad3ee;box-shadow:0 16px 28px rgba(15,23,42,.09)}
.action-icon{
  width:2.55rem;height:2.55rem;display:grid;place-items:center;border-radius:.88rem;
  background:linear-gradient(180deg,var(--kx-primary),var(--kx-primary-strong));color:#fff;font-size:1.06rem;
  box-shadow:0 14px 22px rgba(0,120,212,.18);
}
.action-title{font-family:"Space Grotesk","Inter",sans-serif;font-size:1rem;font-weight:700;color:var(--kx-heading)}
.action-copy{color:var(--kx-text-soft);font-size:.8rem}

.table-shell{overflow:hidden;border-radius:1rem;border:1px solid var(--kx-line)}
.krypta-table{--bs-table-bg:transparent;--bs-table-color:var(--kx-text);margin-bottom:0}
.krypta-table thead th{
  color:#708094;background:#f8fbff;text-transform:uppercase;letter-spacing:.09em;font-size:.68rem;font-weight:800;
  border-bottom:1px solid var(--kx-line);padding:.82rem .85rem;
}
.krypta-table tbody td{padding:.9rem .85rem;border-color:rgba(212,221,232,.72);vertical-align:middle}
.krypta-table tbody tr:hover{background:#fbfdff}
.mono-value{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  overflow-wrap:anywhere;
}
.metric-chip{
  display:inline-flex;align-items:center;gap:.38rem;padding:.36rem .62rem;border-radius:999px;
  background:#eef6ff;border:1px solid #c8ddf7;color:#0e5e9f;font-size:.72rem;font-weight:800;
}
.worker-type-chip{display:inline-flex;align-items:center;gap:.36rem}
.worker-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem}
.worker-card{
  padding:1rem;border:1px solid var(--kx-line);border-radius:1rem;background:#fff;box-shadow:var(--kx-shadow-soft);
}
.worker-card h3{font-size:1.02rem}
.helper-list{display:grid;gap:.9rem}
.helper-step{
  display:grid;grid-template-columns:auto 1fr;gap:.9rem;align-items:flex-start;padding:1rem;
  border:1px solid var(--kx-line);border-radius:1rem;background:#fff;box-shadow:var(--kx-shadow-soft);
}
.helper-index{
  width:2rem;height:2rem;border-radius:999px;display:grid;place-items:center;
  background:linear-gradient(180deg,var(--kx-primary),var(--kx-primary-strong));color:#fff;font-weight:800;
}

.chart-card{
  padding:1rem;border:1px solid var(--kx-line);border-radius:1rem;background:#fff;box-shadow:var(--kx-shadow-soft);
}
.chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.chart-stage{position:relative;min-height:17rem;height:17rem}

.currency-text,
.currency-amount{
  display:inline-flex;align-items:center;gap:.32rem;width:max-content;max-width:100%;
}
.currency-text::before,
.currency-amount::before{
  content:"";width:.9rem;height:.9rem;flex:0 0 .9rem;background-color:currentColor;
  -webkit-mask:url("/static/assets/img/currency-mark.svg") center / contain no-repeat;
  mask:url("/static/assets/img/currency-mark.svg") center / contain no-repeat;
}
.currency-text{color:var(--kx-heading)}

.auth-shell{
  max-width:1200px;margin:0 auto;padding:2rem 1rem 2.5rem;
}
.auth-grid{
  display:grid;grid-template-columns:1.1fr .9fr;gap:1rem;
}
.auth-card{
  padding:1.2rem;border:1px solid var(--kx-line);border-radius:1rem;background:#fff;box-shadow:var(--kx-shadow);
}
.auth-title{font-size:1.35rem}
.settings-form,
.auth-form{display:grid;gap:.9rem}
.form-label{
  color:#69788b;text-transform:uppercase;letter-spacing:.12em;font-size:.68rem;font-weight:800;margin-bottom:0;
}
.form-note{margin:0;color:var(--kx-text-soft);font-size:.78rem}
.form-control,
.form-select{
  min-height:2.85rem;border-radius:.85rem;border-color:rgba(18,23,34,.08);font-size:.9rem;
}
.form-control:focus,
.form-select:focus{
  border-color:rgba(0,120,212,.42);box-shadow:0 0 0 .18rem rgba(0,164,239,.16);
}
.krypta-button{
  appearance:none;border:0;border-radius:.85rem;background:linear-gradient(180deg,var(--kx-primary),var(--kx-primary-deep));
  color:#fff;font-weight:800;padding:.82rem 1rem;box-shadow:0 12px 24px rgba(20,151,245,.2);
}
.krypta-button:hover{filter:brightness(.98)}
.krypta-button-secondary{
  background:#edf6ff;color:var(--kx-primary-deep);box-shadow:none;border:1px solid #bfdbff;
}
.password-panel{
  margin-top:.7rem;padding:.85rem .9rem;border:1px solid var(--kx-line);border-radius:.95rem;
  background:linear-gradient(180deg,#fbfdff,#f6faff);
}
.password-panel-title{
  margin:0 0 .55rem;color:var(--kx-heading);font-size:.78rem;font-weight:800;letter-spacing:.02em;
}
.password-checklist{display:grid;gap:.42rem}
.password-check-item{
  display:flex;align-items:center;gap:.5rem;color:var(--kx-text-soft);font-size:.79rem;font-weight:700;
}
.password-check-item i{font-size:.78rem;color:#8ea0b6}
.password-check-item.is-valid{color:#17633f}
.password-check-item.is-valid i::before{content:"\f26a";color:var(--kx-success)}
.password-check-item.is-invalid{color:#a04b5f}
.password-check-item.is-invalid i::before{content:"\f623";color:var(--kx-danger)}
.password-match-note{
  margin:.55rem 0 0;color:var(--kx-text-soft);font-size:.78rem;font-weight:700;
}
.password-match-note.is-valid{color:#17633f}
.password-match-note.is-invalid{color:#a04b5f}
.auth-inline-divider{
  height:1px;margin:1rem 0;border-radius:999px;background:linear-gradient(90deg,transparent,var(--kx-line),transparent);
}
.verification-helper{display:grid;gap:.6rem}
.compact-form{gap:.7rem}

.account-strip{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;
}
.timeline-list{display:grid;gap:.8rem}
.timeline-item{
  display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.95rem;border:1px solid var(--kx-line);
  border-radius:.95rem;background:var(--kx-surface-alt);
}

.footerbar{
  margin-top:1.25rem;background:rgba(251,252,254,.98);border-top:1px solid var(--kx-line);box-shadow:0 -8px 18px rgba(15,23,42,.04)
}
.footerbar-inner{
  min-height:4rem;display:flex;align-items:center;justify-content:space-between;gap:1rem;
}
.footer-copy,.footer-links{
  display:flex;align-items:center;gap:.9rem;color:#5f6c80;font-size:.8rem;font-weight:700;
}
.footer-copy i,.footer-links i{color:var(--kx-primary-strong)}

.totp-grid{display:grid;grid-template-columns:.9fr 1.1fr;gap:1rem}
.qr-shell{
  display:grid;place-items:center;min-height:16rem;border:1px dashed var(--kx-line-strong);border-radius:1rem;
  background:#f8fbff;
}
.qr-shell canvas,
.qr-image{
  width:min(220px,100%)!important;height:auto!important;display:block;background:#fff;border-radius:1rem;padding:.7rem;
  box-shadow:0 12px 24px rgba(15,23,42,.08);
}
.qr-fallback-copy{
  margin:0;max-width:18rem;color:var(--kx-text-soft);font-size:.82rem;font-weight:700;text-align:center;
}

.search-results-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem}
.result-card{
  padding:1rem;border:1px solid var(--kx-line);border-radius:1rem;background:#fff;box-shadow:var(--kx-shadow-soft);
}

.reveal-up{animation:riseIn .46s cubic-bezier(.2,.7,.2,1) both}
.reveal-delay-1{animation-delay:.05s}
.reveal-delay-2{animation-delay:.1s}
.reveal-delay-3{animation-delay:.15s}

@keyframes riseIn{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes pulseGlow{
  0%,100%{
    box-shadow:inset 0 0 0 8px rgba(255,255,255,.92),0 14px 28px rgba(0,120,212,.16),0 0 0 0 rgba(20,151,245,.2);
  }
  50%{
    box-shadow:inset 0 0 0 8px rgba(255,255,255,.92),0 16px 34px rgba(0,120,212,.2),0 0 0 18px rgba(20,151,245,0);
  }
}
@keyframes fadeInSoft{
  from{opacity:0}
  to{opacity:1}
}
@keyframes fadeOutSoft{
  from{opacity:1}
  to{opacity:0}
}
@keyframes widgetRise{
  from{opacity:0;transform:translateY(14px) scale(.98)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes widgetFloat{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-4px)}
}
@keyframes widgetPulse{
  0%,100%{transform:scale(.92);opacity:.62}
  50%{transform:scale(1.05);opacity:1}
}

@media (max-width:1199.98px){
  .topbar-search{width:100%}
  .banner-pills{justify-content:flex-start}
}
@media (max-width:991.98px){
  .metrics-grid,.hero-grid,.dashboard-grid,.chart-grid,.auth-grid,.totp-grid{grid-template-columns:1fr}
  .account-strip{grid-template-columns:1fr}
  .pulse-ring{width:6rem;height:6rem}
}
@media (max-width:767.98px){
  .banner-card .card-body,
  .panel-card,
  .chart-card,
  .metric-card,
  .auth-card,
  .worker-card,
  .helper-step{padding:.95rem!important}
  .topbar-logo{height:2rem}
  .topbar-nav .nav-link{padding:.7rem .78rem}
  .footerbar-inner{min-height:auto;padding-top:.85rem;padding-bottom:.85rem;flex-direction:column;align-items:flex-start}
  .footer-links{flex-wrap:wrap;gap:.65rem}
  .chart-stage{min-height:14rem;height:14rem}
  .floating-widget{padding:1.2rem 1rem 1rem}
  .floating-widget-actions{flex-direction:column}
  .floating-widget-button{width:100%}
}
