:root{
  --bg:#07111f;
  --panel:#0c1626;
  --panel-2:#0f1b2d;
  --panel-3:#121f33;
  --line:rgba(255,255,255,.08);
  --line-strong:rgba(255,255,255,.12);
  --text:#eff5ff;
  --muted:#9fb0cc;
  --primary:#3bb273;
  --primary-2:#67d995;
  --danger:#ff6b6b;
  --warning:#d6b566;
  --shadow:0 18px 42px rgba(0,0,0,.28);
}

*{box-sizing:border-box}

html,
body{
  margin:0;
  padding:0;
  min-height:100%;
}

body{
  background:
    radial-gradient(circle at top left, rgba(59,178,115,.10), transparent 24%),
    linear-gradient(180deg,#07111f 0%, #081521 50%, #09141d 100%);
  color:var(--text);
  font-family:Inter,system-ui,-apple-system,sans-serif;
}

a{text-decoration:none;color:inherit}

.layout{
  display:grid;
  grid-template-columns:280px 1fr;
  min-height:100vh;
  align-items:start;
}

.sidebar{
  background:linear-gradient(180deg,#0a1525 0%,#0b1728 100%);
  border-right:1px solid var(--line);
  padding:22px 16px;
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:24px;
  padding:4px 2px 8px;
}

.brand-badge{
  width:54px;
  height:54px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:#062112;
  font-weight:900;
  box-shadow:var(--shadow);
  font-size:13px;
  flex-shrink:0;
}

.brand-text strong{
  display:block;
  font-size:18px;
  line-height:1.1;
}

.brand-text small{
  display:block;
  color:var(--muted);
  margin-top:4px;
  font-size:13px;
}

.nav{
  display:grid;
  gap:8px;
}

.nav a{
  display:flex;
  align-items:center;
  min-height:46px;
  padding:12px 14px;
  border-radius:14px;
  color:#dfeaff;
  font-weight:600;
  border:1px solid transparent;
  transition:.2s ease;
}

.nav a:hover{
  background:rgba(255,255,255,.04);
  border-color:var(--line);
  transform:translateX(2px);
}

.nav a.active{
  background:linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  border-color:var(--line-strong);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

.main{
  padding:18px 22px 28px;
  min-height:100vh;
  display:block;
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin:0 0 16px 0;
  padding:0;
}

.topbar-left h1{
  margin:0 0 6px;
  font-size:32px;
  line-height:1.08;
  letter-spacing:-0.02em;
}

.topbar-left p{
  margin:0;
  color:var(--muted);
  font-size:14px;
}

.user-box{
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.025));
  border:1px solid var(--line);
  padding:14px 16px;
  border-radius:16px;
  text-align:right;
  min-width:220px;
  box-shadow:var(--shadow);
}

.user-box strong{
  display:block;
  font-size:15px;
}

.user-box span{
  display:block;
  color:var(--muted);
  margin-top:4px;
  font-size:13px;
}

.flash{
  padding:14px 16px;
  border-radius:16px;
  margin:0 0 16px 0;
  border:1px solid transparent;
}

.flash.success{
  background:rgba(59,178,115,.10);
  border-color:rgba(59,178,115,.25);
}

.flash.error{
  background:rgba(255,107,107,.10);
  border-color:rgba(255,107,107,.25);
}

.page-content{
  display:block;
  margin:0;
  padding:0;
  min-height:auto;
}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.028));
  border:1px solid var(--line);
  border-radius:24px;
  padding:20px;
  box-shadow:var(--shadow);
}

.hero-banner{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:18px;
  padding:24px;
  border-radius:28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.03)),
    linear-gradient(135deg, rgba(12,20,36,.98), rgba(18,28,46,.94));
  border:1px solid var(--line);
  margin:0 0 18px 0;
  box-shadow:var(--shadow);
}

.hero-banner h2{
  margin:0 0 10px;
  font-size:36px;
  line-height:1.05;
}

.hero-banner p{
  margin:0;
  color:#dce7f8;
  line-height:1.7;
}

.hero-mini-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.hero-mini{
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  border-radius:18px;
  padding:16px;
}

.hero-mini span{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-bottom:6px;
}

.hero-mini strong{
  font-size:24px;
}

