/* ── Reset ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box
}

html,
body {
    padding: 0;
    margin: 0;
    height: 100%
}

body {
    font-family: 'Adobe Clean', system-ui, sans-serif;
    font-size: 14px;
    background:
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,.014) 1px, transparent 1px),
        #0b0d10;
    background-size: 32px 32px, 32px 32px, auto;
    height: 100%;
    color: #eef2f6;
}

p {
    margin: 0 0 4px
}

/* ── Layout ──────────────────────────────────────────────────────────── */
.container {
    max-width: none;
    margin: 0 auto;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-wrap {
    display: flex;
    gap: 0;
    align-items: stretch;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.sidebar {
    width: 248px;
    flex-shrink: 0;
    background: #0f1218;
    border-right: 1px solid #242a34;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 14px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #ff9a3d;
    flex-shrink: 0;
    min-height: 58px;
    background: #131720;
    border-bottom: 1px solid #242a34;
}

.sidebar__header b {
    color: #fff;
    font-weight: 700;
}

.sidebar__tools {
    display: flex;
    gap: 6px;
}

.sidebar__group {
    border-top: 1px solid #202630;
    flex-shrink: 0
}

.sidebar__group:first-child {
    border-top: none
}

.sidebar__group-label {
    padding: 13px 14px 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #667080;
}

.sidebar__empty {
    padding: 9px 14px 12px;
    font-size: 11px;
    color: #48515f;
    text-align: left
}

.account-list {
    list-style: none;
    margin: 0;
    padding: 4px 8px 6px
}

.account-list li {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 8px 8px 10px;
    cursor: pointer;
    border-radius: 7px;
    margin: 1px 0;
    font-size: 13px;
    transition: background .12s;
    border: 1px solid transparent;
    border-left: 2px solid transparent;
    min-height: 34px;
}

.account-list li:hover {
    background: #171c25;
    border-color: #27303c
}

.account-list li.active {
    background: #211b13;
    color: #ff9a3d;
    border-color: #3a2b19;
    border-left-color: #ff9a3d;
}

.account-list .acc-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.account-list .acc-type {
    font-size: 9px;
    color: #5d6572;
    flex-shrink: 0
}

.account-list .acc-del {
    opacity: 0;
    font-size: 11px;
    color: #ff6655;
    padding: 1px 4px;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity .15s;
}

.account-list .acc-edit {
    opacity: 0;
    font-size: 9px;
    color: #80a7ff;
    padding: 1px 4px;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity .15s;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.account-list li:hover .acc-edit {
    opacity: 1
}

.account-list li:hover .acc-del {
    opacity: 1
}

.account-list li.ip-item {
    align-items: flex-start;
    gap: 7px;
    min-height: 54px;
    padding: 9px 8px 8px 10px;
}

.ip-item__main {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.ip-item__name {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f0f4f8;
    font-size: 13px;
    font-weight: 700;
    line-height: 16px;
}

.ip-item__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #778292;
    font-size: 11px;
    line-height: 14px;
}

.ip-item__meta b {
    color: #8d98a8;
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.ip-item__meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: #80a7ff;
}

.account-list li.ip-item .acc-edit,
.account-list li.ip-item .acc-del {
    margin-top: 1px;
    flex-shrink: 0;
}

/* ── Main panel ──────────────────────────────────────────────────────── */
.main-panel {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 20px 24px 22px;
    display: flex;
    flex-direction: column;
}

.workspace-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.workspace-title {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.workspace-title strong {
    font-size: 20px;
    line-height: 24px;
    color: #f7fafc;
}

.workspace-kicker {
    color: #747f8e;
    font-size: 11px;
    line-height: 15px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.workspace-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.status-pill {
    height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 99px;
    background: #141a22;
    border: 1px solid #26303c;
    color: #8d98a8;
    font-size: 11px;
    white-space: nowrap;
}

.status-pill.live {
    color: #7be495;
    border-color: rgba(123, 228, 149, .28);
    background: rgba(123, 228, 149, .08);
}

/* ── Top tabs ─────────────────────────────────────────────────────────── */
.top-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    background: #10141b;
    padding: 5px;
    border-radius: 9px;
    border: 1px solid #242a34;
    flex-shrink: 0;
}

.top-tab {
    flex: 1;
    height: 36px;
    background: none;
    border: none;
    color: #748091;
    font-family: 'Adobe Clean', system-ui, sans-serif;
    font-size: 14px;
    border-radius: 7px;
    cursor: pointer;
    transition: all .18s;
}

.top-tab:hover {
    color: #d1d8e0;
    background: #171c25
}

.top-tab.on {
    background: #1f2a35;
    color: #ff9a3d;
    font-weight: 700;
    box-shadow: inset 0 -2px 0 #ff9a3d;
}

.section-panel {
    display: none
}

.section-panel.active {
    display: block
}

/* ── Mode tabs ───────────────────────────────────────────────────────── */
.mode-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 12px;
    background: #10141b;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #242a34;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.mode-tabs.sm {
    margin-bottom: 10px
}

.mode-tab {
    flex: 1;
    height: 31px;
    background: none;
    border: none;
    color: #748091;
    font-family: 'Adobe Clean', system-ui, sans-serif;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all .16s;
    white-space: nowrap;
    min-width: 50px;
}

.mode-tab:hover {
    color: #d1d8e0;
    background: #171c25
}

.mode-tab.on {
    background: #202a35;
    color: #ff9a3d;
    font-weight: 600;
    font-size: 13px;
}

.mode-panel {
    display: none
}

.mode-panel.active {
    display: block
}

.reg-panel {
    display: none
}

.reg-panel.active {
    display: block
}

.nc-panel {
    display: none
}

.nc-panel.active {
    display: block
}

.dn-panel {
    display: none
}

.dn-panel.active {
    display: block
}

.gd-panel {
    display: none
}

.gd-panel.active {
    display: block
}

/* ── Panel ───────────────────────────────────────────────────────────── */
.panel {
    border: 1px solid #242a34;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #10141b;
}

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 13px;
    background: #141922;
    border-bottom: 1px solid #242a34;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #d8dee7;
    gap: 8px;
    flex-wrap: nowrap;
    min-height: 34px;
}

.panel__body {
    padding: 12px 13px
}

.panel__body.p0 {
    padding: 0
}

/* ── Inputbox ────────────────────────────────────────────────────────── */
.inputbox {
    position: relative;
    margin-bottom: 8px
}

.inputbox:last-child {
    margin-bottom: 0
}

.inputbox input,
.inputbox textarea,
.inputbox select {
    display: block;
    width: 100%;
    background: #0c1016;
    color: #eef2f6;
    border: 1px solid #242b36;
    border-radius: 7px;
    padding: 0 11px;
    height: 34px;
    font-size: 15px;
    font-family: 'Adobe Clean', system-ui, sans-serif;
    outline: none;
    transition: box-shadow .15s, background .15s;
}

.inputbox textarea {
    height: auto;
    padding: 8px 11px;
    resize: vertical
}

.inputbox select {
    cursor: pointer;
    height: 34px
}

.inputbox input:focus,
.inputbox textarea:focus,
.inputbox select:focus {
    background: #111721;
    border-color: #ff9a3d;
    box-shadow: 0 0 0 2px rgba(255, 154, 61, .14);
}

.inputbox p {
    font-size: 13px;
    font-weight: 300;
    margin-top: 3px;
    margin-left: 4px;
    color: #7d8795;
    margin-bottom: 0;
}

.inputbox input.notvalid {
    background: linear-gradient(318deg, #ffd3d3, #ffd596) !important;
    box-shadow: 0 0 7px #000
}

.inputbox.w70 input {
    width: 70px !important
}

.inputbox.w80 input {
    width: 80px !important
}

.inputbox.w90 select {
    width: 90px !important
}

.inputbox.w110 input {
    width: 110px !important
}

.inputbox.flex1 {
    flex: 1
}

/* ── Rows ────────────────────────────────────────────────────────────── */
.inline-row {
    display: flex;
    gap: 8px;
    align-items: flex-start
}

.inline-row .inputbox {
    flex: 1;
    margin-bottom: 0
}

.auth-grid {
    display: flex;
    flex-direction: column;
    gap: 0
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    margin-top: 8px
}

.contact-details summary {
    cursor: pointer;
    font-size: 12px;
    color: rgba(255, 255, 255, .4);
    margin-bottom: 4px;
    user-select: none
}

.contact-details summary:hover {
    color: rgba(255, 255, 255, .7)
}

.contact-details {
    margin-top: 8px
}

.cf-flow-box {
    margin-top: 8px;
    padding: 9px 10px;
    background: #121824;
    border: 1px solid #273246;
    border-radius: 8px;
}

.cf-flow-box .inputbox select,
.cf-flow-box input[type=text] {
    background: #0c1016 !important;
    color: #eef2f6 !important;
    border: 1px solid #303947 !important;
    border-radius: 6px !important;
}

/* ── Auth tabs ───────────────────────────────────────────────────────── */
.auth-tabs {
    display: flex;
    gap: 4px;
    flex-shrink: 0
}

.auth-tab {
    font-size: 12px;
    padding: 3px 13px;
    border-radius: 20px;
    border: 1px solid #303947;
    color: #748091;
    background: #10141b;
    cursor: pointer;
    transition: all .15s;
    font-family: 'Adobe Clean', system-ui, sans-serif;
    white-space: nowrap;
}

.auth-tab.on {
    background: rgba(255, 154, 61, .12);
    border-color: #ff9a3d;
    color: #ff9a3d
}

/* ── Checkbox ────────────────────────────────────────────────────────── */
.chk-label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 300;
    color: #9aa4b2;
    transition: color .15s;
    user-select: none;
    padding: 3px 0;
}

.chk-label.sm {
    font-size: 12px
}

.chk-label input[type=checkbox] {
    display: none
}

.chk-label .chk {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    border: 1px solid #3a4350;
    border-radius: 4px;
    transition: background .15s, border-color .15s;
    position: relative;
}

.chk-label input:checked~.chk {
    background: #ff9a3d;
    border-color: #ff9a3d
}

.chk-label input:checked~.chk::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-left: none;
    border-top: none;
    transform: rotate(45deg);
}

.chk-label:has(input:checked) {
    color: #f7fafc
}

/* ── Opt rows ────────────────────────────────────────────────────────── */
.opt-row {
    border-bottom: 1px solid #1f2630;
    padding: 7px 0
}

.opt-row:last-child {
    border-bottom: none;
    padding-bottom: 0
}

.opt-fields {
    padding-left: 22px;
    margin-top: 6px
}

.opt-fields.row2 {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.opt-fields.row2 .inputbox {
    flex: 1;
    min-width: 120px
}

.opt-fields.hidden {
    display: none
}

/* ── Zone options ────────────────────────────────────────────────────── */
.opts-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

.opts-col {
    flex: 1;
    min-width: 150px
}

.opts-col__title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #667080;
    margin-bottom: 5px
}

/* ── SSL select ──────────────────────────────────────────────────────── */
.opt-select-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 3px 0
}

