/* ====== Base ====== */
:root{
  --bg:#f6f7fb;
  --surface:#ffffff;
  --surface-2:#f3f5fa;
  --text:#0f1222;
  --muted:#6b7280;
  --line:#e7eaf3;
  --brand1:#246BFD;
  --brand2:#1FB8A6;
  --shadow: 0 8px 26px rgba(17,20,40,.08);
  --shadow-2: 0 14px 40px rgba(17,20,40,.12);
}

*{box-sizing:border-box}
html,body{height:100%}
body.ui{
  margin:0; background:var(--bg); color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}

.container{max-width:1240px; margin:0 auto; padding:0 20px}

/* ====== Topbar ====== */
.topbar{
  position:sticky; top:0; z-index:30;
  background:rgba(255,255,255,.85); backdrop-filter:saturate(140%) blur(6px);
  border-bottom:1px solid var(--line);
}
.topbar__inner{display:flex; align-items:center; justify-content:space-between; padding:14px 0}
.brand{display:flex; align-items:center; gap:12px}
.brand__mark{
  width:46px; height:46px; display:flex; align-items:center; justify-content:center;
  overflow:hidden;
  border-radius:0;
  background:transparent;
}
.brand__mark img{width:100%;height:100%;object-fit:contain}
.brand__title{font-weight:700; letter-spacing:0}
.brand__sub{font-size:12px; color:var(--muted)}
.actions{display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end}
.actions .btn--ghost{padding:10px 14px}
.topbar__user{font-size:13px; color:var(--muted)}
.topbar__logout{margin:0}
.account-icon{
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #d6d9e4;
  border-radius:50%;
  background:#fff;
  color:#1e2a37;
  text-decoration:none;
}
.account-icon:hover{background:#f9fbff; color:var(--brand1)}

/* ====== Main ====== */
.main{padding:28px 0 40px}
.main--with-history{
  display:grid;
  grid-template-columns:240px minmax(0,1fr);
  gap:20px;
  align-items:start;
}
.main--auth{max-width:540px}
.main--account{max-width:1100px}
.workspace{min-width:0}

/* ====== Panel/Card ====== */
.panel{
  background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow);
  overflow:hidden; margin-bottom:18px;
}
.panel--shadow:hover{box-shadow:var(--shadow-2)}
.panel__head{padding:18px 22px 8px}
.panel__head h2{margin:0 0 6px 0; font-size:20px; font-weight:700}
.panel__body{padding:18px 22px 22px}
.muted{color:var(--muted)}
.small{font-size:12px}
.tiny{font-size:11.5px}

