:root{
  --bg:#0b0b0c;
  --text:#e6e6e6;
  --muted:#9a9a9a;
  --accent:#dd5a49;
  --ok:#32d26a;
  --shadow: 0 18px 50px rgba(0,0,0,.55);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(1200px 800px at 55% -30%, rgba(255,255,255,.06), transparent 65%),
    linear-gradient(180deg, var(--bg), #070707);
}

.bg-grid{
  position:fixed; inset:0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity:.22;
  pointer-events:none;
}

.main{ min-height: 100vh; }

.topbar{
  position: sticky; top:0; z-index:10;
  height: 54px;
  display:flex; align-items:center; justify-content:space-between;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(15,15,16,.82);
  backdrop-filter: blur(10px);
}
.top-left{ display:flex; align-items:center; gap:10px; min-width:0; }
.crumbs{ opacity:.9; font-weight:600; letter-spacing:.02em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.top-actions{ display:flex; gap:10px; align-items:center; }

.pill{
  text-decoration:none;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.14);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  background: transparent;
}
.pill:hover{ border-color: rgba(255,255,255,.24); }
.pill.icon{
  width: 36px;
  padding: 8px 0;
  text-align:center;
  font-size: 14px;
  line-height: 1;
  cursor:pointer;
}

.wrap{ max-width: 1200px; padding: 18px; }

.flashbox{ margin: 10px 0 16px; display:flex; flex-direction:column; gap:8px; }
.flash{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  padding: 10px 12px;
  border-radius: 12px;
}
.flash.error{ border-color: rgba(221,90,73,.35); }
.flash.ok{ border-color: rgba(50,210,106,.35); }

.card{
  background: rgba(18,18,18,.70);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.h1{ margin:0 0 8px 0; font-size: 26px; letter-spacing:.01em; }
.h2{ margin:18px 0 10px 0; font-size: 16px; color: var(--muted); font-weight: 600; }
.muted{ margin:0 0 14px 0; color:var(--muted); }

.form{ display:flex; flex-direction:column; gap:10px; margin-top: 10px; }
.form-grid{ gap:10px; }
.lbl{ font-size: 12px; color: var(--muted); margin-top: 6px; }
.inp{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.28);
  color: var(--text);
  outline:none;
}
.inp:focus{
  border-color: rgba(221,90,73,.55);
  box-shadow: 0 0 0 3px rgba(221,90,73,.12);
}

.row{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin: 4px 0 6px; }
.chk{ display:flex; align-items:center; gap:8px; color: var(--muted); font-size: 13px; }

.btn{
  cursor:pointer;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.18));
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 750;
  letter-spacing: .03em;
}
.btn:hover{
  border-color: rgba(221,90,73,.40);
  box-shadow: 0 0 0 3px rgba(221,90,73,.10);
}
.btn-sm{ padding: 8px 10px; border-radius: 10px; font-weight: 600; }
.inp-sm{ padding: 8px 10px; border-radius: 10px; max-width: 260px; }

.grid-3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
}

.panel{
  position:relative;
  background: linear-gradient(180deg, rgba(18,18,18,.78), rgba(10,10,10,.58));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.corners::before,
.corners::after{
  content:"";
  position:absolute; inset: 10px;
  pointer-events:none;
  border-radius: 10px;
  background:
    linear-gradient(#fff,#fff) left top/20px 2px no-repeat,
    linear-gradient(#fff,#fff) left top/2px 20px no-repeat,
    linear-gradient(#fff,#fff) right top/20px 2px no-repeat,
    linear-gradient(#fff,#fff) right top/2px 20px no-repeat,
    linear-gradient(#fff,#fff) left bottom/20px 2px no-repeat,
    linear-gradient(#fff,#fff) left bottom/2px 20px no-repeat,
    linear-gradient(#fff,#fff) right bottom/20px 2px no-repeat,
    linear-gradient(#fff,#fff) right bottom/2px 20px no-repeat;
  opacity:.90;
}

.panel-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom: 12px; }
.panel-title{ font-weight: 750; letter-spacing: .02em; }
.dot{ width: 10px; height: 10px; border-radius: 999px; background: #777; }
.dot.ok{ background: var(--ok); box-shadow: 0 0 0 4px rgba(50,210,106,.12); }
.panel-body{ display:flex; flex-direction:column; gap: 10px; }

/* Widgets */
.widget{
  position:relative;
  display:block;
  text-decoration:none;
  color: var(--text);
  background: linear-gradient(180deg, rgba(18,18,18,.78), rgba(10,10,10,.58));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px;
  min-height: 140px;
}
.widget:hover{
  border-color: rgba(221,90,73,.25);
  box-shadow: var(--shadow), 0 0 0 3px rgba(221,90,73,.10);
}
.widget-head{ display:flex; flex-direction:column; gap:6px; }
.widget-title{ font-weight: 800; letter-spacing: .02em; }
.widget-sub{ color: var(--muted); font-size: 12px; }
.widget-go{ position:absolute; right: 16px; bottom: 16px; color: rgba(255,255,255,.78); font-size: 12px; letter-spacing:.06em; }

.table{ margin-top: 10px; border: 1px solid rgba(255,255,255,.10); border-radius: 14px; overflow:hidden; }
.thead, .trow{ display:grid; grid-template-columns: 2fr .7fr .7fr 3fr; gap: 10px; align-items:center; }
.thead{ padding: 12px; background: rgba(255,255,255,.03); color: var(--muted); font-size: 12px; }
.trow{ padding: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.cell{ display:flex; align-items:center; gap:10px; }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

.settings-row{ margin: 8px 0 14px; display:flex; gap:10px; flex-wrap:wrap; }

@media (max-width: 1100px){
  .grid-3{ grid-template-columns: 1fr; }
  .thead, .trow{ grid-template-columns: 1.6fr .7fr .7fr 2.2fr; }
}