.opt-select-chk {
    flex-shrink: 0
}

.opt-select {
    height: 22px;
    font-size: 11px;
    padding: 0 7px;
    background: #0c1016;
    color: #eef2f6;
    border: 1px solid #303947;
    border-radius: 4px;
    font-family: 'Adobe Clean', system-ui, sans-serif;
    cursor: pointer;
    outline: none;
}

.opt-select:focus {
    border-color: #ff9a3d
}

.opt-select option {
    background: #1a1730;
    color: #fff
}

/* ── DNS table ───────────────────────────────────────────────────────── */
.table-scroll {
    overflow-x: auto
}

.dns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px
}

.dns-table th {
    text-align: left;
    padding: 5px 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #667080;
    border-bottom: 1px solid #242a34
}

.dns-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #1f2630;
    color: #c8d0dc;
    vertical-align: middle
}

.dns-table tr:last-child td {
    border-bottom: none
}

.dns-table tr:hover td {
    background: #151b24
}

.type-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em
}

.type-A,
.type-AAAA {
    background: rgba(59, 130, 246, .2);
    color: #93c5fd
}

.type-CNAME {
    background: rgba(20, 184, 166, .18);
    color: #5eead4
}

.type-MX {
    background: rgba(34, 197, 94, .18);
    color: #86efac
}