/* ====== History ====== */
.history{
  position:sticky;
  top:86px;
  display:flex;
  flex-direction:column;
  max-height:calc(100vh - 104px);
  box-shadow:none;
}
.history .panel__head{padding:14px 16px 8px}
.history .panel__head h2{font-size:16px}
.history__list{
  display:flex;
  flex-direction:column;
  gap:6px;
  flex:1;
  min-height:0;
  padding:0 10px 10px;
  overflow:auto;
}
.history__item{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:10px;
  padding-right:34px;
  color:inherit;
  text-decoration:none;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
}
.history__item:hover{background:#f9fbff; border-color:#d4dcf0}
.history__link{
  display:flex;
  flex-direction:column;
  gap:4px;
  color:inherit;
  text-decoration:none;
}
.history__delete{
  position:absolute;
  top:8px;
  right:8px;
  width:22px;
  height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border:0;
  border-radius:50%;
  background:#eef1f7;
  color:#64748b;
  cursor:pointer;
  font-size:17px;
  line-height:1;
  opacity:0;
  pointer-events:none;
  transition:.15s opacity, .15s background, .15s color;
}
.history__item:hover .history__delete,
.history__delete:focus-visible{
  opacity:1;
  pointer-events:auto;
}
.history__delete:hover{
  background:#fee2e2;
  color:#b91c1c;
}
.history__delete:disabled{
  opacity:.45;
  cursor:wait;
}
.history__date{font-size:13px; font-weight:700}
.history__meta{
  display:block;
  gap:8px;
  color:var(--muted);
  font-size:12px;
}
.history__meta span{display:block; margin-top:2px}
.history__empty{padding:0 14px 16px}
.history__footer{
  padding:10px;
  border-top:1px solid var(--line);
  background:#fff;
}
.history__clear{
  width:100%;
  padding:10px 12px;
  font-size:12px;
  line-height:1.25;
  white-space:normal;
}

/* ====== Uploader ====== */
.uploader{
  position:relative; border:1.5px dashed #d6d9e4; border-radius:14px; background:var(--surface-2);
  padding:22px; display:flex; align-items:center; gap:14px; cursor:pointer;
  transition:.2s border-color, .2s background, .2s box-shadow;
}
.uploader:hover{border-color:#c9cfe3; background:#eef2fa}
.uploader:focus-visible{outline:3px solid rgba(36,107,253,.35)}
.uploader input[type=file]{position:absolute; inset:0; opacity:0; cursor:pointer}
.uploader__icon{width:44px; height:44px; display:flex; align-items:center; justify-content:center; color:var(--brand1)}
.uploader__text{flex:1}
.uploader__filename{margin-top:6px; font-size:13px; color:#333}
.link{color:var(--brand1); text-decoration:underline}

/* ====== Buttons ====== */
.btn{
  appearance:none; border:0; border-radius:12px; padding:12px 16px; cursor:pointer; font-weight:600;
}
.btn--primary{
  color:#fff; background:linear-gradient(90deg, var(--brand1), var(--brand2));
  box-shadow:0 10px 28px rgba(36,107,253,.25);
}
.btn--primary:disabled{opacity:.55; cursor:not-allowed}
.btn--ghost{
  background:#fff; color:#1e2a37; border:1px solid #d6d9e4;
}
.btn--ghost:hover{background:#f9fbff}
.btn--danger{
  color:#fff; background:#dc2626;
  box-shadow:0 10px 28px rgba(220,38,38,.18);
}
.btn--danger:hover{background:#b91c1c}

/* ====== Form actions ====== */
.form__actions{display:flex; gap:10px; align-items:center; justify-content:flex-end; margin-top:16px; flex-wrap:wrap}

/* ====== Account ====== */
.settings-page{
  display:grid;
  gap:14px;
}
.settings-page .account-content{
  min-width:0;
}
.settings-top-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.auth-panel{margin-top:28px}
.auth-form,
.settings-form{
  display:grid;
  gap:14px;
}
.field{
  display:grid;
  gap:6px;
}
.field span{
  font-size:13px;
  font-weight:700;
}
.field input{
  width:100%;
  border:1px solid #d6d9e4;
  border-radius:10px;
  padding:12px;
  font:inherit;
  color:var(--text);
  background:#fff;
}
.password-field{
  position:relative;
  display:block;
}
.password-field input{padding-right:94px}
.password-toggle{
  position:absolute;
  top:50%;
  right:8px;
  transform:translateY(-50%);
  border:1px solid #d6d9e4;
  border-radius:8px;
  padding:7px 9px;
  background:#fff;
  color:#1e2a37;
  font-weight:800;
  cursor:pointer;
}
.captcha-box{
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fbfcff;
}
.field input:focus{
  outline:3px solid rgba(36,107,253,.18);
  border-color:#8fb2ff;
}
.settings-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 220px;
  gap:12px;
}
.settings-options{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px 14px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fbfcff;
}
.check-row{
  display:flex;
  align-items:center;
  gap:9px;
  font-size:13px;
  color:#1e293b;
}
.check-row span{
  min-width:0;
  flex:1;
}
.check-row input{
  width:17px;
  height:17px;
  accent-color:var(--brand1);
}
.help-dot{
  width:24px;
  height:24px;
  flex:0 0 24px;
  display:grid;
  place-items:center;
  border:1px solid #bdd0ff;
  border-radius:50%;
  color:#1d4ed8;
  background:#eef5ff;
  font-size:13px;
  font-weight:900;
  cursor:pointer;
}
.help-dot:hover{background:#dbeafe}
.help-dialog{
  width:min(560px, calc(100vw - 32px));
  border:1px solid var(--line);
  border-radius:14px;
  padding:0;
  color:var(--text);
  background:#fff;
  box-shadow:0 26px 70px rgba(15,23,42,.22);
}
.help-dialog::backdrop{background:rgba(15,23,42,.32)}
.help-dialog__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
}
.help-dialog__head h3{
  margin:0;
  font-size:18px;
}
.help-dialog__close{
  width:34px;
  height:34px;
  border:1px solid var(--line);
  border-radius:50%;
  background:#fff;
  color:#334155;
  cursor:pointer;
  font-size:22px;
  line-height:1;
}
.help-dialog__body{padding:18px}
.guide-layout{
  display:grid;
  grid-template-columns:260px minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.account-layout--guide{
  grid-template-columns:260px minmax(0,1fr);
}
.account-side{
  display:grid;
  gap:18px;
}
.account-side .account-menu{
  margin-bottom:0;
}
.guide-menu__nav{
  display:grid;
  gap:8px;
  padding:0 12px 14px;
}
.guide-menu__link{
  display:block;
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  color:#1e293b;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  background:#fff;
}
.guide-menu__link:hover,
.guide-menu__link.is-active{
  border-color:#bdd0ff;
  background:#f4f7ff;
  color:#1d4ed8;
}
.guide-article{min-width:0}
.rich-content{
  color:#1e293b;
  line-height:1.65;
  overflow-wrap:anywhere;
}
.rich-content > :first-child{margin-top:0}
.rich-content > :last-child{margin-bottom:0}
.rich-content h2,
.rich-content h3,
.rich-content h4{
  margin:22px 0 10px;
  color:#0f172a;
  line-height:1.2;
}
.rich-content a{color:#1d4ed8}
.rich-content img,
.rich-content video,
.rich-content iframe{
  max-width:100%;
  border:0;
  border-radius:10px;
}
.rich-content iframe{
  width:100%;
  min-height:320px;
}
.rich-content table{
  width:100%;
  border-collapse:collapse;
}
.rich-content th,
.rich-content td{
  border:1px solid var(--line);
  padding:9px 10px;
  text-align:left;
}
.settings-builder{
  display:grid;
  gap:10px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fbfcff;
}
.settings-builder h3{
  margin:0 0 4px;
  font-size:15px;
}
.settings-builder p{margin:0}
.settings-warning{
  margin-top:8px !important;
  color:#92400e;
  background:#fffbeb;
  border:1px solid #fde68a;
  border-radius:8px;
  padding:9px 10px;
  font-weight:700;
}
.order-builder{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.order-chip{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 11px;
  border:1px solid #bdd0ff;
  border-radius:999px;
  color:#1e3a8a;
  background:#eef5ff;
  font:inherit;
  font-size:13px;
  font-weight:800;
  cursor:grab;
}
.order-chip:active{cursor:grabbing}
.order-chip.is-dragging{opacity:.45}
.order-chip__handle{
  width:20px;
  height:20px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#fff;
  color:#2563eb;
}
.font-scale{
  display:grid;
  grid-template-columns:auto minmax(180px,1fr) 44px auto;
  align-items:center;
  gap:10px;
}
.font-scale input{width:100%; accent-color:var(--brand1)}
.font-scale output{
  min-width:44px;
  padding:6px 8px;
  border:1px solid #bdd0ff;
  border-radius:8px;
  color:#1d4ed8;
  background:#eef5ff;
  text-align:center;
  font-weight:900;
}
.form-alert{
  border-radius:9px;
  padding:10px 12px;
  font-size:13px;
  line-height:1.35;
}
.form-alert--error{
  border:1px solid #fecaca;
  background:#fff7f7;
  color:#991b1b;
}
.form-alert--success{
  border:1px solid #bbf7d0;
  background:#f0fdf4;
  color:#166534;
}
.api-reminder .panel__body{
  display:grid;
  gap:10px;
  align-items:start;
}
.api-reminder h2{
  margin:0;
  font-size:30px;
  line-height:1.1;
}
.api-reminder p{margin:0 0 4px}
.api-reminder .btn{justify-self:start}
.account-layout{
  display:grid;
  grid-template-columns:240px minmax(0,1fr);
  gap:20px;
  align-items:start;
}
.account-menu{box-shadow:none}
.account-menu__home{
  display:block;
  margin:12px 12px 4px;
  padding:12px 14px;
  border-radius:10px;
  color:#fff;
  background:linear-gradient(90deg, var(--brand1), var(--brand2));
  box-shadow:0 10px 28px rgba(36,107,253,.22);
  text-align:center;
  text-decoration:none;
  font-weight:800;
}
.account-menu__home:hover{filter:brightness(.98)}
.account-menu__nav{
  display:grid;
  gap:8px;
  padding:0 12px 14px;
}
.account-menu__link{
  display:block;
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  color:#1e293b;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  background:#fff;
}
.account-menu__link:hover,
.account-menu__link.is-active{
  border-color:#bdd0ff;
  background:#f4f7ff;
  color:#1d4ed8;
}
.account-content{min-width:0}
.stats-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
}
.stat-card{
  border:1px solid var(--line);
  border-radius:10px;
  padding:18px;
  background:#fbfcff;
}
.stat-card span{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-bottom:8px;
}
.stat-card strong{
  display:block;
  font-size:34px;
  line-height:1;
}
.license-note{
  padding:12px 14px;
  border:1px solid #bdd0ff;
  border-radius:10px;
  background:#f4f7ff;
  color:#1e3a8a;
  font-size:13px;
  line-height:1.4;
  font-weight:700;
}
.license-note--warning{
  border-color:#fde68a;
  background:#fffbeb;
  color:#92400e;
}
.license-note--danger{
  border-color:#fecaca;
  background:#fff1f2;
  color:#991b1b;
}
.license-support-note{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top:-6px;
  padding:12px 14px;
  border:1px solid #bfdbfe;
  border-radius:8px;
  background:#eff6ff;
  color:#1e3a8a;
  line-height:1.45;
}
.license-support-note a{
  overflow-wrap:anywhere;
}
.license-support-note__button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:10px 14px;
  border-radius:8px;
  background:#1d4ed8;
  color:#fff;
  text-decoration:none;
  box-shadow:0 8px 22px rgba(29,78,216,.2);
}
.license-support-note__button:hover{
  background:#1e40af;
}
.license-support-note a:not(.license-support-note__button){
  color:#1d4ed8;
  font-weight:800;
}
input[readonly]{
  color:#64748b;
  background:#f8fafc;
  cursor:not-allowed;
}

/* ====== Progress ====== */
.progress-summary{
  display:flex;
  align-items:center;
  gap:18px;
  margin:16px 0 12px;
}
.progress-donut{
  --done-deg:0deg;
  --recent-deg:0deg;
  --express-deg:0deg;
  --done:#16a34a;
  --recent:#d1d5db;
  --express:#4b5563;
  width:142px;
  height:142px;
  flex:0 0 142px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:conic-gradient(
    var(--done) 0deg var(--done-deg),
    var(--recent) var(--done-deg) calc(var(--done-deg) + var(--recent-deg)),
    var(--express) calc(var(--done-deg) + var(--recent-deg)) calc(var(--done-deg) + var(--recent-deg) + var(--express-deg)),
    #eef1f7 calc(var(--done-deg) + var(--recent-deg) + var(--express-deg)) 360deg
  );
}
.progress-donut__center{
  width:92px;
  height:92px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#fff;
  box-shadow:inset 0 0 0 1px var(--line);
}
.progress-donut__check{
  width:24px;
  height:24px;
  margin-bottom:2px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  color:#fff;
  background:#16a34a;
  font-size:15px;
  font-weight:800;
}
.progress-donut__count{
  color:#101827;
  font-size:24px;
  line-height:1;
  font-weight:800;
}
.progress-donut__percent{
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}
.progress-legend{
  min-width:0;
  flex:1;
  display:grid;
  gap:8px;
}
.progress-legend__item{
  display:grid;
  grid-template-columns:12px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  color:#334155;
  font-size:13px;
}
.progress-legend__item strong{
  color:#0f172a;
  font-size:14px;
}
.progress-legend__swatch{
  width:10px;
  height:10px;
  border-radius:50%;
}
.progress-legend__swatch--done{background:#16a34a}
.progress-legend__swatch--recent{background:#d1d5db}
.progress-legend__swatch--express{background:#4b5563}
.progress-result{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-top:12px;
  border-top:1px solid var(--line);
}
.progress-result__button{
  flex:0 0 auto;
  text-decoration:none;
  text-align:center;
}
.error-report{
  margin-top:14px;
  border:1px solid #fecaca;
  background:#fff7f7;
  border-radius:8px;
  padding:12px 14px;
  color:#7f1d1d;
}
.error-report__title{
  font-weight:800;
  font-size:14px;
  margin-bottom:3px;
}
.error-report__note{
  color:#991b1b;
  font-size:12px;
  margin-bottom:10px;
}
.error-report__list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:8px;
  max-height:220px;
  overflow:auto;
}
.error-report__list li{
  border:1px solid #fee2e2;
  background:#fff;
  border-radius:7px;
  padding:9px 10px;
  display:grid;
  gap:3px;
}
.error-report__list strong{
  color:#7f1d1d;
  font-size:13px;
}
.error-report__list span{
  color:#475569;
  font-size:12px;
  line-height:1.35;
  overflow-wrap:anywhere;
}

/* ====== Footer ====== */
.footer{margin-top:42px; border-top:1px solid var(--line); background:#fffcc0000}
.footer__inner{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 0; flex-wrap:wrap}
.footer__inner{justify-content:center}
.footer__logo{width:440px;height:164px;max-width:100%;object-fit:contain;object-position:center;border-radius:0}
.welcome-modal,
.deactivation-lock{
  position:fixed;
  inset:0;
  z-index:70;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(15,23,42,.28);
}
.welcome-modal__box,
.deactivation-lock__box{
  width:min(560px, calc(100vw - 32px));
  padding:28px;
  border:1px solid rgba(255,255,255,.55);
  border-radius:18px;
  background:rgba(255,255,255,.96);
  box-shadow:0 28px 90px rgba(15,23,42,.28);
  text-align:center;
}
.welcome-modal__mark{
  width:72px;
  height:72px;
  display:grid;
  place-items:center;
  margin:0 auto 14px;
  border-radius:20px;
  color:#fff;
  background:linear-gradient(135deg, var(--brand1), var(--brand2));
  font-weight:900;
  letter-spacing:0;
}
.welcome-modal h2,
.deactivation-lock h2{
  margin:0 0 10px;
  font-size:28px;
  line-height:1.15;
}
.welcome-modal p,
.deactivation-lock p{
  margin:0 0 18px;
  color:#475569;
  line-height:1.55;
}
.main--blocked .history,
.main--blocked .workspace{
  filter:blur(4px);
  opacity:.5;
  pointer-events:none;
  user-select:none;
}
.main--blocked .deactivation-lock{
  position:absolute;
  inset:0;
  z-index:10;
  background:transparent;
}
.main--blocked{
  position:relative;
}

/* ====== Misc ====== */
code{background:#f1f3f8; padding:2px 6px; border-radius:6px; border:1px solid #e8ebf3}
.iframe{display:none;width:0;height:0;border:0}

.delete-dialog{
  position:fixed;
  inset:0;
  z-index:80;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(15,18,34,.38);
}
.delete-dialog__box{
  width:min(460px, 100%);
  padding:18px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  box-shadow:var(--shadow-2);
}
.delete-dialog__title{
  margin-bottom:14px;
  font-size:17px;
  font-weight:700;
}
.delete-dialog__actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

/* ====== Admin ====== */
.admin-login{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
}
.admin-login__box{
  width:min(420px, 100%);
  display:grid;
  gap:14px;
}
.admin-login__box h1{font-size:28px}
.admin-login__box label{
  display:grid;
  gap:7px;
  color:#334155;
  font-size:13px;
  font-weight:700;
}
.admin-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:260px minmax(0,1fr);
  background:#f4f6fb;
}
.admin-sidebar{
  position:sticky;
  top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:22px 16px;
  border-right:1px solid var(--line);
  background:#fff;
}
.admin-brand{
  padding:0 4px 12px;
  color:#0f172a;
  font-size:18px;
  font-weight:900;
}
.admin-nav{
  display:grid;
  gap:8px;
}
.admin-nav a{
  padding:12px 13px;
  border:1px solid var(--line);
  border-radius:8px;
  color:#1e293b;
  background:#fff;
  font-size:14px;
  font-weight:800;
  text-decoration:none;
}
.admin-nav a:hover,
.admin-nav a.is-active{
  border-color:#bdd0ff;
  color:#1d4ed8;
  background:#f4f7ff;
}
.admin-logout{
  margin-top:auto;
}
.admin-main{
  width:min(1160px, 100%);
  padding:34px;
}
.admin-main h1{
  margin-bottom:20px;
  color:#0f172a;
  font-size:30px;
  line-height:1.15;
}
.admin-dashboard{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:14px;
}
.admin-card{
  min-height:132px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:12px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  box-shadow:0 14px 34px rgba(15,23,42,.06);
  text-decoration:none;
}
.admin-card span{
  color:#64748b;
  font-size:13px;
  font-weight:800;
}
.admin-card strong{
  color:#0f172a;
  font-size:36px;
  line-height:1;
}
.admin-card em{
  color:#64748b;
  font-style:normal;
  font-size:13px;
}
.admin-card--link:hover{
  border-color:#94b5ff;
}
.admin-panel{
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  box-shadow:0 14px 34px rgba(15,23,42,.06);
  overflow:hidden;
}
.table-wrap{
  width:100%;
  overflow:auto;
}
.admin-table{
  width:100%;
  border-collapse:collapse;
  min-width:760px;
}
.admin-table th,
.admin-table td{
  padding:13px 14px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
  font-size:13px;
}
.admin-table th{
  color:#475569;
  background:#f8fafc;
  font-weight:900;
}
.admin-table td{
  color:#0f172a;
}
.admin-table tr:last-child td{border-bottom:0}

.ideas-panel{
  overflow:visible;
}
.ideas-body{
  display:grid;
  gap:16px;
}
.idea-form{
  display:grid;
  gap:14px;
}
.field select,
.field textarea{
  width:100%;
  padding:13px 14px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  color:#0f172a;
  font:inherit;
  outline:none;
}
.field textarea{
  min-height:120px;
  resize:vertical;
}
.field select:focus,
.field textarea:focus{
  border-color:#74a7ff;
  box-shadow:0 0 0 3px rgba(37,99,235,.10);
}
.ideas-list{
  display:grid;
  gap:14px;
  margin-top:16px;
}
.idea-card{
  padding:18px;
}
.idea-card.is-pinned{
  border-color:#8bc4ff;
  box-shadow:0 18px 46px rgba(37,99,235,.10);
}
.idea-card__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.idea-card__marks{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  min-height:26px;
}
.idea-category,
.idea-pin,
.idea-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:26px;
  padding:5px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
}
.idea-category--proposal{
  color:#047857;
  background:#dcfce7;
}
.idea-category--error{
  color:#b91c1c;
  background:#fee2e2;
}
.idea-pin{
  width:28px;
  padding:0;
  color:#1d4ed8;
  background:#dbeafe;
}
.idea-status--working{
  color:#92400e;
  background:#fef3c7;
}
.idea-status--done{
  color:#047857;
  background:#dcfce7;
}
.idea-card__text{
  color:#0f172a;
  font-size:15px;
  line-height:1.55;
}
.idea-answer{
  margin-top:14px;
  padding:14px;
  border:1px solid #dbeafe;
  border-radius:8px;
  background:#f8fbff;
}
.idea-answer strong{
  display:block;
  margin-bottom:6px;
  color:#1d4ed8;
  font-size:13px;
}
.idea-answer p{
  margin:0;
  color:#334155;
  line-height:1.55;
}
.idea-vote{
  display:grid;
  gap:9px;
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid var(--line);
}
.idea-vote__question{
  color:#0f172a;
  font-weight:900;
}
.idea-vote__actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.idea-vote__bar{
  height:9px;
  overflow:hidden;
  border-radius:999px;
  background:#e2e8f0;
}
.idea-vote__bar span{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg, #22c55e, #14b8a6);
}
.idea-vote__numbers{
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:#64748b;
  font-size:12px;
  font-weight:800;
}
.extra-api-request{
  display:grid;
  gap:8px;
  justify-items:start;
  padding:12px;
  border:1px dashed var(--line);
  border-radius:8px;
  background:#f8fafc;
}
.extra-api-request p{
  margin:0;
}
.extra-api-request__row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
.extra-api-status{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:6px 10px;
  border-radius:999px;
  color:#075985;
  background:#e0f2fe;
  font-size:12px;
  font-weight:900;
}
.extra-api-status--muted{
  color:#475569;
  background:#e2e8f0;
}
.tariff-promo{
  display:grid;
  gap:10px;
  padding:14px;
  border:1px solid #bbf7d0;
  border-radius:8px;
  background:#f0fdf4;
}
.tariff-promo strong{
  color:#047857;
}
.tariff-promo__grid{
  display:grid;
  gap:8px;
  color:#334155;
  font-size:13px;
}
.tariff-promo__grid b{
  color:#0f172a;
}
.tariff-promo s,
.price-card s{
  color:#94a3b8;
  text-decoration-thickness:1px;
}
.onboarding-panel .panel__body{
  display:grid;
  gap:14px;
}
.onboarding-steps{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:10px;
}
.onboarding-step{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:58px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:8px;
  color:inherit;
  background:#fff;
  text-decoration:none;
}
.onboarding-step span{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#1d4ed8;
  background:#dbeafe;
  font-weight:900;
}
.onboarding-step.is-done span{
  color:#047857;
  background:#dcfce7;
}
.onboarding-step strong{
  font-size:14px;
}
.onboarding-dismiss{
  display:flex;
  justify-content:flex-end;
}

/* ====== Public landing ====== */
.main--public{
  max-width:1180px;
}
.public-hero{
  display:grid;
  grid-template-columns:minmax(0, 1.1fr) minmax(340px, .9fr);
  gap:28px;
  align-items:center;
  padding:30px 0 20px;
}
.public-hero__copy h1{
  max-width:720px;
  margin:0 0 16px;
  font-size:clamp(36px, 6vw, 68px);
  line-height:1.02;
  letter-spacing:0;
}
.eyebrow{
  margin:0 0 12px;
  color:#0f766e;
  font-weight:900;
  text-transform:uppercase;
  font-size:12px;
  letter-spacing:.08em;
}
.public-lead{
  max-width:680px;
  margin:0;
  color:#475569;
  font-size:18px;
  line-height:1.6;
}
.public-hero__actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:24px;
}
.demo-panel{
  display:grid;
  gap:14px;
  padding:22px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow);
}
.demo-panel__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.demo-panel__head span{
  color:#0f766e;
  font-weight:900;
}
.demo-panel__head strong{
  color:#334155;
  font-size:13px;
}
.demo-upload{
  display:grid;
  gap:12px;
}
.demo-upload__drop{
  min-height:126px;
}
.demo-download{
  justify-self:start;
}
.trial-banner{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 260px;
  align-items:center;
  gap:24px;
  margin:10px 0 28px;
  padding:24px;
  border:1px solid #bfdbfe;
  border-radius:8px;
  background:linear-gradient(135deg, #eef6ff 0%, #f2fbf8 100%);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.trial-banner__copy{
  display:grid;
  gap:10px;
  align-items:start;
}
.trial-banner h2{
  margin:0;
  font-size:30px;
  line-height:1.16;
}
.trial-banner p{
  margin:0;
  max-width:680px;
  color:#475569;
  line-height:1.55;
}
.trial-banner .btn{
  justify-self:start;
  margin-top:4px;
}
.trial-banner img{
  width:100%;
  max-height:180px;
  object-fit:contain;
}
.public-section{
  display:grid;
  gap:18px;
  padding:34px 0;
  border-top:1px solid var(--line);
}
.public-section h2{
  margin:0 0 10px;
  font-size:28px;
  line-height:1.18;
}
.public-section p{
  margin:0;
  max-width:760px;
  color:#475569;
  line-height:1.65;
}
.public-section--grid{
  grid-template-columns:minmax(0, .8fr) minmax(0, 1.2fr);
  align-items:start;
}
.feature-grid,
.pricing-grid,
.advantages-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}
.feature-card,
.price-card,
.advantage-card{
  display:grid;
  gap:6px;
  min-height:118px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
}
.feature-card strong,
.price-card span,
.advantage-card strong{
  font-weight:900;
}
.feature-card span,
.price-card em,
.advantage-card span{
  color:#64748b;
  font-style:normal;
  line-height:1.45;
}
.advantages-section{
  grid-template-columns:minmax(0, .72fr) minmax(0, 1.28fr);
  align-items:start;
}
.advantage-card{
  min-height:160px;
  border-color:#dbeafe;
  background:#f8fbff;
}
.price-card strong{
  font-size:28px;
}
.pricing-section,
.partner-section{
  grid-template-columns:minmax(0, .72fr) minmax(0, 1fr);
  align-items:center;
}
.partner-section{
  margin-bottom:20px;
}
.public-modal{
  position:fixed;
  inset:0;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(15,23,42,.52);
}
.public-modal__box{
  position:relative;
  width:min(520px, 100%);
  padding:26px;
  border-radius:8px;
  background:#fff;
  box-shadow:0 24px 70px rgba(15,23,42,.25);
}
.public-modal__box h2{
  margin:0 0 10px;
}
.public-modal__box p{
  margin:0 0 18px;
  color:#475569;
  line-height:1.6;
}
.public-modal__close{
  position:absolute;
  top:10px;
  right:10px;
  width:34px;
  height:34px;
  border:1px solid var(--line);
  border-radius:50%;
  background:#fff;
  cursor:pointer;
  font-size:22px;
  line-height:1;
}
.faq-hero{
  padding-top:26px;
}
.faq-hero h1{
  margin:0 0 12px;
  font-size:42px;
  line-height:1.08;
}
.faq-search{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:end;
  gap:14px;
  margin:0 0 18px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow);
}
.faq-search .field{
  margin:0;
}
.faq-search [data-faq-count]{
  padding:12px 0;
  font-weight:800;
  color:#334155;
  white-space:nowrap;
}
.faq-list{
  display:grid;
  gap:12px;
  margin-bottom:28px;
}
.faq-item{
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.faq-item summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  cursor:pointer;
  font-size:19px;
  font-weight:900;
  list-style:none;
}
.faq-item summary::-webkit-details-marker{
  display:none;
}
.faq-item summary::after{
  content:"+";
  width:30px;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  border:1px solid #dbeafe;
  border-radius:50%;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:22px;
  line-height:1;
}
.faq-item[open] summary::after{
  content:"-";
}
.faq-item summary:hover{
  background:#f8fbff;
}
.faq-item__answer{
  padding:0 20px 20px;
  margin:0;
  color:#475569;
  line-height:1.65;
}
.faq-empty h2{
  margin:0 0 8px;
}

/* ====== Partner cabinet ====== */
.account-layout--partner{
  grid-template-columns:190px minmax(0,1fr);
}
.partner-panel .panel__body{
  display:grid;
  gap:18px;
}
.partner-link-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#f8fafc;
}
.partner-link-box div{
  display:grid;
  gap:4px;
  min-width:0;
}
.partner-link-box strong{
  overflow-wrap:anywhere;
}
.partner-stats{
  margin-top:0;
}
.partner-actions-grid{
  display:grid;
  grid-template-columns:minmax(240px, .82fr) minmax(320px, 1.18fr);
  gap:14px;
  align-items:start;
}
.partner-payout-form,
.partner-balance-pay{
  display:grid;
  gap:9px;
  margin-top:16px;
  padding:14px;
  border:1px dashed var(--line);
  border-radius:8px;
  background:#fff;
}
.partner-payout-form h3,
.partner-balance-pay h3{
  margin:0 0 4px;
  font-size:16px;
}
.partner-payout-form p,
.partner-balance-pay p{
  margin:0;
}
.partner-balance-pay__controls{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}
.partner-balance-pay__total{
  padding:11px 12px;
  border-radius:8px;
  background:#f8fafc;
  color:#475569;
  font-size:14px;
}
.partner-balance-pay__total strong{
  color:#0f172a;
}
.table-scroll{
  overflow:auto;
}
.simple-table{
  width:100%;
  min-width:680px;
  border-collapse:collapse;
}
.simple-table th,
.simple-table td{
  padding:12px;
  border-bottom:1px solid var(--line);
  text-align:left;
  font-size:13px;
}
.simple-table th{
  color:#475569;
  background:#f8fafc;
}

@media (max-width: 720px){
  .public-hero,
  .trial-banner,
  .public-section--grid,
  .pricing-section,
  .partner-section{grid-template-columns:1fr}
  .public-hero__copy h1{font-size:38px}
  .trial-banner h2{font-size:26px}
  .trial-banner img{
    max-height:120px;
    justify-self:start;
  }
  .faq-search{grid-template-columns:1fr}
  .faq-search [data-faq-count]{padding:0}
  .feature-grid,
  .advantages-grid,
  .pricing-grid,
  .onboarding-steps,
  .partner-balance-pay__controls{grid-template-columns:1fr}
  .advantages-section,
  .partner-actions-grid{grid-template-columns:1fr}
  .main--with-history{grid-template-columns:1fr}
  .account-layout{grid-template-columns:1fr}
  .guide-layout{grid-template-columns:1fr}
  .account-layout--guide{grid-template-columns:1fr}
  .history{position:static; max-height:none}
  .history__list{max-height:none}
  .progress-summary{align-items:flex-start}
  .settings-grid,
  .settings-options,
  .stats-grid{grid-template-columns:1fr}
  .admin-shell{grid-template-columns:1fr}
  .admin-sidebar{position:static; height:auto}
  .admin-main{padding:22px 16px}
  .admin-dashboard{grid-template-columns:1fr}
}

@media (max-width: 520px){
  .progress-summary{flex-direction:column}
  .progress-result{align-items:stretch; flex-direction:column}
  .progress-result__button{width:100%}
}