.grid-4{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

.grid-3{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.grid-2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.stat-card span{
  display:block;
  color:var(--muted);
  margin-bottom:8px;
}

.stat-card strong{
  font-size:30px;
}

.section-title{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center;
  margin:24px 0 14px;
}

.section-title h2{
  margin:0;
  font-size:24px;
}

.market-card{
  position:relative;
  overflow:hidden;
}

.market-card::after{
  content:'';
  position:absolute;
  right:-30px;
  bottom:-30px;
  width:100px;
  height:100px;
  border-radius:50%;
  background:rgba(255,255,255,.04);
}

.table-wrap{
  overflow:auto;
}

table{
  width:100%;
  border-collapse:collapse;
}

th,td{
  padding:14px 12px;
  border-bottom:1px solid var(--line);
  text-align:left;
  font-size:14px;
}

th{
  color:#dfeaff;
}

td{
  color:#c9d7ee;
}

form.grid-form{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

form.grid-form .full{
  grid-column:1/-1;
}

label{
  display:block;
  margin-bottom:6px;
  font-weight:600;
}

input,select,textarea{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
  font:inherit;
  outline:none;
}

textarea{
  min-height:110px;
  resize:vertical;
}

button,.button{
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:#062112;
  border:none;
  border-radius:14px;
  padding:12px 16px;
  font-weight:800;
  cursor:pointer;
}

.button-outline{
  background:transparent;
  color:#fff;
  border:1px solid var(--line);
}

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

.badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

.badge.active,
.badge.paid,
.badge.income{
  background:rgba(59,178,115,.14);
  color:#bbf5d2;
}

.badge.pending,
.badge.expense{
  background:rgba(214,181,102,.16);
  color:#ffe7a0;
}

.badge.inactive{
  background:rgba(255,107,107,.14);
  color:#ffd3d3;
}

.login-page{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  background:
    radial-gradient(circle at top left,rgba(59,178,115,.18),transparent 26%),
    radial-gradient(circle at bottom right,rgba(214,181,102,.10),transparent 20%),
    linear-gradient(180deg,#081220 0%,#091729 100%);
}

.login-card{
  width:min(100%,1040px);
  display:grid;
  grid-template-columns:1fr 420px;
  border-radius:30px;
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  background:rgba(255,255,255,.04);
}

.login-hero{
  padding:40px;
  background:linear-gradient(135deg,#0d1a2d 0%,#173320 100%);
}

.login-hero h1{
  font-size:42px;
  line-height:1.05;
  margin:0 0 14px;
}

.login-hero p{
  color:#d2def0;
  line-height:1.7;
}

.login-form{
  padding:34px;
  background:rgba(0,0,0,.12);
}

.login-form h2{
  margin-top:0;
}

.small{
  font-size:13px;
  color:var(--muted);
}

.hero-panel{
  background:linear-gradient(135deg,rgba(59,178,115,.14),rgba(103,217,149,.10));
  border:1px solid rgba(103,217,149,.18);
}

.empty{
  color:var(--muted);
  padding:16px 0;
}

.metric-note{
  color:var(--muted);
  font-size:13px;
  margin-top:8px;
}

.dashboard-note{
  color:var(--muted);
  font-size:14px;
}

.chart-card canvas{
  max-height:320px;
}

.map-frame{
  width:100%;
  min-height:320px;
  border:none;
  border-radius:18px;
  background:rgba(255,255,255,.03);
}

.kpi-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}

.kpi-strip .hero-mini strong{
  font-size:20px;
}

.plot-badge{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(59,178,115,.14);
  color:#bbf5d2;
  font-size:12px;
  font-weight:700;
}

.page-content > :first-child{
  margin-top:0 !important;
}

.dashboard-clean-premium,
.dashboard-premium-vivid,
.dashboard-pro4,
.dashboard-pro3,
.dashboard-pro2,
.dashboard-pro{
  margin-top:0 !important;
  padding-top:0 !important;
}

.dashboard-hero,
.hero-vivid,
.hero-pro4,
.hero-pro3,
.hero-pro2,
.hero-dashboard{
  margin-top:0 !important;
}

@media (max-width:1100px){
  .layout{grid-template-columns:1fr}
  .sidebar{position:relative;height:auto}
  .grid-4,.grid-3,.grid-2,.login-card,.hero-banner{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:700px){
  .main{padding:16px}
  .topbar{flex-direction:column}
  .user-box{text-align:left;min-width:0;width:100%}
  .grid-4,.grid-3,.grid-2,form.grid-form,.login-card,.hero-banner,.hero-mini-grid{grid-template-columns:1fr}
  .hero-banner h2{font-size:30px}
  .kpi-strip{grid-template-columns:1fr}
}