.type-TXT {
    background: rgba(245, 158, 11, .18);
    color: #fcd34d
}

.type-NS {
    background: rgba(248, 113, 113, .18);
    color: #fca5a5
}

.type-SRV,
.type-CAA {
    background: rgba(168, 85, 247, .18);
    color: #d8b4fe
}

.proxy-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%
}

.proxy-on {
    background: #ff9a3d
}

.proxy-off {
    background: #4b5563
}

.btn-del-rec {
    padding: 2px 7px;
    background: rgba(226, 70, 45, .14);
    border: 1px solid rgba(226, 70, 45, .32);
    color: #e2462d;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap
}

.btn-del-rec:hover {
    background: rgba(226, 70, 45, .3)
}

.dns-add-row {
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: wrap
}

.dns-add-row .inputbox {
    margin-bottom: 0
}

#addDnsBtn {
    align-self: flex-start;
}

/* ── Account info bar ────────────────────────────────────────────────── */
.acc-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    margin-bottom: 10px;
    background: #102018;
    border: 1px solid #1f4a31;
    border-radius: 8px;
    gap: 8px;
    flex-shrink: 0;
}

.acc-info-bar__main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    font-size: 12px;
    min-width: 0;
    flex: 1;
    overflow: hidden
}

.acc-info-item {
    color: #b9c8bc
}

