/* Customer dashboard (v3). Uses the same background as the home page. */
body.app { min-height: 100vh; font-size: 16px; }
.app-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(16px, 5vw, 56px); }
.app-user { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-danger { background: rgba(255, 90, 90, .12); border: 1px solid rgba(255, 90, 90, .4); color: #ffb0b0; }
.app-main { position: relative; z-index: 1; width: min(100% - 32px, 1060px); margin: 0 auto; padding: 10px 0 80px; }
.kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); font-weight: 700; margin-bottom: 6px; }

.auth-card { max-width: 460px; margin: 6vh auto 0; padding: 26px; border-radius: 26px; background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(18px); box-shadow: 0 40px 90px -50px rgba(123, 97, 255, .8); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 14px; background: rgba(255,255,255,.05); margin-bottom: 22px; }
.auth-tabs button { border: 0; background: transparent; padding: 10px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.auth-tabs button.on { background: rgba(255,255,255,.12); color: var(--text); }
.auth-form { display: grid; gap: 14px; }
.auth-form h1 { font-size: 1.7rem; }
.sub { color: var(--muted); margin-top: -6px; }
.auth-back { display: block; text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.msg { min-height: 20px; font-size: 14px; color: var(--muted); }
.msg.err { color: #ff9b9b; } .msg.ok { color: var(--teal); }

.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(5,8,18,.6); color: var(--text); font: inherit; font-size: 15px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid rgba(123,97,255,.7); outline-offset: 1px; }
.field input[type="color"] { padding: 4px; height: 46px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.honeypot { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; clip-path: inset(50%); pointer-events: none; }

.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 10px 0 24px; }
.dash-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.dash-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(10px); flex-wrap: wrap; }
.dash-tabs button { border: 0; background: transparent; padding: 10px 16px; border-radius: 11px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.dash-tabs button.on { background: var(--grad); color: #06101a; }

.card { padding: 22px; border-radius: 22px; background: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.11); backdrop-filter: blur(14px); margin-bottom: 18px; }
.card h2 { font-size: 1.25rem; margin-bottom: 4px; }
.card .hint { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.site-item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.site-item .url { color: var(--cyan); font-size: 14px; word-break: break-all; }
.badge { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 99px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: rgba(94,234,212,.14); color: var(--teal); margin-left: 8px; vertical-align: middle; }
.badge.warn { background: rgba(255,200,90,.14); color: #ffd36a; }
.badge.bad { background: rgba(255,90,90,.14); color: #ff9b9b; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form-stack { display: grid; gap: 14px; }
.theme-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-pick button { padding: 8px 14px; border-radius: 99px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05); cursor: pointer; font-size: 13px; text-transform: capitalize; }
.theme-pick button.on { border-color: var(--teal); background: rgba(94,234,212,.15); }
.svc-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; margin-bottom: 8px; }
.svc-row input { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(5,8,18,.6); color: var(--text); font: inherit; font-size: 14px; }

.chat { display: grid; gap: 10px; max-height: 420px; overflow: auto; padding: 4px 2px 12px; }
.chat .bubble { max-width: 86%; padding: 11px 15px; border-radius: 16px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; }
.chat .bubble.me { justify-self: end; background: linear-gradient(120deg, #4cc9f0, #7b61ff); color: #05101a; font-weight: 600; }
.chat .bubble.ai { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.chat .applied { font-size: 12px; color: var(--teal); margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chips button { padding: 7px 12px; border-radius: 99px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); cursor: pointer; font-size: 13px; color: var(--muted); }
.chips button:hover { color: var(--text); border-color: var(--cyan); }
.chat-input { display: flex; gap: 10px; }
.chat-input textarea { flex: 1; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.14); background: rgba(5,8,18,.6); color: var(--text); font: inherit; resize: none; }
.meter { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin: 8px 0 4px; }
.meter i { display: block; height: 100%; background: var(--grad); }
.locked { text-align: center; padding: 38px 20px; }
.locked h2 { font-size: 1.6rem; margin-bottom: 8px; }
.pay-box { white-space: pre-wrap; padding: 16px; border-radius: 14px; background: rgba(5,8,18,.6); border: 1px dashed rgba(255,255,255,.25); font-size: 15px; margin: 12px 0; }
.code { display: inline-block; font-family: ui-monospace, monospace; font-size: 1.3rem; padding: 6px 14px; border-radius: 10px; background: rgba(94,234,212,.12); color: var(--teal); letter-spacing: .08em; }
.perk-list { display: grid; gap: 8px; margin: 12px 0; color: var(--muted); font-size: 15px; }
.perk-list b { color: var(--text); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table td, .table th { text-align: left; padding: 9px 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 50; padding: 12px 20px; border-radius: 14px; background: #0e1730; border: 1px solid rgba(94,234,212,.5); font-size: 14px; max-width: 90vw; }
.toast.err { border-color: rgba(255,120,120,.6); }
@media (max-width: 760px) { .grid2, .field-row, .svc-row { grid-template-columns: 1fr; } .app-user span { display: none; } }

/* ---- v4: payment flow, rulebook, screenshots ---- */
.method-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.method-pick button { padding: 10px 18px; border-radius: 99px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05); cursor: pointer; font: inherit; font-size: 14px; color: var(--text); }
.method-pick button.on { border-color: var(--teal); background: rgba(94,234,212,.15); }
.pay-amount { display: grid; gap: 4px; padding: 16px 18px; border-radius: 16px; background: linear-gradient(120deg, rgba(94,234,212,.14), rgba(123,97,255,.16)); border: 1px solid rgba(94,234,212,.35); margin: 14px 0; }
.pay-amount span { color: var(--muted); font-size: 13px; }
.pay-amount strong { font-size: 2rem; }
.pay-amount small { color: #ffd37a; font-size: 13px; }
.rules-box { max-height: 340px; overflow: auto; padding: 16px 18px; border-radius: 14px; background: rgba(5,8,18,.6); border: 1px solid rgba(255,255,255,.14); font-size: 14.5px; line-height: 1.65; }
.rules-box.rules-full { max-height: none; }
.rules-box h4 { margin: 14px 0 6px; font-size: 1.02rem; color: var(--teal); }
.rules-box h4:first-child { margin-top: 0; }
.rules-box ol { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; margin: 12px 0; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.proof-thumb { max-width: 100%; max-height: 300px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); display: block; margin: 8px 0; }
.price-line b { color: var(--teal); }
.msg.warn { color: #ffd37a; }
.terms-page { max-width: 820px; margin: 0 auto; }
.app-top .lang-select { margin-inline-start: auto; margin-inline-end: 10px; }
[dir="rtl"] .actions, [dir="rtl"] .field-row { direction: rtl; }
[dir="rtl"] .chat .bubble.me { justify-self: start; }
[dir="rtl"] .toast { left: 50%; }
.rules-box { margin-bottom: 12px; }
.rules-box ol { list-style: decimal; }
.rules-box li { padding-inline-start: 4px; }
.pay-flow a { color: var(--teal); text-decoration: underline; }
.pay-amount strong, .price-line b { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.pay-amount strong { justify-self: start; }
@media (max-width: 480px) { .app-top { gap: 8px; padding-inline: 12px; } .app-top .brand-text strong { font-size: 13px; } .app-top .brand-text em { display: none; } }

/* ---- v5: uploaded files ---- */
.note-warn { padding: 11px 14px; border-radius: 12px; background: rgba(255,200,90,.1); border: 1px solid rgba(255,200,90,.28); color: #ffe2a0; font-size: 14px; line-height: 1.55; margin: 0 0 14px; }
.filebtn { cursor: pointer; }
.tbl-wrap { overflow-x: auto; margin-top: 8px; }
.table td.fname { word-break: break-all; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
[dir="rtl"] .table td, [dir="rtl"] .table th { text-align: right; }

/* ---- v5: hosting-panel dashboard (sidebar, stat cards, site cards, drop zone) ---- */
.app-main { width: min(100% - 32px, 1220px); }
.dash-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 26px; align-items: start; margin-top: 10px; }
.dash-side { position: sticky; top: 14px; padding: 18px 14px; border-radius: 22px; background: linear-gradient(170deg, rgba(255,255,255,.08), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.11); backdrop-filter: blur(16px); }
.side-head { padding: 4px 8px 16px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 12px; }
.side-head h1 { font-size: 1.3rem; word-break: break-word; }
.dash-side .dash-tabs { display: grid; gap: 4px; padding: 0; background: transparent; border: 0; backdrop-filter: none; border-radius: 0; }
.dash-side .dash-tabs button { display: flex; align-items: center; gap: 12px; text-align: start; padding: 11px 12px; border-radius: 12px; font-size: 15px; }
.dash-side .dash-tabs button svg { flex: none; opacity: .85; }
.dash-side .dash-tabs button:hover { background: rgba(255,255,255,.06); color: var(--text); }
.dash-side .dash-tabs button.on { background: var(--grad); color: #06101a; box-shadow: 0 10px 26px -14px rgba(76,201,240,.9); }
.dash-content { min-width: 0; }
.dash-content h2 { font-size: 1.3rem; }

.ov-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; padding: 22px; border-radius: 22px; margin-bottom: 18px; background: radial-gradient(120% 140% at 0% 0%, rgba(76,201,240,.2), transparent 60%), linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.12); }
.ov-hero .hint { color: var(--muted); font-size: 14px; margin: 4px 0 0; max-width: 520px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { display: grid; gap: 4px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.11); }
.stat.on { border-color: rgba(94,234,212,.5); }
.stat-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat-val { font-size: 1.7rem; line-height: 1.1; unicode-bidi: plaintext; }
.stat-sub { font-size: 13px; color: var(--muted); }
.sec-head { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 12px; }
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.site-card { display: grid; gap: 14px; padding: 18px; border-radius: 20px; background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.12); transition: transform .2s ease, border-color .2s ease; }
.site-card:hover { transform: translateY(-3px); border-color: rgba(94,234,212,.45); }
.sc-top { display: flex; align-items: center; gap: 12px; }
.sc-name { display: grid; min-width: 0; flex: 1; }
.sc-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-name .url { font-size: 13px; color: var(--cyan); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; font-weight: 800; font-size: 15px; color: #06101a; background: linear-gradient(135deg, var(--a, #14b8a6), #7b61ff); }
.thumb.big { width: 56px; height: 56px; font-size: 19px; border-radius: 16px; }
.sc-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--muted); }
.sc-meta span { padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.sc-meta .chip-ok { color: var(--teal); border-color: rgba(94,234,212,.35); background: rgba(94,234,212,.1); }
.sc-actions { display: flex; gap: 8px; }
.steps-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.step { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); font-size: 14px; color: var(--muted); }
.step b { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #06101a; font-size: 13px; }
.empty-state { text-align: center; padding: 34px 20px; }
.site-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.sh-main { flex: 1; min-width: 200px; display: grid; gap: 6px; }
.sh-title { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; flex-wrap: wrap; }
.sh-url { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sh-url .url { color: var(--cyan); font-size: 14px; word-break: break-all; }
.dropzone { display: grid; justify-items: center; gap: 8px; padding: 26px 16px; margin: 14px 0 6px; text-align: center; border: 2px dashed rgba(255,255,255,.22); border-radius: 18px; background: rgba(255,255,255,.03); color: var(--muted); transition: border-color .2s ease, background .2s ease; }
.dropzone strong { color: var(--text); font-size: 1.05rem; }
.dropzone.over { border-color: var(--teal); background: rgba(94,234,212,.08); }
.dropzone svg { color: var(--cyan); }
.attach-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin-bottom: 8px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); font-size: 13px; color: var(--muted); }
.attach-row img { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; }
.attach-row span { flex: 1; }
.attach-btn { padding: 0 14px; display: inline-flex; align-items: center; cursor: pointer; align-self: stretch; }

@media (max-width: 960px) {
  .dash-shell { grid-template-columns: 1fr; gap: 16px; }
  .dash-side { position: static; padding: 14px; }
  .side-head { border: 0; margin: 0; padding: 0 4px 10px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app-main { padding-bottom: 96px; }
  .dash-side { padding: 0; background: transparent; border: 0; backdrop-filter: none; }
  .side-head { padding: 0 2px 12px; }
  .dash-side .dash-tabs { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 40; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 6px; border-radius: 20px; background: rgba(10,14,28,.92); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(18px); box-shadow: 0 18px 40px -12px rgba(0,0,0,.7); }
  .dash-side .dash-tabs button { flex-direction: column; justify-content: center; gap: 3px; padding: 8px 2px; font-size: 11px; text-align: center; min-width: 0; }
  .dash-side .dash-tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ov-hero { padding: 18px; }
  .stat-val { font-size: 1.4rem; }
  .site-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .steps-row { grid-template-columns: 1fr; } }
