:root {
    --bg: #0d121a;
    --bg-soft: #0d121a;
    --card: #141920;
    --card-soft: #181f28;
    --line: #2a3240;
    --line-soft: #242b36;
    --text: #e9eef7;
    --muted: #98a5b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
    --success-bg: #123524;
    --success-line: #285a3f;
    --success-text: #86efac;
}

* { box-sizing: border-box; }

html,
body {
    min-height: 100%;
}

html {
    background-color: #0d121a;
    background-image:
        radial-gradient(1100px 620px at 12% 8%, rgba(24, 58, 96, 0.14), transparent 66%),
        radial-gradient(980px 640px at 88% 86%, rgba(24, 58, 96, 0.14), transparent 72%),
        linear-gradient(180deg, #101723 0%, #0d121a 100%);
}


body {
    margin: 0;
    color: var(--text);
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: transparent;
}

.container {
    max-width: 1140px;
    margin: 32px auto;
    padding: 0 16px;
}

.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)), var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.38);
}

.auth-card {
    max-width: 920px;
    margin: 0 auto;
}

@media (max-width: 980px) {
    .auth-card {
        max-width: calc(100% - 16px);
        margin-left: 8px;
        margin-right: 8px;
    }
}




.account-card {
    max-width: 1080px;
    margin: 0 auto;
}

@media (max-width: 980px) {
    .account-card {
        max-width: 100%;
    }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

h1, h2, h3 { margin: 0; color: #f3f6fc; }
.muted { color: var(--muted); }

.dashboard-lang-wrap {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 12px;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border-radius: 999px;
    background: rgba(8, 8, 12, 0.34);
    box-shadow: inset 0 0 0 1px #3b4a5e;
}

.lang-btn {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #dce5f2;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 7px 11px;
    cursor: pointer;
    text-transform: uppercase;
    transition: .2s ease;
}

.lang-btn.is-active {
    background: linear-gradient(180deg, #8ad8ff 0%, #3aa9f0 100%);
    color: #032341;
}

.btn {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 11px 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .15s ease;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fecaca;
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.22); }

.btn-ghost {
    background: #202734;
    color: #dce5f2;
    border-color: #2c3646;
}
.btn-ghost:hover {
    background: #263040;
    border-color: #374457;
}

.notice {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--success-bg);
    border: 1px solid var(--success-line);
    color: var(--success-text);
}

.auth-box {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    align-items: stretch;
}

.qr-box {
    border: 1px dashed #3a475a;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #121821 0%, #10161d 100%);
    min-height: 280px;
}

.qr-box img {
    max-width: 240px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .35);
}

.status-pill {
    display: inline-block;
    background: #1e2836;
    color: #bcd1f3;
    border: 1px solid #314156;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.bot-card {
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    padding: 16px;
    background: var(--card-soft);
    min-height: 290px;
}

.field { margin-bottom: 10px; }
.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #b6c3d7;
}

.field input,
.field select {
    width: 100%;
    border: 1px solid #334054;
    border-radius: 9px;
    padding: 9px 10px;
    font-size: 14px;
    color: #e7edf7;
    background: #111722;
    outline: none;
    transition: border-color .12s ease, box-shadow .12s ease;
}

.field input:focus,
.field select:focus {
    border-color: #4c70a7;
    box-shadow: 0 0 0 2px rgba(76, 112, 167, 0.25);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 96px;
}

.pass-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid #334054;
    border-radius: 8px;
    background: #1a2230;
    color: #dce5f2;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 7px 10px;
    cursor: pointer;
}

.field select:disabled { opacity: 1; cursor: pointer; }

.service-grid {
    display: grid;
    gap: 10px;
    margin: 12px 0 14px;
}

.service-tile {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 11px 12px;
    border: 1px solid #2b3648;
    border-radius: 12px;
    background: #111a27;
}

.service-tile input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 1px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.service-title {
    font-weight: 700;
    color: #e6eefb;
    margin-bottom: 4px;
    font-size: 14px;
}

.inline-selects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}
.inline-single {
    margin-top: 8px;
}

.plus-card {
    min-height: 290px;
    border: 1px dashed #3c4b60;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111823;
    cursor: pointer;
    user-select: none;
    transition: background .15s ease, border-color .15s ease;
}

.plus-card:hover {
    background: #162131;
    border-color: #4a607f;
}

.plus-icon {
    font-size: 88px;
    line-height: 1;
    color: #7f96b3;
    font-weight: 300;
}

.hidden { display: none; }
.save-row {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}
.add-auth-panel {
    margin-top: 16px;
    border: 1px solid #2b3648;
    border-radius: 14px;
    padding: 14px;
    background: #111a27;
}
.add-auth-grid {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 14px;
    align-items: start;
}
.add-auth-qr {
    min-height: 220px;
    border: 1px dashed #3a475a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #121821 0%, #10161d 100%);
}
.add-auth-qr img {
    max-width: 210px;
    width: 100%;
    height: auto;
    border-radius: 10px;
}
@media (max-width: 760px) {
    .add-auth-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .auth-box { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .grid { grid-template-columns: 1fr; }
    .inline-selects { grid-template-columns: 1fr; }
}



.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.field input[type="number"] {
    -moz-appearance: textfield;
}


.service-title {
    position: relative;
}

.inline-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    margin-left: 6px;
    border-radius: 999px;
    border: 1px solid rgba(133, 170, 214, 0.46);
    color: #b9d6f3;
    font-size: 11px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.04);
    cursor: help;
    vertical-align: middle;
}

.inline-help-tip {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(370px, 78vw);
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(73, 107, 146, 0.72);
    background: #0d1724;
    color: #cfe0f7;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    z-index: 15;
}

.inline-help:hover + .inline-help-tip,
.inline-help:focus + .inline-help-tip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.number-control {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 6px;
}

.number-control input[type="number"] {
    text-align: center;
    padding-left: 8px;
    padding-right: 8px;
}

.number-btn {
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(96, 128, 166, 0.44);
    background: rgba(255, 255, 255, 0.03);
    color: #c7dcf3;
    font-size: 19px;
    line-height: 1;
    font-weight: 500;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease, color .12s ease, transform .08s ease;
}

.number-btn:hover {
    background: rgba(83, 143, 214, 0.12);
    border-color: rgba(96, 157, 228, 0.68);
    color: #e8f3ff;
}

.number-btn:active {
    transform: translateY(1px);
}
