/* Quote Connect — Admin portal styles */

.ad-login { padding: 40px 36px; text-align: center; margin-top: 20px; }
.ad-login-mark { width: 52px; height: 52px; border-radius: 12px; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.ad-login-h { font-size: 28px; margin: 0 0 6px; }
.ad-login-sub { color: var(--ink-2); font-size: 14.5px; margin: 0 0 26px; }
.ad-login-err { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #c2410c; background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 9px 12px; border-radius: var(--r); }

.ad-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; background: var(--navy); border-radius: var(--r-lg); margin-bottom: 16px; flex-wrap: wrap; }
.ad-bar-id { display: flex; align-items: center; gap: 14px; }
.ad-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: #fff; }
.ad-badge .qc-ic { color: var(--accent-gold); }
.ad-bar-sub { font-size: 11.5px; color: rgba(255,255,255,.6); }
.ad-bar .qc-btn.v-outline { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: #fff; }
.ad-bar .qc-btn.v-outline:hover { background: rgba(255,255,255,.16); border-color: #fff; }

.ad-tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: var(--r); margin-bottom: 18px; flex-wrap: wrap; }
.ad-tab { display: inline-flex; align-items: center; gap: 8px; border: none; background: none; padding: 10px 16px; border-radius: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ad-tab .qc-ic { color: var(--ink-3); }
.ad-tab.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.ad-tab.on .qc-ic { color: var(--accent-strong); }

.ad-layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.ad-layout.split { grid-template-columns: minmax(0,1fr) 420px; }
.ad-main { min-width: 0; }

.ad-search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 6px 6px 6px 14px; margin-bottom: 14px; }
.ad-search > .qc-ic { color: var(--ink-3); }
.ad-search input { flex: 1; border: none; outline: none; background: none; font-size: 14.5px; height: 36px; color: var(--ink); min-width: 0; }

.ad-table { overflow: hidden; }
.ad-tr { display: grid; grid-template-columns: minmax(0,2.2fr) minmax(0,1.3fr) 118px 108px 34px; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 16px; background: none; border: none; border-top: 1px solid var(--line); }
.ad-tr:first-child { border-top: none; }
button.ad-tr:hover { background: var(--surface-2); }
button.ad-tr.on { background: var(--accent-soft); }
.ad-th { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); padding: 10px 16px; }
.ad-td-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ad-td-name b { display: block; font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-td-name i { display: block; font-style: normal; font-size: 11px; color: var(--ink-3); }
.ad-td-user { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-td-plan { font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; }
.ad-sub { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.ad-sub.sub-active { background: var(--blue); }
.ad-sub.sub-past_due { background: var(--accent); }
.ad-sub.sub-inactive { background: var(--line-strong); }
.ad-td-edit { color: var(--ink-3); display: flex; justify-content: flex-end; }
.ad-pill { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 100px; border: 1px solid; white-space: nowrap; }
.ad-pill.st-verified { color: var(--blue-deep); background: var(--blue-soft); border-color: var(--blue-line); }
.ad-pill.st-pending { color: var(--accent-strong); background: var(--accent-soft); border-color: var(--accent-line); }
.ad-pill.st-suspended { color: var(--ink-3); background: var(--surface-2); border-color: var(--line-strong); }

.ad-editor { padding: 20px; position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow-y: auto; }
.ad-editor-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ad-editor-id { flex: 1; min-width: 0; }
.ad-editor-name { font-size: 15.5px; font-weight: 700; }
.ad-editor-loc { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.ad-close { border: none; background: var(--surface-2); width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); flex: none; }
.ad-close:hover { background: var(--line); color: var(--ink); }

.ad-sec { padding: 18px 0; border-bottom: 1px solid var(--line); }
.ad-sec:last-of-type { border-bottom: none; }
.ad-sec-t { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 14px; }
.ad-sec-t .qc-ic { color: var(--accent-strong); }
.ad-sec-note { margin-left: auto; font-size: 9.5px; letter-spacing: .06em; color: var(--ink-3); text-transform: none; }

.ad-cred { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ad-cred-k { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); width: 104px; flex: none; }
.ad-cred input { flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); padding: 0 11px; height: 38px; font-size: 13.5px; color: var(--ink); }
.ad-cred input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ad-mini { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-size: 11.5px; font-weight: 700; padding: 8px 11px; border-radius: var(--r); flex: none; }
.ad-mini:hover { border-color: var(--accent); color: var(--accent-strong); }
.ad-cred-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.ad-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.ad-grid2 .qf-field input { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); padding: 0 11px; height: 40px; font-size: 13.5px; color: var(--ink); }
.ad-grid2 .qf-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ad-grid2 .qf-select-wrap select { height: 40px; font-size: 13.5px; }

.ad-radius { display: flex; align-items: center; gap: 14px; }
.ad-radius .cov-slider { flex: 1; }
.ad-radius-v { font-size: 13px; font-weight: 700; color: var(--accent-strong); width: 62px; text-align: right; flex: none; }

.ad-editor-foot { display: flex; align-items: center; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ad-danger { margin-left: auto; border: none; background: none; color: #c2410c; font-size: 12.5px; font-weight: 700; }
.ad-danger:hover { text-decoration: underline; }

.ad-panel { padding: 24px; }
.ad-panel-h { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.ad-panel-p { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; margin: 0 0 20px; max-width: 68ch; }
.ad-rule { display: flex; flex-direction: column; gap: 10px; }
.ad-radio { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r); font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.ad-radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ad-radio input { accent-color: var(--accent); width: 16px; height: 16px; }
.ad-radio b { color: var(--ink); }

.ad-catlist { display: flex; flex-direction: column; }
.ad-catrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ad-catrow:first-child { border-top: none; }
.ad-catrow-n { font-size: 14px; font-weight: 600; flex: 1; }
.ad-catrow-code { font-size: 11px; color: var(--ink-3); }

@media (max-width: 980px) {
  .ad-layout.split { grid-template-columns: 1fr; }
  .ad-editor { position: static; max-height: none; }
  .ad-tr { grid-template-columns: minmax(0,1.6fr) 100px 30px; }
  .ad-td-user, .ad-td-plan, .ad-th span:nth-child(2), .ad-th span:nth-child(4) { display: none; }
  .ad-grid2 { grid-template-columns: 1fr; }
}

.ad-fee { display: flex; gap: 10px; align-items: center; }
.ad-fee-in { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: var(--r); padding-left: 11px; flex: 1; }
.ad-fee-in:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ad-fee-in .mono { color: var(--ink-2); font-size: 15px; }
.ad-fee-in input { flex: 1; min-width: 0; border: none; outline: none; background: none; height: 40px; font-size: 15px; font-weight: 700; color: var(--ink); }
.ad-fee-cycle { flex: none; width: 150px; }
.ad-fee-cycle select { height: 42px; font-size: 13.5px; }
.ad-fee-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ad-fee-presets .ad-mini.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }

.ad-auwide { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); }
.ad-auwide:hover { border-color: var(--accent-line); }
.ad-auwide.on { border-color: var(--accent); background: var(--accent-soft); }
.ad-auwide-ic { width: 34px; height: 34px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ad-auwide.on .ad-auwide-ic { background: var(--accent); color: #fff; }
.ad-auwide-t { flex: 1; min-width: 0; }
.ad-auwide-t b { display: block; font-size: 14px; color: var(--ink); }
.ad-auwide-t i { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.ad-switch { width: 38px; height: 22px; border-radius: 100px; background: var(--line-strong); position: relative; flex: none; transition: background .15s; }
.ad-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.ad-switch.on { background: var(--accent); }
.ad-switch.on::after { transform: translateX(16px); }
.ad-area { margin-top: 16px; }
.ad-area-l { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }

.ad-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.ad-catrow { cursor: pointer; }
.ad-catrow:hover { background: var(--surface-2); }
.ad-catrow.on { background: var(--accent-soft); }
.ad-catrow-count { font-size: 10.5px; color: var(--ink-3); flex: none; }
.ad-icobtn { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); width: 26px; height: 26px; border-radius: var(--r); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ad-icobtn:hover { border-color: var(--accent); color: var(--accent-strong); }
.ad-icobtn.danger:hover { border-color: #c2410c; color: #c2410c; }
.ad-inline { flex: 1; min-width: 0; border: 1px solid var(--accent); border-radius: var(--r); background: var(--surface); height: 30px; padding: 0 9px; font-size: 13.5px; font-family: inherit; color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.ad-addrow { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ad-addrow input { flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); height: 36px; padding: 0 11px; font-size: 13.5px; color: var(--ink); }
.ad-addrow input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ad-sublist { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.ad-subrow { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.ad-subrow:first-child { border-top: none; }
.ad-subrow-i { font-size: 10.5px; color: var(--ink-3); width: 22px; flex: none; }
.ad-subrow-n { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink); }
.ad-subempty { font-size: 12px; color: var(--ink-3); padding: 18px 0; }
@media (max-width: 980px) { .ad-cats { grid-template-columns: 1fr; } }

.ad-panel-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ad-showarch { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--ink-2); white-space: nowrap; flex: none; }
.ad-showarch input { accent-color: var(--accent); width: 14px; height: 14px; }
.ad-catrow.arch, .ad-tr.arch { opacity: .55; }
.ad-archtag { font-style: normal; font-family: var(--f-mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 6px; border-radius: 100px; margin-left: 8px; }
.ad-archived-note { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 11px 13px; margin-top: 14px; }
.ad-archived-note .qc-ic { color: var(--ink-3); flex: none; }
.ad-cred-current { font-size: 10.5px; color: var(--ink-3); margin-top: 10px; }
.ad-autosave { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--blue-deep); }
.ad-autosave .qc-ic { color: var(--blue); }
.ad-pending { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 14px; border-color: var(--accent-line); background: var(--accent-soft); font-size: 13px; color: var(--ink-2); }
.ad-pending > .qc-ic { color: var(--accent-strong); flex: none; }
.ad-pending span { flex: 1; }
.ad-pending b { color: var(--ink); }

.ad-subtools { display: flex; gap: 6px; margin-bottom: 12px; }
.ad-mini.on { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }

.ad-imgedit { border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--r-lg); padding: 14px; margin-top: 14px; }
.ad-imgedit-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ad-imgedit-body { display: flex; gap: 14px; }
.ad-imgprev { width: 104px; height: 104px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.ad-imgprev img { width: 100%; height: 100%; object-fit: cover; }
.ad-imgprev .mono { font-size: 10px; color: var(--ink-3); }
.ad-imgfields { flex: 1; min-width: 0; }
.ad-imgfields .qf-field input { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); height: 38px; padding: 0 11px; font-size: 13px; color: var(--ink); }
.ad-imgfields .qf-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ad-imgactions { display: flex; gap: 8px; margin-top: 10px; }
.ad-upload { position: relative; overflow: hidden; cursor: pointer; }
.ad-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ad-imghint { font-size: 10.5px; color: var(--ink-3); margin-top: 10px; }
.ad-imgedit-foot { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--accent-line); }

.ad-subthumb { width: 26px; height: 26px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: none; color: var(--ink-3); }
.ad-subthumb img { width: 100%; height: 100%; object-fit: cover; }
.qf-sub.has-img { padding-left: 6px; gap: 8px; display: inline-flex; align-items: center; }
.qf-sub-img { width: 26px; height: 26px; border-radius: 100px; object-fit: cover; flex: none; }
