:root{
  --bg:#050608;
  --bg2:#090d12;
  --panel:#0e141c;
  --panel2:#121923;
  --panel3:#171f2b;
  --line:rgba(255,255,255,.075);
  --line-gold:rgba(242,201,76,.22);

  --gold:#F2C94C;
  --gold2:#FFE08A;

  --green:#32D583;
  --red:#FF6B6B;
  --blue:#6EA8FF;

  --text:#F8FAFC;
  --muted:#8F9BAD;

  --radius:22px;
  --radius-sm:14px;

  --shadow:0 24px 70px rgba(0,0,0,.45);
}

/* =========================================================
   BASE
   ========================================================= */

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  min-height:100vh;
  color:var(--text);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  background:
    radial-gradient(
      900px 500px at 50% -120px,
      rgba(242,201,76,.10),
      transparent 70%
    ),
    radial-gradient(
      700px 500px at 100% 20%,
      rgba(80,110,160,.08),
      transparent 70%
    ),
    linear-gradient(
      180deg,
      #0a0d12 0%,
      #050608 100%
    );
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.18;

  background-image:
    linear-gradient(
      rgba(255,255,255,.025) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255,255,255,.025) 1px,
      transparent 1px
    );

  background-size:48px 48px;

  mask-image:
    linear-gradient(
      to bottom,
      black,
      transparent 80%
    );
}

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

button,
input,
select{
  font:inherit;
}

/* =========================================================
   TOP BAR
   ========================================================= */

.topbar{
  position:sticky;
  top:0;
  z-index:50;

  display:flex;
  align-items:center;
  justify-content:space-between;

  padding:
    14px
    max(20px,calc((100vw - 1380px)/2));

  background:rgba(5,6,8,.78);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);

  border-bottom:1px solid var(--line);
}

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

.brand>a{
  display:flex;
  align-items:center;
}

.brand img{
  width:42px;
  height:42px;
  object-fit:contain;
  border-radius:13px;
}

.brand-title{
  font-size:17px;
  font-weight:800;
  letter-spacing:-.02em;
}

.brand-sub{
  margin-top:2px;
  color:var(--muted);
  font-size:12px;
}

.top-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

/* =========================================================
   STATUS
   ========================================================= */

.status{
  display:inline-flex;
  align-items:center;
  gap:7px;

  padding:8px 12px;

  border-radius:999px;

  background:rgba(255,255,255,.035);
  border:1px solid var(--line);

  color:var(--muted);
  font-size:12px;
  font-weight:700;
}

.status.online{
  color:var(--green);
  border-color:rgba(50,213,131,.22);
  background:rgba(50,213,131,.07);
}

.status.offline{
  color:var(--red);
  border-color:rgba(255,107,107,.22);
  background:rgba(255,107,107,.06);
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  min-height:44px;
  padding:11px 17px;

  border-radius:14px;

  border:1px solid var(--line);

  background:var(--panel2);
  color:var(--text);

  font-weight:750;
  font-size:14px;

  cursor:pointer;

  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.btn:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.16);
}

.btn:active{
  transform:translateY(0);
}

.btn.primary{
  color:#111;
  border-color:var(--gold);

  background:
    linear-gradient(
      135deg,
      var(--gold),
      var(--gold2)
    );

  box-shadow:
    0 10px 30px rgba(242,201,76,.12);
}

.btn.primary:hover{
  box-shadow:
    0 14px 35px rgba(242,201,76,.18);
}

.btn.secondary{
  background:#171e29;
}

.btn.success{
  color:#06130c;
  background:var(--green);
  border-color:var(--green);
}

.btn.ghost{
  background:transparent;
}

/* =========================================================
   MAIN
   ========================================================= */

.container{
  width:100%;
  max-width:1380px;
  margin:0 auto;
  padding:34px 28px 60px;
}

/* =========================================================
   HERO
   ========================================================= */

.hero{
  position:relative;
  overflow:hidden;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;

  min-height:230px;
  padding:38px;

  border-radius:30px;

  background:
    linear-gradient(
      135deg,
      rgba(25,32,44,.96),
      rgba(10,14,20,.96)
    );

  border:1px solid var(--line-gold);

  box-shadow:var(--shadow);
}

