:root{
  --bg:#0b1020;
  --panel:#121a30;
  --panel2:#18233f;
  --line:rgba(255,255,255,.08);
  --text:#eef2ff;
  --muted:#9aa7c2;
  --accent:#4f7cff;
  --accent2:#7c3aed;
  --radius:20px;
  --shadow:0 20px 50px rgba(0,0,0,.25);
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Inter,Arial,sans-serif;
  background:
    radial-gradient(circle at top left, rgba(79,124,255,.18), transparent 26%),
    radial-gradient(circle at top right, rgba(124,58,237,.16), transparent 22%),
    radial-gradient(circle at bottom, rgba(37,99,235,.10), transparent 30%),
    #0b1020;
  color:var(--text);
}
a{color:inherit;text-decoration:none}
.acc-container{max-width:1180px;margin:0 auto;padding:0 20px}
.acc-header{
  position:sticky;
  top:0;
  z-index:20;
  backdrop-filter:blur(14px);
  background:rgba(10,16,32,.72);
  border-bottom:1px solid var(--line);
}
.acc-header__inner{
  min-height:74px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.acc-logo{
  font-weight:800;
  letter-spacing:.02em;
  font-size:18px;
}
.acc-nav{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
}
.acc-nav a{
  color:var(--muted);
  transition:.2s ease;
}
.acc-nav a:hover{color:#fff}
.acc-main{padding:36px 0 60px}
.page-head{margin-bottom:24px}
.page-head h1{
  margin:0 0 10px;
  font-size:40px;
  line-height:1.1;
}
.page-head p{
  margin:0;
  color:var(--muted);
  font-size:16px;
  line-height:1.7;
}
.stat-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  margin-bottom:22px;
}
.stat-card,
.panel,
.auth-card{
  background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.03));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.stat-card{padding:22px}
.stat-card__label{
  color:var(--muted);
  font-size:13px;
  margin-bottom:10px;
}
.stat-card__value{
  font-size:30px;
  font-weight:800;
  line-height:1.2;
}
.panel-grid{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:22px;
}
.panel{padding:24px}
.panel h2{
  margin:0 0 16px;
  font-size:24px;
}
.panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}
.panel ul{
  margin:0;
  padding-left:18px;
  color:var(--muted);
  line-height:1.8;
}
.panel--narrow{max-width:760px}
.button-stack{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.button,
.auth-form button{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  min-height:52px;
  padding:0 18px;
  border-radius:14px;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  color:#fff;
  font-weight:700;
  border:none;
  cursor:pointer;
  transition:transform .18s ease, opacity .18s ease, box-shadow .18s ease;
  box-shadow:0 14px 30px rgba(79,124,255,.18);
}
.button:hover,
.auth-form button:hover{
  transform:translateY(-1px);
  opacity:.98;
}
.button--ghost{
  background:rgba(255,255,255,.05);
  border:1px solid var(--line);
  box-shadow:none;
}
.auth-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.auth-card{
  width:100%;
  max-width:520px;
  padding:28px;
}
.auth-card h1{
  margin:0 0 18px;
  font-size:34px;
}
.auth-error{
  margin-bottom:16px;
  padding:14px 16px;
  border-radius:14px;
  background:rgba(220,38,38,.12);
  border:1px solid rgba(220,38,38,.28);
  color:#fecaca;
}
.auth-form{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.auth-form label{
  font-size:14px;
  color:var(--muted);
  margin-top:6px;
}
.auth-form input{
  width:100%;
  min-height:50px;
  padding:0 16px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:#fff;
  outline:none;
}
.auth-form input:focus{
  border-color:rgba(79,124,255,.7);
  box-shadow:0 0 0 4px rgba(79,124,255,.12);
}
.auth-links{
  margin-top:18px;
  color:var(--muted);
}
.auth-links a{color:#c7d2fe}
.table-wrap{overflow:auto}
.acc-table{
  width:100%;
  border-collapse:collapse;
  min-width:720px;
}
.acc-table th,
.acc-table td{
  text-align:left;
  padding:14px 12px;
  border-bottom:1px solid var(--line);
}
.acc-table th{
  color:#c7d2fe;
  font-size:13px;
  font-weight:700;
}
.acc-table td{
  color:#e5e7eb;
  font-size:14px;
}
.status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
}
.status-badge--completed,
.status-badge--generated,
.status-badge--paid{
  background:rgba(16,185,129,.12);
  border-color:rgba(16,185,129,.24);
  color:#a7f3d0;
}
.status-badge--draft,
.status-badge--new{
  background:rgba(245,158,11,.12);
  border-color:rgba(245,158,11,.24);
  color:#fde68a;
}
.table-link{
  color:#c7d2fe;
  font-weight:600;
}
.table-link:hover{color:#fff}
.empty-state{
  padding:24px;
  border-radius:16px;
  background:rgba(255,255,255,.04);
  border:1px dashed var(--line);
  color:var(--muted);
}
.mini-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.mini-item{
  padding:14px 16px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.05);
}
.mini-item--link{
  transition:transform .18s ease, border-color .18s ease, background .18s ease;
}
.mini-item--link:hover{
  transform:translateY(-1px);
  border-color:rgba(79,124,255,.28);
  background:rgba(255,255,255,.06);
}
.mini-item__title{
  font-weight:700;
  color:#fff;
  margin-bottom:6px;
}
.mini-item__meta{
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}
.detail-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:22px;
}
.detail-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.detail-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:12px 0;
  border-bottom:1px solid var(--line);
}
.detail-row span{
  color:var(--muted);
  font-size:14px;
}
.detail-row strong{
  color:#fff;
  text-align:right;
}
.json-box{
  margin:0;
  padding:18px;
  border-radius:16px;
  background:#0d152b;
  border:1px solid var(--line);
  color:#dbeafe;
  font-size:13px;
  line-height:1.7;
  white-space:pre-wrap;
  word-break:break-word;
  overflow:auto;
}
@media (max-width: 920px){
  .stat-grid,
  .panel-grid,
  .detail-grid{
    grid-template-columns:1fr;
  }
  .page-head h1{font-size:32px}
}
@media (max-width: 640px){
  .acc-header__inner{
    min-height:64px;
    align-items:flex-start;
    padding-top:14px;
    padding-bottom:14px;
    flex-direction:column;
  }
  .acc-nav{gap:12px}
  .auth-card{padding:22px}
  .page-head h1{font-size:28px}
  .detail-row{
    flex-direction:column;
    align-items:flex-start;
  }
  .detail-row strong{
    text-align:left;
  }
}