.acc-info-item b {
    color: #fff;
    font-weight: 700
}

.acc-info-sep {
    color: #46d27a
}

.acc-badge {
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: #161d26;
    color: #8b96a6;
    border: 1px solid #293241;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.acc-badge.ok {
    background: rgba(34, 197, 94, .12);
    color: #7be495;
    border-color: rgba(34, 197, 94, .3)
}

.acc-badge.pro {
    background: rgba(47, 107, 255, .14);
    color: #80a7ff;
    border-color: rgba(47, 107, 255, .34)
}

.acc-badge.business {
    background: rgba(255, 154, 61, .13);
    color: #ff9a3d;
    border-color: rgba(255, 154, 61, .3)
}

.acc-badge.enterprise {
    background: rgba(34, 197, 94, .12);
    color: #7be495;
    border-color: rgba(34, 197, 94, .3)
}

.acc-badge.nc {
    background: rgba(226, 70, 45, .15);
    color: #f87171;
    border-color: rgba(226, 70, 45, .3)
}

.acc-badge.dn {
    background: rgba(36, 126, 200, .18);
    color: #60a5fa;
    border-color: rgba(36, 126, 200, .35)
}

.acc-badge.gd {
    background: rgba(34, 197, 94, .15);
    color: #4ade80;
    border-color: rgba(34, 197, 94, .3)
}

.acc-details-panel {
    background: #0d1117;
    border: 1px solid #242a34;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    max-height: 280px;
    overflow-y: auto;
}

.zone-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px
}

.zone-list-table th {
    text-align: left;
    padding: 5px 10px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #667080;
    border-bottom: 1px solid #242a34;
    background: #141922;
    position: sticky;
    top: 0;
    z-index: 1
}

.zone-list-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #1f2630;
    color: #c8d0dc;
    vertical-align: middle
}

.zone-list-table tr:last-child td {
    border-bottom: none
}

.zone-list-table tr:hover td {
    background: #151b24
}

.zone-status {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600
}

.zone-status.active {
    background: rgba(34, 197, 94, .14);
    color: #7be495
}

.zone-status.pending {
    background: rgba(255, 154, 61, .14);
    color: #ff9a3d
}

.zone-status.inactive,
.zone-status.deactivated {
    background: #171d26;
    color: #687384
}

/* ── Server IP row ───────────────────────────────────────────────────── */
.server-ip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 10px;
    background: #121824;
    border: 1px solid #273246;
    border-radius: 6px;
    font-size: 11px;
}

.ip-label {
    color: #7d8795;
    white-space: nowrap
}

.ip-val {
    font-family: monospace;
    font-size: 12px;
    color: #80a7ff;
    font-weight: 600;
    flex: 1;
    letter-spacing: .03em
}