.hero::before{
  content:"";

  position:absolute;
  width:430px;
  height:430px;

  right:-160px;
  top:-230px;

  border-radius:50%;

  background:
    radial-gradient(
      circle,
      rgba(242,201,76,.20),
      transparent 68%
    );

  pointer-events:none;
}

.hero::after{
  content:"";

  position:absolute;
  inset:0;

  background:
    linear-gradient(
      115deg,
      transparent 30%,
      rgba(255,255,255,.025),
      transparent 60%
    );

  pointer-events:none;
}

.hero>div{
  position:relative;
  z-index:2;
}

.eyebrow{
  color:var(--gold);
  font-size:11px;
  font-weight:850;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.hero h1{
  margin:10px 0 12px;

  max-width:800px;

  font-size:
    clamp(34px,5vw,58px);

  line-height:1.02;
  letter-spacing:-.045em;
}

.hero p{
  max-width:700px;
  margin:0;

  color:var(--muted);

  font-size:
    clamp(14px,2vw,17px);

  line-height:1.65;
}

.hero-badge{
  flex:0 0 auto;

  min-width:130px;

  padding:20px;

  text-align:center;

  border-radius:20px;

  background:rgba(255,255,255,.035);
  border:1px solid var(--line);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04);
}

.hero-badge span{
  display:block;

  color:var(--muted);

  font-size:10px;
  font-weight:800;
  letter-spacing:.15em;
}

.hero-badge strong{
  display:block;
  margin-top:7px;

  color:var(--gold);

  font-size:20px;
}

/* =========================================================
   CARDS
   ========================================================= */

.card{
  position:relative;

  margin-top:20px;
  padding:26px;

  border-radius:var(--radius);

  background:
    linear-gradient(
      145deg,
      rgba(18,25,35,.90),
      rgba(10,14,20,.90)
    );

  border:1px solid var(--line);

  box-shadow:var(--shadow);

  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}

.section-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;

  gap:20px;

  margin-bottom:22px;
}

.section-heading h2{
  margin:5px 0 0;

  font-size:22px;
  letter-spacing:-.025em;
}

.section-heading p{
  margin:8px 0 0;
}

.muted{
  color:var(--muted);
}

/* =========================================================
   BUSINESS WORKSPACE
   ========================================================= */

.form-grid{
  display:grid;

  grid-template-columns:
    2fr
    1fr
    1fr
    1fr;

  gap:14px;
}

.form-grid label{
  display:flex;
  flex-direction:column;
  gap:8px;

  color:#cbd5e1;

  font-size:12px;
  font-weight:750;
}

.form-grid small{
  color:var(--muted);
  font-weight:500;
}