.auth-success{
  margin:0 0 16px;
  padding:12px 14px;
  border-radius:12px;
  background:rgba(16,185,129,.14);
  border:1px solid rgba(16,185,129,.28);
  color:#d1fae5;
  font-size:14px;
  line-height:1.5;
}

/* ===== enhanced auth pages ===== */
.auth-page-enhanced{
  min-height:100vh;
  padding:40px 20px;
  background:
    radial-gradient(circle at top left, rgba(78,120,255,.18), transparent 34%),
    radial-gradient(circle at top right, rgba(120,60,255,.16), transparent 28%),
    linear-gradient(135deg, #071228 0%, #040b1c 52%, #020817 100%);
}

.auth-shell{
  max-width:1180px;
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0, 640px) minmax(300px, 380px);
  gap:28px;
  align-items:start;
}

.auth-panel{
  border:1px solid rgba(255,255,255,.08);
  border-radius:24px;
  background:rgba(9,16,34,.72);
  box-shadow:0 24px 70px rgba(0,0,0,.35);
  backdrop-filter:blur(18px);
}

.auth-panel-form{
  padding:32px;
}

.auth-panel-side{
  display:flex;
  flex-direction:column;
  gap:18px;
  background:transparent;
  border:0;
  box-shadow:none;
  backdrop-filter:none;
}

.auth-brand{
  font-size:12px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:rgba(255,255,255,.48);
  margin-bottom:10px;
}

.auth-title{
  margin:0 0 10px;
  font-size:42px;
  line-height:1.05;
  font-weight:800;
  color:#fff;
}

.auth-subtitle{
  margin:0 0 24px;
  max-width:560px;
  color:rgba(255,255,255,.68);
  font-size:15px;
  line-height:1.6;
}

.auth-form-enhanced{
  display:block;
}

.form-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}

.form-field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.form-field label{
  color:rgba(255,255,255,.78);
  font-size:14px;
  font-weight:600;
}

.auth-form-enhanced input[type="text"],
.auth-form-enhanced input[type="email"],
.auth-form-enhanced input[type="password"]{
  width:100%;
  height:56px;
  padding:0 18px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:#fff;
  font-size:15px;
  box-sizing:border-box;
  outline:none;
  transition:.2s ease;
}

.auth-form-enhanced input[type="text"]::placeholder,
.auth-form-enhanced input[type="email"]::placeholder,
.auth-form-enhanced input[type="password"]::placeholder{
  color:rgba(255,255,255,.34);
}

.auth-form-enhanced input[type="text"]:focus,
.auth-form-enhanced input[type="email"]:focus,
.auth-form-enhanced input[type="password"]:focus{
  border-color:rgba(111,140,255,.8);
  background:rgba(255,255,255,.09);
  box-shadow:0 0 0 4px rgba(90,120,255,.12);
}

