:root{
  --bg:#0b0f14;
  --panel:#0f1620;
  --card:#121c28;
  --muted:#8aa0b6;
  --text:#e6f0ff;

  --ok:#20c997;
  --warn:#ffcc00;
  --bad:#ff5c77;
  --accent:#7c3aed;

  --line:rgba(255,255,255,.09);
  --line-strong:rgba(255,255,255,.14);

  --shadow:0 10px 30px rgba(0,0,0,.35);
  --shadow-soft:0 6px 18px rgba(0,0,0,.24);

  --r:16px;
  --r-sm:12px;
  --pad:14px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;

  color-scheme: dark;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family:var(--font);
  background:linear-gradient(180deg, #070a0e 0%, var(--bg) 100%);
  color:var(--text);
}

/* =========================
   Base layout
========================= */

.exr-pro-wrap{
  max-width:1180px;
  margin:0 auto;
  padding:18px;
}

.exr-pro-grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.exr-pro-grid-main{
  display:grid;
  grid-template-columns:1.08fr .92fr;
  gap:14px;
}

.exr-pro-stack{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.exr-pro-toolbar{
  display:grid;
  grid-template-columns:1fr auto;
  gap:14px;
  align-items:end;
}

.exr-pro-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.exr-pro-col{
  flex:1;
  min-width:160px;
}

@media (max-width: 980px){
  .exr-pro-grid-2,
  .exr-pro-grid-main{
    grid-template-columns:1fr;
  }

  .exr-pro-toolbar{
    grid-template-columns:1fr;
  }

  .exr-pro-col{
    min-width:100%;
  }
}

/* =========================
   Topbar premium
========================= */

.exr-pro-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  background:
    radial-gradient(1200px 240px at 15% 0%, rgba(124,58,237,.22), transparent 60%),
    radial-gradient(900px 260px at 85% 0%, rgba(32,201,151,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.04), transparent);
  border:1px solid var(--line);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
}

.exr-pro-topbar::after{
  content:"";
  position:absolute;
  inset:-2px;
  background:linear-gradient(
    90deg,
    rgba(124,58,237,.22),
    rgba(255,204,0,.10),
    rgba(32,201,151,.14)
  );
  filter:blur(28px);
  opacity:.35;
  pointer-events:none;
}

.exr-pro-topbar > *{
  position:relative;
  z-index:1;
}

.exr-pro-brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.exr-pro-logo{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(220px 60px at 30% 0%, rgba(255,255,255,.16), transparent 70%),
    linear-gradient(135deg, rgba(124,58,237,.22), rgba(255,255,255,.06), rgba(32,201,151,.14));
  box-shadow:
    0 10px 30px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.10);
  flex:0 0 auto;
}

.exr-pro-logo img{
  height:34px;
  width:auto;
  display:block;
  filter:drop-shadow(0 6px 12px rgba(0,0,0,.35));
}

.exr-pro-title{
  margin:0;
  font-size:20px;
  font-weight:900;
  line-height:1.1;
}

.exr-pro-subtitle{
  color:var(--muted);
  font-size:12px;
  margin-top:3px;
}

@media (max-width: 720px){
  .exr-pro-topbar{
    align-items:flex-start;
  }
}

/* =========================
   Cards
========================= */

.exr-pro-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r);
  padding:var(--pad);
  box-shadow:var(--shadow);
  min-width:0;
}

.exr-pro-section-title{
  margin:0 0 10px 0;
  font-size:16px;
  font-weight:900;
  line-height:1.2;
}

/* =========================
   Typography / helpers
========================= */

.exr-muted{ color:var(--muted); }
.exr-small{ font-size:12px; }
.exr-mono{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
}
.exr-hide{ display:none !important; }

/* =========================
   Inputs / selects
========================= */

.exr-pro-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}

.exr-pro-field label{
  font-size:13px;
  color:var(--muted);
}

.exr-pro-input,
.exr-pro-select,
.exr-input,
.exr-select{
  width:100%;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  outline:none;
  min-width:0;
}

.exr-pro-input:focus,
.exr-pro-select:focus,
.exr-input:focus,
.exr-select:focus{
  border-color:rgba(124,58,237,.65);
  box-shadow:0 0 0 3px rgba(124,58,237,.18);
}

.exr-pro-select,
.exr-pro-select option,
.exr-select,
.exr-select option{
  background:var(--card);
  color:var(--text);
}

.exr-pro-input:disabled,
.exr-pro-select:disabled,
.exr-input:disabled,
.exr-select:disabled{
  opacity:.65;
  cursor:not-allowed;
}

.exr-input::placeholder,
.exr-pro-input::placeholder{
  color:rgba(138,160,182,.75);
}

/* =========================
   Buttons
========================= */

.exr-pro-btn,
.exr-btn{
  appearance:none;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.exr-pro-btn:hover,
.exr-btn:hover{
  border-color:rgba(255,255,255,.18);
}

.exr-pro-btn.ok,
.exr-btn.ok{
  border-color:rgba(32,201,151,.45);
}

.exr-pro-btn.warn,
.exr-btn.warn{
  border-color:rgba(255,204,0,.45);
}

.exr-pro-btn.bad,
.exr-btn.bad,
.exr-btn.danger{
  border-color:rgba(255,92,119,.45);
}

.exr-pro-btn.primary,
.exr-btn.primary{
  background:linear-gradient(135deg, rgba(32,201,151,.12), rgba(124,58,237,.18));
  border-color:rgba(124,58,237,.35);
}

.exr-pro-btn:disabled,
.exr-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}

/* =========================
   Chips / pills / badges
========================= */

.exr-pro-chip,
.exr-pro-pill,
.pill,
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  font-size:12px;
  color:var(--text);
}