.btn-copy-ip {
    background: none;
    border: 1px solid #344564;
    color: #80a7ff;
    border-radius: 4px;
    width: 22px;
    height: 22px;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.btn-copy-ip:hover {
    background: rgba(128, 167, 255, .12);
    border-color: #80a7ff
}

.btn-copy-ip.copied {
    color: #4aca4a;
    border-color: #4aca4a
}

/* ── Hints ───────────────────────────────────────────────────────────── */
.hint {
    font-size: 12px;
    color: #707a88;
    font-weight: 300
}

.hint.warn {
    color: #ff9a3d;
    margin-top: 8px
}

/* ── Error bar ───────────────────────────────────────────────────────── */
.error-bar {
    background: #251313;
    border: 1px solid #4a2323;
    border-radius: 6px;
    padding: 5px 13px;
    margin-bottom: 9px;
    text-align: center
}

.error-bar span {
    color: #ff7a66;
    font-size: 13px;
    font-weight: 500
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.go-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    width: 100%;
    border-radius: 9px;
    height: 48px;
    background: #ff8a2a;
    color: #111318;
    font-size: 18px;
    font-family: 'Adobe Clean', system-ui, sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .18s;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 4;
    box-shadow: 0 -12px 24px rgba(11, 13, 16, .48);
}

.go-btn:hover {
    background: #ffa24f;
    transform: translateY(-1px)
}

.btn-save {
    height: 32px;
    padding: 0 14px;
    background: #2f6bff;
    border: none;
    border-radius: 7px;
    color: #fff;
    font-family: 'Adobe Clean', system-ui, sans-serif;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s;
}

.btn-save:hover {
    opacity: .82
}

.btn-sm {
    height: 32px;
    padding: 0 12px;
    background: #181f29;
    border: 1px solid #334050;
    border-radius: 7px;
    color: #ff9a3d;
    font-family: 'Adobe Clean', system-ui, sans-serif;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.btn-sm:hover {
    background: #222b37
}

.btn-sm.green {
    background: rgba(34, 197, 94, .12);
    border-color: rgba(34, 197, 94, .34);
    color: #7be495
}

.btn-sm.green:hover {
    background: rgba(74, 202, 74, .3)
}

.btn-mini {
    height: 24px;
    padding: 0 10px;
    background: #171d26;
    border: 1px solid #2b3442;
    border-radius: 5px;
    color: #98a2b2;
    font-family: 'Adobe Clean', system-ui, sans-serif;
    font-size: 11px;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-mini:hover {
    border-color: #ff9a3d;
    color: #ff9a3d
}

.btn-mini.green {
    border-color: rgba(34, 197, 94, .4);
    color: #7be495;
    background: rgba(34, 197, 94, .1)
}

.btn-icon {
    background: #171d26;
    border: 1px solid #2b3442;
    color: #98a2b2;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    padding: 0;
    line-height: 1;
}

.btn-icon:hover {
    border-color: #ff9a3d;
    color: #ff9a3d
}

/* ── Progress overlay ────────────────────────────────────────────────── */
.progress-overlay {
    display: none;
    position: absolute;
    inset: 0;
    border-radius: 8px;
    backdrop-filter: blur(3px);
    z-index: 10
}

form {
    position: relative
}

.progress-log {
    position: absolute;
    inset: 0;
    padding: 20px 20px 75px;
    overflow-y: auto;
    display: flex;
    flex-direction: column
}

.progress-log p {
    margin-bottom: 5px;
    color: rgba(255, 255, 255, .65);
    line-height: 17px;
    font-size: 13px;
    animation: logIn .3s ease forwards;
    opacity: 0
}

.progress-log p.err {
    color: #ff7a66 !important
}

.progress-log p.ok {
    color: #7be495 !important
}

.progress-log p.warn {
    color: #ff9a3d !important
}

.progress-log p.done {
    color: #80a7ff !important;
    text-align: center;
    font-weight: 600
}

.progress-log p.sep {
    min-height: 6px;
    position: relative
}

.progress-log p.sep::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 1px;
    background: linear-gradient(90deg, transparent, #334050, transparent)
}

.progress-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(0deg, rgba(11, 13, 16, .82), transparent)
}

.progress-btn {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    height: 32px;
    border-radius: 8px;
    background: #2f6bff;
    color: #fff;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s
}

body.cf-sending #cfProgress,
body.cf-done #cfProgress,
body.nc-sending #ncProgress,
body.nc-done #ncProgress,
body.dn-sending #dnProgress,
body.dn-done #dnProgress,
body.gd-sending #gdProgress,
body.gd-done #gdProgress {
    display: block;
    animation: overlayIn .22s ease forwards
}

@keyframes overlayIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

body.cf-sending #cfProgress::before,
body.cf-done #cfProgress::before,
body.nc-sending #ncProgress::before,
body.nc-done #ncProgress::before,
body.dn-sending #dnProgress::before,
body.dn-done #dnProgress::before,
body.gd-sending #gdProgress::before,
body.gd-done #gdProgress::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #0b0d10;
    border-radius: 8px;
    z-index: -1
}