.agreements-list{
  margin:22px 0 24px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.agreement-item{
  display:grid;
  grid-template-columns:20px 1fr;
  gap:12px;
  align-items:start;
  padding:14px 16px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  background:rgba(255,255,255,.04);
  box-sizing:border-box;
}

.agreement-checkbox{
  width:18px !important;
  height:18px !important;
  margin:2px 0 0 0 !important;
  accent-color:#5b7cff;
  flex:none !important;
}

.agreement-text{
  min-width:0;
  color:rgba(255,255,255,.78);
  font-size:14px;
  line-height:1.55;
  word-break:break-word;
}

.agreement-text a{
  color:#8ea7ff;
  text-decoration:none;
}

.agreement-text a:hover{
  text-decoration:underline;
}

.auth-submit,
.auth-form button[type="submit"]{
  width:100%;
  min-height:56px;
  border:0;
  border-radius:16px;
  font-size:16px;
  font-weight:800;
  color:#fff;
  cursor:pointer;
  background:linear-gradient(90deg, #5578ff 0%, #7b3ff2 100%);
  box-shadow:0 18px 36px rgba(93,91,255,.28);
  transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.auth-submit:hover,
.auth-form button[type="submit"]:hover{
  transform:translateY(-1px);
  box-shadow:0 22px 42px rgba(93,91,255,.34);
}

.auth-links-bottom{
  margin-top:18px;
}

.auth-links-inline{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
}

.auth-links a{
  color:rgba(255,255,255,.78);
  text-decoration:none;
  font-size:14px;
}

.auth-links a:hover{
  color:#fff;
  text-decoration:underline;
}

.side-card{
  border:1px solid rgba(255,255,255,.08);
  border-radius:22px;
  background:rgba(255,255,255,.96);
  padding:22px;
  box-shadow:0 18px 40px rgba(0,0,0,.18);
}

.side-card-title{
  margin:0 0 14px;
  font-size:20px;
  line-height:1.2;
  font-weight:800;
  color:#101828;
}

.tariff-card{
  border:1px solid #e6eaf2;
  border-radius:18px;
  padding:16px;
  background:#f8fafc;
}

.tariff-card + .tariff-card{
  margin-top:14px;
}

.tariff-card-pro{
  background:linear-gradient(180deg, #f8faff 0%, #eef2ff 100%);
  border-color:#dbe3ff;
}

.tariff-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:12px;
}

.tariff-name{
  font-size:16px;
  font-weight:800;
  color:#111827;
}

.tariff-price{
  font-size:15px;
  font-weight:800;
  color:#4f46e5;
  white-space:nowrap;
}

.tariff-list{
  margin:0;
  padding-left:18px;
  color:#334155;
}

.tariff-list li{
  margin:0 0 8px;
  line-height:1.5;
}

.side-note{
  margin:14px 0 0;
  color:#475467;
  font-size:14px;
  line-height:1.55;
}

.doc-links{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.doc-links a{
  color:#334155;
  text-decoration:none;
  line-height:1.45;
}

.doc-links a:hover{
  color:#111827;
  text-decoration:underline;
}

.company-mini{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid #e5e7eb;
  color:#344054;
  font-size:14px;
  line-height:1.65;
}

.auth-error,
.auth-success{
  margin:0 0 18px;
  padding:14px 16px;
  border-radius:14px;
  font-size:14px;
  line-height:1.5;
}

.auth-error{
  background:rgba(255, 90, 90, .12);
  border:1px solid rgba(255, 90, 90, .22);
  color:#ffd4d4;
}

.auth-success{
  background:rgba(70, 200, 120, .12);
  border:1px solid rgba(70, 200, 120, .22);
  color:#d5ffe2;
}

@media (max-width: 1100px){
  .auth-shell{
    grid-template-columns:1fr;
  }

  .auth-panel-side{
    order:2;
  }
}

@media (max-width: 768px){
  .auth-page-enhanced{
    padding:20px 14px;
  }

  .auth-panel-form{
    padding:22px 18px;
    border-radius:20px;
  }

  .side-card{
    padding:18px;
    border-radius:18px;
  }

  .auth-title{
    font-size:32px;
  }

  .auth-subtitle{
    font-size:14px;
    margin-bottom:20px;
  }

  .agreement-item{
    grid-template-columns:18px 1fr;
    padding:12px 14px;
  }

  .auth-form-enhanced input[type="text"],
  .auth-form-enhanced input[type="email"],
  .auth-form-enhanced input[type="password"]{
    height:52px;
    font-size:15px;
  }

  .auth-submit,
  .auth-form button[type="submit"]{
    min-height:52px;
  }
}

@media (max-width: 480px){
  .auth-title{
    font-size:28px;
  }

  .tariff-top{
    flex-direction:column;
    gap:6px;
  }

  .auth-links-inline{
    flex-direction:column;
    gap:10px;
  }
}
