:root{
  --bg:#060c16;
  --bg2:#0a1220;
  --panel:#0d1728;
  --panel2:#111d31;
  --line:rgba(255,255,255,.08);
  --line2:rgba(212,175,55,.16);
  --text:#f4f7fb;
  --muted:#9fb0ca;
  --gold:#d4af37;
  --gold2:#f1d471;
  --ok-bg:rgba(22,130,90,.18);
  --ok-line:rgba(35,181,123,.4);
  --warn-bg:rgba(184,130,25,.16);
  --warn-line:rgba(233,191,73,.38);
  --err-bg:rgba(168,45,63,.16);
  --err-line:rgba(228,94,112,.38);
  --shadow:0 18px 50px rgba(0,0,0,.30);
  --radius:22px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:Inter,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(7,62,150,.20), transparent 28%),
    radial-gradient(circle at top right, rgba(212,175,55,.09), transparent 26%),
    linear-gradient(180deg,var(--bg),var(--bg2));
  min-height:100vh;
}

a{color:inherit;text-decoration:none}
img{max-width:100%}

.public-topbar{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter:blur(10px);
  background:rgba(6,12,22,.72);
  border-bottom:1px solid var(--line);
}
.public-topbar-inner{
  max-width:1200px;
  margin:0 auto;
  padding:14px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.public-brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.public-brand img{
  width:50px;
  height:50px;
  object-fit:contain;
  border-radius:14px;
  background:rgba(255,255,255,.05);
  box-shadow:var(--shadow);
  padding:4px;
}
.public-brand strong{
  display:block;
  font-size:18px;
  color:#fff;
}
.public-brand small{
  display:block;
  color:var(--muted);
  font-size:12px;
}
.public-nav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.public-nav a{
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  color:#dbe6f7;
  background:rgba(255,255,255,.02);
  transition:.2s ease;
}
.public-nav a:hover{
  border-color:var(--line2);
  color:#fff;
  background:rgba(212,175,55,.08);
}

.auth-wrap{
  min-height:calc(100vh - 82px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px 16px;
}
.auth-card{
  width:min(100%,620px);
  background:linear-gradient(180deg, rgba(13,23,40,.96), rgba(9,16,30,.96));
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:var(--shadow);
  padding:28px;
}
.auth-logo{
  display:flex;
  gap:16px;
  align-items:center;
}
.auth-logo-img{
  width:72px;
  height:72px;
  object-fit:contain;
  border-radius:18px;
  background:rgba(255,255,255,.05);
  box-shadow:var(--shadow);
  padding:6px;
  flex:0 0 auto;
}
.auth-title{
  margin:24px 0 8px;
  font-size:28px;
  line-height:1.2;
}
.auth-sub{
  color:var(--muted);
  line-height:1.7;
}

.landing{
  max-width:1200px;
  margin:0 auto;
  padding:28px 20px 48px;
}
.hero{
  padding:18px 0 10px;
}
.hero-card{
  display:grid;
  grid-template-columns:220px 1fr;
  gap:22px;
  align-items:center;
  background:linear-gradient(180deg, rgba(13,23,40,.95), rgba(9,16,30,.95));
  border:1px solid var(--line);
  border-radius:30px;
  box-shadow:var(--shadow);
  padding:28px;
}
.hero-logo-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
}
.hero-logo{
  width:180px;
  max-width:100%;
  object-fit:contain;
  filter:drop-shadow(0 18px 38px rgba(0,0,0,.35));
}
.hero-badge{
  display:inline-block;
  margin-bottom:12px;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid var(--line2);
  background:rgba(212,175,55,.08);
  color:var(--gold2);
  font-weight:700;
  font-size:12px;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.hero-copy h1{
  margin:0 0 12px;
  font-size:40px;
  line-height:1.15;
}
.hero-copy p{
  margin:0;
  color:var(--muted);
  font-size:16px;
  line-height:1.8;
}

.landing-section{margin-top:20px}
.landing-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.feature-card,.info-card{
  background:linear-gradient(180deg, rgba(13,23,40,.95), rgba(9,16,30,.95));
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
  padding:22px;
}
.feature-card h3,.info-card h3{
  margin:0 0 10px;
  font-size:20px;
}
.feature-card p,.info-card p{
  margin:0;
  color:var(--muted);
  line-height:1.8;
}
.info-list{
  margin:0;
  padding-left:18px;
  color:var(--muted);
}
.info-list li{
  margin:8px 0;
  line-height:1.7;
}

.app-shell{
  display:grid;
  grid-template-columns:300px 1fr;
  min-height:100vh;
}
.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  padding:22px 18px;
  background:linear-gradient(180deg, rgba(9,16,30,.98), rgba(11,20,35,.98));
  border-right:1px solid var(--line);
  overflow:auto;
}
.brand{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:20px;
}
.brand h1{
  margin:0;
  font-size:22px;
}
.brand p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:12px;
}
.brand-logo-wrap{
  width:58px;
  height:58px;
  border-radius:16px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.05);
  box-shadow:var(--shadow);
  flex:0 0 auto;
  padding:4px;
}
.brand-logo-img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.nav-section-title{
  color:var(--muted);
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  margin-bottom:10px;
}
.nav{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.nav a{
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  color:#dce7f7;
  background:rgba(255,255,255,.02);
  transition:.2s ease;
}
.nav a:hover,
.nav a.active{
  background:rgba(212,175,55,.10);
  border-color:var(--line2);
  color:#fff;
}

.main{
  min-width:0;
  padding:22px;
}
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:20px;
}
.mobile-menu-btn{
  display:none;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:#fff;
  border-radius:14px;
  padding:12px 14px;
  cursor:pointer;
}
.user-chip{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  border-radius:18px;
  padding:10px 14px;
}
.user-avatar{
  width:42px;
  height:42px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,var(--gold),var(--gold2));
  color:#111;
  font-weight:800;
}
.user-chip strong{display:block}
.user-chip small{
  display:block;
  color:var(--muted);
  margin-top:4px;
}

