/* Wesoco Posta panel: built on app.css (same tokens, glass cards, buttons) */
body { overflow: auto; }
.panel-badge { margin: -18px 0 22px; text-align: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); transform: translateZ(30px); }

.pshell { min-height: 100vh; display: flex; flex-direction: column; animation: appIn .6s var(--ease) both; }
.pbar { position: sticky; top: 10px; display: flex; align-items: center; gap: 12px; height: 56px; margin: 10px 16px 0; padding: 0 12px 0 18px; z-index: 10; }
.pbar .brand { flex: none !important; padding: 0 !important; height: 18px; width: auto; }
.pbar-title { font-weight: 600; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line-2); }
.pbar-who { font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar .pill { gap: 7px; }
.pbar svg, .pmain .send-btn svg, .pmain .pill svg { width: 16px; height: 16px; }
.pmain { width: min(1180px, 100% - 32px); margin: 26px auto 60px; display: flex; flex-direction: column; gap: 18px; }

.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.phead h1 { margin: 4px 0 4px; font-size: 26px; letter-spacing: -.01em; }
.phead .hint { margin: 0; }
.plink { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-size: 13px; }
.plink svg { width: 14px; height: 14px; }
.pc-usage { display: flex; flex-direction: column; align-items: flex-end; }
.pc-usage b { font-size: 22px; font-variant-numeric: tabular-nums; }
.pc-usage span { font-size: 12px; color: var(--faint); }

.pempty { padding: 48px 20px; text-align: center; color: var(--faint); border: 1px dashed var(--line-2); border-radius: 18px; }
.pempty-cell { text-align: center; color: var(--faint); padding: 28px !important; }

/* customer cards */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pcard { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 18px; text-decoration: none; color: var(--text);
  border: 1px solid var(--line); background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--text) 8%, transparent), transparent 60%), var(--panel-2);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 7%, transparent), 0 14px 30px rgba(0,0,0,.18); transition: transform .2s var(--ease), border-color .2s; }
.pcard:hover { transform: translateY(-2px); border-color: var(--line-2); }
.pc-name { font-size: 16px; }
.pc-domains { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-meter { height: 6px; border-radius: 4px; background: var(--hover); overflow: hidden; }
.pc-meter i { display: block; height: 100%; border-radius: 4px; background: var(--text); opacity: .8; }
.pc-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--faint); }
.pc-stats b { color: var(--text); }

/* tabs */
.ptabs { display: flex; gap: 6px; max-width: 100%; overflow-x: auto; }
.ptabs a { display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; height: 38px; border-radius: 12px; text-decoration: none; color: var(--muted); white-space: nowrap; }
.ptabs a svg { width: 16px; height: 16px; }
.ptabs a:hover { background: var(--hover); color: var(--text); }
.ptabs a.on { background: var(--text); color: var(--panel); font-weight: 600; }
.ppane { display: flex; flex-direction: column; gap: 14px; }
.ptools { display: flex; align-items: center; gap: 10px; }
.ptools .mini-search { width: min(320px, 100%); height: 38px; }

/* tables */
.ptable-wrap { border: 1px solid var(--line); border-radius: 16px; overflow: auto; background: var(--panel); }
.ptable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ptable th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable tbody tr:hover td { background: var(--hover); }
.pb-mail { font-weight: 600; }
.pbadge { margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid var(--line-2); color: var(--muted); }
.pb-name, .pb-alias { color: var(--muted); }
.pb-alias { max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-use { display: flex; flex-direction: column; gap: 5px; min-width: 130px; }
.pb-use small { color: var(--faint); font-size: 11.5px; }
.pb-acts { white-space: nowrap; text-align: right; }
.pb-acts .icon-btn { display: inline-grid; }

/* domains */
.pdomains { display: flex; flex-direction: column; gap: 16px; }
.pdomain { padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel-2); display: flex; flex-direction: column; gap: 12px; }
.pd-head { display: flex; align-items: center; gap: 12px; }
.pd-head b { font-size: 17px; }
.pstate { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.pstate.ok { color: var(--text); border-color: var(--text); }
.pstate.bad { color: #ff8a8a; border-color: rgba(255,120,120,.35); }
:root[data-theme="light"] .pstate.bad { color: #c62828; border-color: rgba(198,40,40,.3); }
.pdns code { font-size: 12px; word-break: break-all; }
.pdns-val { max-width: 520px; }
.pdns tr.optional td { opacity: .6; }
.pdot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); }
.pdot svg { width: 14px; height: 14px; }
.pdot.ok { background: var(--text); color: var(--panel); border-color: var(--text); }
.pdot.missing { color: #ff8a8a; border-color: rgba(255,120,120,.4); }
:root[data-theme="light"] .pdot.missing { color: #c62828; }

/* setup and settings */
.psetup { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.psec { padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel-2); display: flex; flex-direction: column; gap: 10px; }
.psec h3 { margin: 0; font-size: 15px; }
.psec p { margin: 0; color: var(--muted); line-height: 1.55; }
.psec .send-btn, .psec .pill { align-self: flex-start; }
.psec a { color: var(--text); }
.pset th { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--muted); }
.inl { width: 15px; height: 15px; vertical-align: -3px; }
.pdl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; margin: 0; }
.pdl dt { color: var(--faint); } .pdl dd { margin: 0; }
.pdanger h3 { color: #ff8a8a; }
:root[data-theme="light"] .pdanger h3 { color: #c62828; }

/* dialogs */
.pdlg { width: min(520px, 100%); gap: 14px; }
.pdlg h3 { margin: 0; font-size: 18px; }
.pdlg .set-row { display: flex; flex-direction: column; gap: 6px; }
.pdlg .set-row > span { font-size: 12.5px; color: var(--muted); }
.pdlg input, .pdlg select, .pdlg textarea { width: 100%; }
.pdlg-err { margin: 0; min-height: 0; color: #ff8a8a; font-size: 13px; }
.paddr { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.paddr select { width: auto; }
.pcheck { display: flex; align-items: center; gap: 10px; align-self: end; height: 42px; cursor: pointer; font-size: 13.5px; }
.pcheck input { width: 18px !important; height: 18px; accent-color: var(--text); }
.pwarn { display: flex; gap: 10px; margin: 0; padding: 12px; border-radius: 12px; border: 1px solid rgba(255,120,120,.3); background: rgba(255,90,95,.07); color: var(--text); font-size: 13.5px; }
.pwarn svg { width: 18px; height: 18px; flex: none; color: #ff8a8a; }
.pcred { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.pcred span { font-size: 12px; color: var(--faint); }
.pcred code { font-size: 14px; word-break: break-all; }
.pdlg footer { display: flex; align-items: center; gap: 8px; }

@media (max-width: 760px) {
  .pbar { margin: 6px 6px 0; } .pbar-title, .pbar-who { display: none; }
  .pmain { width: calc(100% - 16px); margin-top: 16px; }
  .phead { flex-direction: column; align-items: stretch; }
  .pc-usage { align-items: flex-start; }
  .ptools { flex-wrap: wrap; }
  .ptable th:nth-child(3), .ptable td:nth-child(3), .ptable th:nth-child(4), .ptable td:nth-child(4) { display: none; }
  .pdns th:nth-child(3), .pdns td:nth-child(3) { display: table-cell; }
}
.opt-toggle td { padding: 10px 16px !important; background: var(--hover); }
.opt-toggle .text-link { font-size: 12.5px; }

.login-card .back-link { text-align: center; }