input,
select{
  width:100%;

  min-height:48px;

  padding:12px 14px;

  color:var(--text);

  background:
    rgba(5,8,12,.75);

  border:1px solid rgba(255,255,255,.08);

  border-radius:14px;

  outline:none;

  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

input::placeholder{
  color:#667386;
}

input:hover,
select:hover{
  border-color:rgba(255,255,255,.14);
}

input:focus,
select:focus{
  border-color:var(--gold);

  box-shadow:
    0 0 0 3px rgba(242,201,76,.11);
}

.workspace-row{
  display:flex;
  align-items:center;
  justify-content:space-between;

  gap:18px;

  margin-top:20px;
  padding-top:20px;

  border-top:1px solid var(--line);
}

.workspace-info{
  display:flex;
  align-items:center;
  gap:10px;

  color:var(--muted);

  font-size:12px;
}

code{
  padding:6px 9px;

  color:#dce5f3;

  background:#090d13;

  border:1px solid var(--line);

  border-radius:9px;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;

  font-size:11px;
}

/* =========================================================
   BADGES
   ========================================================= */

.badge{
  display:inline-flex;
  align-items:center;

  padding:7px 11px;

  border-radius:999px;

  color:var(--muted);

  background:rgba(255,255,255,.035);

  border:1px solid var(--line);

  font-size:11px;
  font-weight:800;
}

.badge.active{
  color:var(--green);

  background:rgba(50,213,131,.07);

  border-color:rgba(50,213,131,.22);
}

/* =========================================================
   UPLOAD
   ========================================================= */

.supported{
  flex:0 0 auto;

  padding:8px 11px;

  border-radius:999px;

  color:var(--gold);

  background:rgba(242,201,76,.07);

  border:1px solid rgba(242,201,76,.16);

  font-size:11px;
  font-weight:800;
}

.drop{
  position:relative;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;

  min-height:250px;

  padding:35px;

  text-align:center;

  border:2px dashed rgba(242,201,76,.25);

  border-radius:22px;

  background:
    radial-gradient(
      circle at center,
      rgba(242,201,76,.045),
      transparent 65%
    );

  transition:
    border-color .2s ease,
    background .2s ease,
    transform .2s ease;
}

.drop:hover,
.drop.drag{
  border-color:var(--gold);

  background:
    radial-gradient(
      circle at center,
      rgba(242,201,76,.09),
      transparent 68%
    );

  transform:translateY(-1px);
}

.upload-icon{
  display:grid;
  place-items:center;

  width:66px;
  height:66px;

  margin-bottom:14px;

  color:#111;

  background:
    linear-gradient(
      135deg,
      var(--gold),
      var(--gold2)
    );

  border-radius:20px;

  font-size:32px;
  font-weight:900;

  box-shadow:
    0 15px 35px rgba(242,201,76,.12);
}

.drop h3{
  margin:0;

  font-size:20px;
}

.drop p{
  margin:7px 0 18px;

  color:var(--muted);

  font-size:14px;
}

.upload-log{
  min-height:22px;
  margin-top:14px;

  color:var(--muted);

  font-size:12px;
}

.upload-log.ok{
  color:var(--green);
}

.upload-log.error{
  color:var(--red);
}

/* =========================================================
   KPI COMMAND CENTER
   ========================================================= */

.kpis{
  display:grid;

  grid-template-columns:
    repeat(4,1fr);

  gap:14px;

  margin-top:20px;
}

.kpi{
  position:relative;
  overflow:hidden;

  padding:22px;

  border-radius:20px;

  background:
    linear-gradient(
      145deg,
      rgba(21,28,39,.94),
      rgba(10,14,20,.94)
    );

  border:1px solid var(--line);

  box-shadow:
    0 15px 45px rgba(0,0,0,.25);
}

.kpi::after{
  content:"";

  position:absolute;

  width:110px;
  height:110px;

  right:-60px;
  bottom:-60px;

  border-radius:50%;

  background:
    radial-gradient(
      circle,
      rgba(242,201,76,.10),
      transparent 70%
    );
}

.kpi span{
  display:block;

  color:var(--muted);

  font-size:11px;
  font-weight:800;

  text-transform:uppercase;
  letter-spacing:.12em;
}

.kpi strong{
  display:block;

  margin-top:10px;

  font-size:
    clamp(25px,3vw,34px);

  line-height:1;

  letter-spacing:-.04em;
}

/* =========================================================
   TRANSACTIONS
   ========================================================= */

.filters{
  display:flex;
  align-items:center;

  gap:9px;

  min-width:320px;
}

.filters input{
  min-width:190px;
}

.table-wrap{
  overflow:auto;

  border:1px solid var(--line);

  border-radius:18px;

  background:rgba(4,7,10,.45);
}

table{
  width:100%;
  min-width:850px;

  border-collapse:collapse;
}

thead{
  background:rgba(255,255,255,.025);
}

th{
  padding:14px 15px;

  color:#778397;

  font-size:10px;
  font-weight:850;

  text-align:left;

  text-transform:uppercase;
  letter-spacing:.1em;

  white-space:nowrap;
}

td{
  padding:15px;

  color:#dce3ec;

  font-size:13px;

  border-top:1px solid rgba(255,255,255,.045);
}

tbody tr{
  transition:background .15s ease;
}

tbody tr:hover{
  background:rgba(255,255,255,.025);
}

td.description{
  max-width:300px;

  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.right{
  text-align:right;
}

.negative{
  color:var(--red);
}

.category-select{
  min-height:36px;

  padding:7px 10px;

  border-radius:10px;

  font-size:12px;
}

.delete-btn{
  width:32px;
  height:32px;

  display:grid;
  place-items:center;

  border-radius:10px;

  border:1px solid rgba(255,255,255,.06);

  background:rgba(255,255,255,.025);

  color:#778397;

  cursor:pointer;

  font-size:18px;

  transition:.18s;
}

.delete-btn:hover{
  color:var(--red);

  border-color:rgba(255,107,107,.25);

  background:rgba(255,107,107,.07);
}

tfoot td{
  color:var(--muted);
  font-weight:800;

  background:rgba(255,255,255,.018);
}

/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty{
  padding:70px 20px;

  text-align:center;

  border:1px dashed var(--line);

  border-radius:18px;

  background:rgba(255,255,255,.012);
}

.empty-icon{
  display:grid;
  place-items:center;

  width:58px;
  height:58px;

  margin:0 auto 15px;

  color:var(--gold);

  border-radius:18px;

  background:rgba(242,201,76,.07);

  border:1px solid rgba(242,201,76,.14);

  font-size:24px;
}

.empty h3{
  margin:0;

  font-size:18px;
}

.empty p{
  margin:7px 0 0;

  color:var(--muted);
}

/* =========================================================
   TAX SUMMARY
   ========================================================= */

.summary-card{
  overflow:hidden;
}

.summary-grid{
  display:grid;

  grid-template-columns:
    repeat(4,1fr);

  gap:14px;
}

.summary-grid>div{
  padding:21px;

  border-radius:18px;

  background:
    linear-gradient(
      145deg,
      rgba(23,30,42,.92),
      rgba(12,17,24,.92)
    );

  border:1px solid var(--line);
}

.summary-grid span{
  display:block;

  color:var(--muted);

  font-size:11px;
  font-weight:800;

  text-transform:uppercase;
  letter-spacing:.1em;
}

.summary-grid strong{
  display:block;

  margin-top:9px;

  font-size:28px;

  letter-spacing:-.035em;
}

.raw{
  display:none;
}

.actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;

  gap:10px;

  margin-top:20px;

  padding-top:20px;

  border-top:1px solid var(--line);
}

/* =========================================================
   FOOTER
   ========================================================= */

footer{
  margin-top:30px;

  padding:28px 10px;

  color:#687386;

  text-align:center;

  font-size:12px;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media(max-width:1050px){

  .form-grid{
    grid-template-columns:
      repeat(2,1fr);
  }

  .kpis,
  .summary-grid{
    grid-template-columns:
      repeat(2,1fr);
  }

}

@media(max-width:720px){

  .topbar{
    padding:
      12px
      16px;
  }

  .brand-sub{
    display:none;
  }

  .container{
    padding:
      18px
      14px
      40px;
  }

  .hero{
    flex-direction:column;
    align-items:flex-start;

    min-height:auto;

    padding:26px;

    border-radius:24px;
  }

  .hero h1{
    font-size:36px;
  }

  .hero-badge{
    width:100%;
  }

  .card{
    padding:19px;

    border-radius:20px;
  }

  .section-heading{
    flex-direction:column;
  }

  .form-grid{
    grid-template-columns:1fr;
  }

  .workspace-row{
    align-items:stretch;
    flex-direction:column;
  }

  .workspace-info{
    justify-content:space-between;
  }

  .kpis,
  .summary-grid{
    grid-template-columns:1fr 1fr;
    gap:10px;
  }

  .kpi,
  .summary-grid>div{
    padding:17px;
  }

  .filters{
    width:100%;
    min-width:0;
    flex-direction:column;
  }

  .filters input,
  .filters select{
    width:100%;
  }

  .drop{
    min-height:220px;
    padding:25px 15px;
  }

}

@media(max-width:450px){

  .top-actions .btn{
    padding:
      9px 11px;
  }

  .status{
    padding:
      7px 9px;
  }

  .hero h1{
    font-size:31px;
  }

  .kpis,
  .summary-grid{
    grid-template-columns:1fr;
  }

  .actions{
    flex-direction:column;
    align-items:stretch;
  }

  .actions .btn{
    width:100%;
  }
}