.page-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
.page-head h2{
  margin:0 0 6px;
  font-size:30px;
}
.page-head p{
  margin:0;
  color:var(--muted);
  line-height:1.7;
}
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--line2);
  background:rgba(212,175,55,.10);
  color:var(--gold2);
  font-weight:700;
  white-space:nowrap;
}

.card{
  background:linear-gradient(180deg, rgba(13,23,40,.95), rgba(9,16,30,.95));
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
  padding:22px;
}
.card h3{
  margin:0 0 8px;
  font-size:22px;
}

.grid{
  display:grid;
  gap:16px;
}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}

.row{
  display:grid;
  grid-template-columns:repeat(1,minmax(0,1fr));
  gap:14px;
}
.row-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.row-3{grid-template-columns:repeat(3,minmax(0,1fr))}

.field{display:flex;flex-direction:column;gap:8px}
.field label{
  color:#dce6f7;
  font-size:14px;
  font-weight:600;
}
.input, textarea, select{
  width:100%;
  border:1px solid rgba(255,255,255,.10);
  background:#0a1426;
  color:#fff;
  border-radius:16px;
  padding:14px 16px;
  outline:none;
  font:inherit;
}
.input::placeholder,
textarea::placeholder{
  color:#7f94b4;
}
.input:focus,
textarea:focus,
select:focus{
  border-color:rgba(212,175,55,.45);
  box-shadow:0 0 0 3px rgba(212,175,55,.08);
}
textarea{
  min-height:110px;
  resize:vertical;
}

.btns{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:12px 18px;
  border-radius:16px;
  border:1px solid transparent;
  font-weight:700;
  cursor:pointer;
  transition:.2s ease;
}
.btn-primary{
  background:linear-gradient(180deg,var(--gold2),var(--gold));
  color:#111;
  box-shadow:0 10px 26px rgba(212,175,55,.18);
}
.btn-primary:hover{transform:translateY(-1px)}
.btn-dark{
  background:#15233c;
  color:#fff;
  border-color:rgba(255,255,255,.08);
}
.btn-dark:hover{
  border-color:var(--line2);
  background:#1a2b49;
}
.btn-ghost{
  background:transparent;
  color:#fff;
  border-color:rgba(255,255,255,.10);
}
.btn-ghost:hover{
  border-color:var(--line2);
  background:rgba(212,175,55,.07);
}

.notice{
  border-radius:18px;
  padding:14px 16px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  line-height:1.7;
}
.notice.hide{display:none}
.notice.ok{
  background:var(--ok-bg);
  border-color:var(--ok-line);
}
.notice.warn{
  background:var(--warn-bg);
  border-color:var(--warn-line);
}
.notice.err{
  background:var(--err-bg);
  border-color:var(--err-line);
}

.stat,.kpi{
  border:1px solid var(--line);
  background:rgba(255,255,255,.02);
  border-radius:18px;
  padding:16px;
}
.stat .label,.kpi .label{
  color:var(--muted);
  font-size:13px;
  margin-bottom:8px;
}
.stat .value,.kpi .value{
  font-size:20px;
  font-weight:800;
  color:#fff;
  word-break:break-word;
}
.kpi-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:780px;
}
.table thead th{
  text-align:left;
  padding:14px 12px;
  font-size:13px;
  color:#dce7f7;
  background:#121f34;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
}
.table thead th:first-child{border-top-left-radius:14px}
.table thead th:last-child{border-top-right-radius:14px}
.table tbody td{
  padding:13px 12px;
  border-bottom:1px solid rgba(255,255,255,.06);
  color:#eef4ff;
  vertical-align:top;
  background:rgba(255,255,255,.015);
}
.table tbody tr:hover td{
  background:rgba(212,175,55,.04);
}

pre{
  white-space:pre-wrap;
  word-break:break-word;
  margin:8px 0 0;
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:12px;
  color:#e9f1ff;
}

@media (max-width: 1080px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{
    position:fixed;
    left:0;
    top:0;
    bottom:0;
    width:300px;
    z-index:100;
    transform:translateX(-105%);
    transition:.25s ease;
  }
  .sidebar.open{transform:translateX(0)}
  .mobile-menu-btn{display:inline-flex}
  .main{padding:18px}
  .hero-card{grid-template-columns:1fr}
  .landing-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width: 768px){
  .public-topbar-inner{
    flex-direction:column;
    align-items:flex-start;
  }
  .public-nav{
    width:100%;
  }
  .hero-copy h1{font-size:30px}
  .grid-2,.grid-3,.row-2,.row-3,.kpi-strip{
    grid-template-columns:1fr;
  }
  .auth-card{padding:22px}
  .page-head{
    flex-direction:column;
    align-items:flex-start;
  }
  .landing-grid{grid-template-columns:1fr}
}