body.cf-sending #cfProgressBtn,
body.nc-sending #ncProgressBtn,
body.dn-sending #dnProgressBtn,
body.gd-sending #gdProgressBtn {
    background: #c83f32;
    opacity: 1;
    pointer-events: auto
}

body.cf-done #cfProgressBtn,
body.nc-done #ncProgressBtn,
body.dn-done #dnProgressBtn,
body.gd-done #gdProgressBtn {
    background: #ff8a2a;
    opacity: 1;
    pointer-events: auto
}

.progress-log a.copylink {
    display: inline-block;
    padding: 7px 36px 7px 11px;
    margin: 3px 0;
    background: #1d2532 url('copy.svg') no-repeat calc(100% - 10px) 50% / 13px;
    color: #fff;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #334050;
    text-decoration: none;
    transition: background-color .2s, opacity .15s
}

.progress-log a.copylink.copied {
    background-color: #36790C
}

/* ── Zone settings ───────────────────────────────────────────────────── */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 16px
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #1f2630;
    font-size: 12px
}

.setting-row:last-child {
    border-bottom: none
}

.setting-row .s-label {
    color: #9aa4b2;
    flex: 1
}

.setting-row .s-val {
    font-weight: 600;
    color: #ff9a3d;
    font-size: 11px;
    background: rgba(255, 154, 61, .1);
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap
}

.setting-row .s-val.on {
    color: #7be495;
    background: rgba(34, 197, 94, .1)
}

.setting-row .s-val.off {
    color: #687384;
    background: #171d26
}