.exr-pro-pill.ok,
.pill.ok,
.badge.ok{
  border-color:rgba(32,201,151,.35);
}

.exr-pro-pill.warn,
.pill.warn,
.badge.warn{
  border-color:rgba(255,204,0,.35);
}

.exr-pro-pill.bad,
.pill.bad,
.badge.bad{
  border-color:rgba(255,92,119,.35);
}

/* =========================
   Tabs
========================= */

.tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.tab{
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--text);
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
  font-weight:800;
  font-size:12px;
}

.tab.active{
  border-color:rgba(124,58,237,.55);
  background:rgba(124,58,237,.14);
}

/* =========================
   Messages / states
========================= */

.exr-pro-msg,
.msg{
  margin-top:12px;
  padding:12px;
  border-radius:12px;
  background:rgba(255,255,255,.04);
  border:1px solid var(--line);
}

.exr-pro-msg.info,
.msg.info{
  border-color:rgba(124,58,237,.28);
}

.exr-pro-msg.ok,
.msg.ok{
  border-color:rgba(32,201,151,.35);
}

.exr-pro-msg.warn,
.msg.warn{
  border-color:rgba(255,204,0,.35);
}

.exr-pro-msg.bad,
.msg.bad{
  border-color:rgba(255,92,119,.35);
}

.exr-pro-hint{
  border:1px dashed rgba(255,255,255,.14);
  border-radius:14px;
  padding:10px;
  background:rgba(255,255,255,.03);
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}

.exr-pro-empty{
  border:1px dashed rgba(255,255,255,.14);
  border-radius:14px;
  padding:18px;
  background:rgba(255,255,255,.03);
  color:var(--muted);
}

/* =========================
   Tables
========================= */

.exr-pro-table-wrap{
  overflow:auto;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.02);
}

.exr-pro-table{
  width:100%;
  border-collapse:collapse;
}

.exr-pro-table th,
.exr-pro-table td{
  padding:11px 10px;
  border-bottom:1px solid rgba(255,255,255,.06);
  text-align:left;
  vertical-align:top;
}

.exr-pro-table th{
  background:rgba(255,255,255,.03);
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.35px;
}

.exr-pro-table tbody tr:hover{
  background:rgba(124,58,237,.06);
}

/* =========================
   Modals
========================= */

.exr-modal-back{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9998;
  padding:18px;
}

.exr-modal{
  width:min(560px,100%);
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(18,28,40,.97);
  box-shadow:var(--shadow);
  padding:14px;
}

.exr-modal h3{
  margin:0 0 8px;
  font-size:14px;
}

.exr-modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:12px;
  flex-wrap:wrap;
}

/* =========================
   Toasts
========================= */

.exr-toasts{
  position:fixed;
  right:16px;
  bottom:16px;
  display:flex;
  flex-direction:column;
  gap:10px;
  z-index:9999;
}

.exr-toast{
  min-width:260px;
  max-width:360px;
  border:1px solid var(--line);
  background:rgba(18,28,40,.92);
  box-shadow:var(--shadow);
  border-radius:14px;
  padding:12px 12px;
  font-size:13px;
}

.exr-toast .t{
  font-weight:900;
  margin-bottom:2px;
}

.exr-toast .m{
  color:var(--muted);
}

/* =========================
   Legacy support
========================= */

.exr-shell{
  display:grid;
  grid-template-columns:260px 1fr;
  min-height:100vh;
}

.exr-sidebar{
  border-right:1px solid var(--line);
  background:rgba(15,22,32,.9);
  backdrop-filter:blur(10px);
  padding:18px 14px;
  position:sticky;
  top:0;
  height:100vh;
}

.exr-brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px 16px;
  border-bottom:1px solid var(--line);
  margin-bottom:14px;
}

.exr-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:linear-gradient(135deg, var(--ok), var(--accent));
  box-shadow:0 0 0 4px rgba(32,201,151,.15);
}

.exr-brand h1{
  font-size:14px;
  margin:0;
  letter-spacing:.5px;
}

.exr-nav a{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--text);
  text-decoration:none;
  padding:10px 10px;
  border-radius:10px;
  margin:4px 0;
  border:1px solid transparent;
}

.exr-nav a:hover{
  background:rgba(124,58,237,.12);
  border-color:rgba(124,58,237,.35);
}

.exr-nav a.active{
  background:rgba(124,58,237,.16);
  border-color:rgba(124,58,237,.45);
}

.exr-nav small{
  color:var(--muted);
  display:block;
  margin-top:2px;
}

.exr-main{
  padding:18px;
}

.exr-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:var(--r);
  background:rgba(18,28,40,.75);
  box-shadow:var(--shadow);
  position:sticky;
  top:12px;
  z-index:5;
  backdrop-filter:blur(10px);
  margin-bottom:14px;
}

.exr-title{
  font-weight:900;
  font-size:14px;
}

.exr-meta{
  color:var(--muted);
  font-size:12px;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.exr-card{
  border:1px solid var(--line);
  border-radius:var(--r);
  background:rgba(18,28,40,.65);
  box-shadow:var(--shadow);
  padding:var(--pad);
}

@media (max-width: 1200px){
  .exr-shell{ grid-template-columns:1fr; }
  .exr-sidebar{ position:relative; height:auto; }
}

/* =========================
   Utilities
========================= */

.hr{
  height:1px;
  background:var(--line);
  margin:12px 0;
}

input:-webkit-autofill{
  -webkit-text-fill-color:#e6f0ff !important;
  box-shadow:0 0 0px 1000px rgba(0,0,0,.25) inset !important;
  transition:background-color 9999s ease-in-out 0s;
}