/* ── Modal ───────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 10, .72);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center
}

.modal {
    background: #10141b;
    border: 1px solid #2b3442;
    border-radius: 10px;
    width: 420px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    overflow: hidden
}

.modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-bottom: 1px solid #242a34;
    font-weight: 600;
    font-size: 14px
}

.modal__body {
    padding: 14px 16px
}

.modal__body .inputbox {
    margin-bottom: 10px
}

.modal__foot {
    padding: 10px 16px;
    border-top: 1px solid #242a34;
    display: flex;
    justify-content: flex-end
}

/* ── Animations ──────────────────────────────────────────────────────── */
@keyframes logIn {
    from {
        opacity: 0;
        transform: translateY(6px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media(max-width:720px) {

    html,
    body {
        height: auto
    }

    .container {
        height: auto
    }

    .app-wrap {
        flex-direction: column;
        overflow: visible
    }

    .sidebar {
        width: 100%;
        overflow: visible;
        border-right: none;
        border-bottom: 1px solid #242a34
    }

    .main-panel {
        overflow: visible;
        padding: 14px
    }

    .workspace-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .opts-grid {
        flex-direction: column
    }

    .contact-grid {
        grid-template-columns: 1fr
    }

    .mode-tab {
        font-size: 11px
    }
}

/* ── Sidebar IP section ──────────────────────────────────────────────── */
.ip-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px 12px;
    font-size: 11px;
}

.ip-current__label {
    color: #667080;
    white-space: nowrap;
}

.ip-current__val {
    font-family: monospace;
    font-size: 11px;
    color: #80a7ff;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-list .ip-copy {
    opacity: 0;
    font-size: 11px;
    color: #80a7ff;
    padding: 1px 4px;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity .15s;
}

.account-list li:hover .ip-copy {
    opacity: 1;
}

.account-list .ip-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-list .ip-addr {
    font-family: monospace;
    font-size: 10px;
    color: #80a7ff;
    flex-shrink: 0;
}

/* ── IP Current row in sidebar ───────────────────────────────────────── */
.ip-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-top: 1px solid #202630;
    font-size: 11px;
}

.ip-current__label {
    color: #667080;
    flex-shrink: 0;
}

.ip-current__val {
    font-family: monospace;
    font-size: 11px;
    color: #80a7ff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#ncProgress {
    min-height: 320px;
}

/* ── Contrast / hierarchy pass ──────────────────────────────────────── */
body {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
        linear-gradient(135deg, #111720 0%, #151b25 46%, #10141b 100%);
    background-size: 34px 34px, 34px 34px, auto;
}

.sidebar {
    background: #080b10;
    border-right-color: #313947;
    box-shadow: 10px 0 28px rgba(0, 0, 0, .24);
}

.sidebar__header {
    background: #101620;
    border-bottom-color: #313947;
}

.sidebar__group {
    border-top-color: #242c38;
}

.sidebar__group-label {
    color: #8b96a6;
}

.account-list li {
    background: #0d1118;
    border-color: #171e29;
}

.account-list li:hover {
    background: #151c27;
    border-color: #334050;
}

.account-list li.active {
    background: #2a2118;
    border-color: #5a3d21;
    border-left-color: #ff9a3d;
    box-shadow: inset 0 0 0 1px rgba(255, 154, 61, .08);
}

.main-panel {
    background: rgba(20, 26, 36, .72);
    border-left: 1px solid rgba(255, 255, 255, .035);
}

.workspace-bar,
.top-tabs,
.mode-tabs {
    box-shadow: 0 10px 22px rgba(0, 0, 0, .16);
}

.workspace-title strong {
    color: #ffffff;
}

.top-tabs,
.mode-tabs {
    background: #0c1118;
    border-color: #313947;
}

.top-tab,
.mode-tab {
    background: #111720;
    border: 1px solid transparent;
}

.top-tab:hover,
.mode-tab:hover {
    background: #1a2330;
    border-color: #34404f;
}

.top-tab.on,
.mode-tab.on {
    background: #263241;
    border-color: #415066;
}

.section-panel.active,
.reg-panel.active,
.mode-panel.active,
.nc-panel.active,
.dn-panel.active,
.gd-panel.active {
    animation: sectionIn .16s ease-out;
}

@keyframes sectionIn {
    from {
        opacity: .82;
        transform: translateY(2px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.panel {
    background: #1a222d;
    border-color: #3a4554;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, .18),
        inset 0 1px 0 rgba(255, 255, 255, .035);
}

.panel__head {
    background: #222c39;
    border-bottom-color: #3a4554;
    color: #f0f4f8;
}

.panel__body {
    background: #18202a;
}

.inputbox input,
.inputbox textarea,
.inputbox select {
    background: #0f151e;
    border-color: #3b4654;
}

.inputbox input:hover,
.inputbox textarea:hover,
.inputbox select:hover {
    border-color: #4a5667;
}

.inputbox p,
.hint {
    color: #98a3b3;
}

.cf-flow-box,
.server-ip-row,
.acc-details-panel {
    background: #111821;
    border-color: #364253;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.acc-info-bar {
    background: #13271d;
    border-color: #2f6844;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .14);
}

.dns-table th,
.zone-list-table th {
    background: #202936;
    color: #a3adba;
}

.dns-table td,
.zone-list-table td {
    background: #151c26;
}

.dns-table tr:hover td,
.zone-list-table tr:hover td {
    background: #202936;
}

.go-btn {
    box-shadow:
        0 -14px 28px rgba(20, 26, 36, .84),
        0 10px 22px rgba(255, 138, 42, .16);
}

.modal {
    background: #1a222d;
    border-color: #3a4554;
}

.modal__head {
    background: #222c39;
    border-bottom-color: #3a4554;
}

.modal__foot {
    background: #18202a;
    border-top-color: #3a4554;
}

@media(max-width:720px) {
    .main-panel {
        background: rgba(20, 26, 36, .78);
        border-left: none;
    }
}
