/* app/static/css/settings.css */

/* ========================= */
/* SETTINGS CONTAINER */
/* ========================= */
.settings-container {
    margin: 0;
    width: 100%;
    text-align: center;
    border: 2px solid #06abd4;
    border-radius: 8px;
    overflow: visible;
    position: relative;
    background: transparent;
    box-sizing: border-box;
}

/* ========================= */
/* SETTINGS HEADER */
/* ========================= */
.settings-container .tab-section-header,
.security-container .tab-section-header {
    background: #037d9c;
    padding: 12px 20px;
    text-align: center;
    box-sizing: border-box;
    border-radius: 6px 6px 0 0;
}

/* ========================= */
/* SETTINGS HEADER TITLE */
/* ========================= */
.settings-container .tab-section-header h2,
.security-container .tab-section-header h2 {
    font-size: 24px;
    color: #ffffff;
    font-weight: 400;
    margin: 0;
    text-align: center;
    line-height: 1.2;
}

/* ========================= */
/* SETTINGS BODY */
/* ========================= */
.settings-container .tab-section-body {
    padding: 16px 20px 20px;
    box-sizing: border-box;
}

/* ========================= */
/* SETTINGS DESCRIPTION */
/* ========================= */
.settings-container p {
    font-size: 16px;
    color: #cccccc;
    margin: 0 0 30px;
    text-align: center;
}

/* ========================= */
/* SETTINGS FORM */
/* ========================= */
.settings-form {
    margin: 0 auto;
    max-width: 400px;
    position: relative;
    overflow: visible;
}

/* ========================= */
/* FORM GROUP */
/* ========================= */
.form-group {
    margin-bottom: 20px;
    text-align: left;
    position: relative;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================= */
/* FORM LABEL */
/* ========================= */
.form-group label {
    display: block;
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 8px;
    text-align: center;
}

/* ========================= */
/* COMMON SELECT STYLE */
/* ========================= */
.form-group select {
    width: 100%;
    height: 40px;
    padding: 8px 10px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ffffff;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, background 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-group select:hover,
.form-group select:focus {
    border-color: #037d9c;
    outline: none;
}

/* ========================= */
/* LANGUAGE SELECT BOX */
/* ========================= */
.language-select-box {
    position: relative;
    width: 100%;
}

/* ========================= */
/* LANGUAGE FLAG INSIDE */
/* ========================= */
.language-flag-inside {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}

/* ========================= */
/* LANGUAGE SELECT FIELD */
/* ========================= */
#language-select {
    width: 100%;
    height: 40px;
    padding: 8px 10px 8px 46px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ffffff;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, background 0.3s ease;
    font-family: 'Inter', sans-serif;
}

#language-select:hover,
#language-select:focus {
    border-color: #037d9c;
    outline: none;
}

/* ========================= */
/* ACTION BUTTONS */
/* ========================= */
.action-btn,
.save-settings-btn,
.logout-btn {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(50, 50, 50, 0.5);
    color: #ffffff;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

/* ========================= */
/* ACTION BUTTONS HOVER */
/* ========================= */
.action-btn:hover,
.save-settings-btn:hover,
.logout-btn:hover {
    background: rgba(50, 50, 50, 0.8);
    color: #037d9c;
    border-color: #037d9c;
}

/* ========================= */
/* SAVE SETTINGS BUTTON */
/* ========================= */
.save-settings-btn {
    margin-top: 10px;
}

/* ========================= */
/* LOGOUT CONTAINER */
/* ========================= */
.logout-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

/* ========================= */
/* BUTTON GROUP */
/* ========================= */
.button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* ========================= */
/* LIGHT THEME CONTAINER */
/* ========================= */
.light-theme .settings-container {
    border: 2px solid #037d9c;
    background: transparent;
}

/* ========================= */
/* LIGHT THEME HEADER */
/* ========================= */
.light-theme .settings-container .tab-section-header {
    background: #037d9c;
}

/* ========================= */
/* LIGHT THEME HEADER TITLE */
/* ========================= */
.light-theme .settings-container .tab-section-header h2 {
    color: #ffffff;
}

/* ========================= */
/* LIGHT THEME DESCRIPTION */
/* ========================= */
.light-theme .settings-container p {
    color: #666666;
}

/* ========================= */
/* LIGHT THEME LABEL */
/* ========================= */
.light-theme .form-group label {
    color: #333333;
}

/* ========================= */
/* LIGHT THEME SELECT */
/* ========================= */
.light-theme .form-group select {
    background: rgba(240, 240, 240, 0.8);
    border: 1px solid rgba(150, 150, 150, 0.4);
    color: #333333;
}

.light-theme .form-group select:hover,
.light-theme .form-group select:focus {
    border-color: #037d9c;
    outline: none;
}

/* ========================= */
/* LIGHT THEME LANGUAGE SELECT */
/* ========================= */
.light-theme #language-select {
    background: rgba(240, 240, 240, 0.8);
    border: 1px solid rgba(150, 150, 150, 0.4);
    color: #333333;
}

.light-theme #language-select:hover,
.light-theme #language-select:focus {
    border-color: #037d9c;
    outline: none;
}

/* ========================= */
/* LIGHT THEME BUTTONS */
/* ========================= */
.light-theme .action-btn,
.light-theme .save-settings-btn,
.light-theme .logout-btn {
    background: rgba(240, 240, 240, 0.8);
    border: 1px solid rgba(150, 150, 150, 0.5);
    color: #333333;
}

.light-theme .action-btn:hover,
.light-theme .save-settings-btn:hover,
.light-theme .logout-btn:hover {
    background: rgba(200, 200, 200, 0.8);
    color: #037d9c;
    border-color: #06abd4;
}

/* ========================= */
/* SAVE SETTINGS BUTTON STATE */
/* Кнопка сохранения:
   - в обычном состоянии тёмный кружок
   - после успешного сохранения показывается голубая галочка */
/* ========================= */

.save-settings-btn {
    position: relative;
}

/* Тёмный круг под иконкой дискеты */
.save-settings-btn .save-icon-circle {
    color: rgba(10, 10, 10, 0.95);
    transition: color 0.3s ease;
}

/* Белая иконка сохранения */
.save-settings-btn .save-icon-symbol {
    color: #ffffff;
}

/* Галочка скрыта по умолчанию */
.save-settings-btn .save-settings-check {
    display: none;
    align-items: center;
    justify-content: center;
    color: #00ccff;
    font-size: 16px;
    line-height: 1;
}

/* После успешного сохранения галочка появляется */
.save-settings-btn.saved .save-settings-check {
    display: inline-flex;
}

/* Чтобы справа был нормальный промежуток */
.save-settings-btn.saved {
    gap: 8px;
}

/* Светлая тема */
.light-theme .save-settings-btn .save-icon-circle {
    color: rgba(30, 30, 30, 0.95);
}

.security-container {
    margin: 0;
    width: 100%;
    text-align: center;
    border: 2px solid #06abd4;
    border-radius: 8px;
    overflow: visible;
    position: relative;
    background: transparent;
    box-sizing: border-box;
}

.security-container .tab-section-body {
    padding: 16px 20px 22px;
    box-sizing: border-box;
}

.security-container p {
    font-size: 16px;
    color: #cccccc;
    margin: 0 0 24px;
    text-align: center;
}

.security-password-form {
    width: min(100%, 680px);
    margin: 0 auto;
    padding: 18px;
    border: 1px solid rgba(6, 171, 212, 0.30);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
        rgba(8, 12, 16, 0.82);
    box-shadow:
        0 0 18px rgba(6, 171, 212, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    box-sizing: border-box;
}

.security-guardian-panel {
    width: min(100%, 720px);
    margin: 0 auto 18px;
    padding: 18px;
    border: 1px solid rgba(74, 255, 137, 0.24);
    border-radius: 16px;
    background:
        radial-gradient(circle at 12% 0%, rgba(74, 255, 137, 0.14), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
        rgba(8, 12, 16, 0.86);
    box-shadow:
        0 0 22px rgba(74, 255, 137, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    box-sizing: border-box;
}

.security-panel-heading {
    position: relative;
    min-height: 74px;
    margin: 0 0 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    overflow: hidden;
    border: 2px solid #037d9c;
    border-radius: 15px;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.14) 52%, rgba(0, 0, 0, 0.04)),
        radial-gradient(circle at 82% 45%, rgba(3, 125, 156, 0.38), transparent 38%),
        linear-gradient(180deg, rgba(3, 125, 156, 0.36), rgba(4, 22, 32, 0.86));
    box-shadow:
        0 0 16px rgba(3, 125, 156, 0.44),
        0 10px 22px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    box-sizing: border-box;
}

.security-panel-heading::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 42%),
        radial-gradient(circle at 16% 24%, rgba(255, 255, 255, 0.12), transparent 30%);
    pointer-events: none;
}

.security-panel-heading-copy,
.security-sessions-actions,
.security-guardian-score {
    position: relative;
    z-index: 2;
}

.security-panel-heading-copy {
    min-width: 0;
    text-align: left;
}

.security-panel-heading-score .security-panel-heading-copy {
    flex: 1 1 auto;
}

.security-panel-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 5px;
    color: #9dffba;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.security-panel-heading h3 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 850;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.44);
}

.security-panel-heading p {
    max-width: 520px;
    margin: 0;
    color: #cfefff;
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.34);
}

.security-panel-heading-score p {
    max-width: none;
    margin-left: 0;
    white-space: nowrap;
}

#security .security-panel-heading p {
    margin-left: 0;
    text-align: left;
}

.security-guardian-score {
    width: 88px;
    min-width: 88px;
    height: 72px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(74, 255, 137, 0.34);
    border-radius: 13px;
    background: rgba(74, 255, 137, 0.08);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.security-guardian-score span {
    color: #6dff9a;
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
}

.security-guardian-score small {
    margin-top: 6px;
    color: #cfefff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.security-guardian-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.security-guardian-meta div {
    padding: 10px;
    border: 1px solid rgba(6, 171, 212, 0.20);
    border-radius: 12px;
    background: rgba(8, 12, 16, 0.62);
}

.security-guardian-meta span {
    display: block;
    margin-bottom: 5px;
    color: rgba(207, 239, 255, 0.72);
    font-size: 11px;
    font-weight: 800;
}

.security-guardian-meta strong {
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
}

.security-guardian-signals {
    display: grid;
    gap: 9px;
}

.security-guardian-signal,
.security-guardian-loading {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(6, 171, 212, 0.18);
    border-radius: 12px;
    background: rgba(8, 12, 16, 0.64);
    color: #cfefff;
}

.security-guardian-loading {
    display: block;
    text-align: center;
}

.security-guardian-signal-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(6, 171, 212, 0.12);
    color: #06d9ff;
}

.security-guardian-signal.active .security-guardian-signal-icon {
    background: rgba(74, 255, 137, 0.10);
    color: #6dff9a;
}

.security-guardian-signal.watch .security-guardian-signal-icon {
    background: rgba(255, 188, 72, 0.12);
    color: #ffd58a;
}

.security-guardian-signal-title {
    color: #ffffff;
    font-size: 13px;
    font-weight: 850;
}

.security-guardian-signal-detail {
    margin-top: 3px;
    color: rgba(207, 239, 255, 0.74);
    font-size: 12px;
    line-height: 1.35;
}

.security-guardian-signal-status {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(6, 171, 212, 0.12);
    color: #cfefff;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.security-guardian-signal.active .security-guardian-signal-status {
    background: rgba(74, 255, 137, 0.10);
    color: #9dffba;
}

.security-guardian-signal.watch .security-guardian-signal-status {
    background: rgba(255, 188, 72, 0.12);
    color: #ffd58a;
}

.security-trusted-panel {
    width: min(100%, 720px);
    margin: 0 auto 18px;
    padding: 18px;
    border: 1px solid rgba(6, 171, 212, 0.30);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
        rgba(8, 12, 16, 0.82);
    box-shadow:
        0 0 18px rgba(6, 171, 212, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    box-sizing: border-box;
}

.security-passkey-panel {
    width: min(100%, 720px);
    margin: 0 auto 18px;
    padding: 18px;
    border: 1px solid rgba(6, 171, 212, 0.30);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
        rgba(8, 12, 16, 0.82);
    box-shadow:
        0 0 18px rgba(6, 171, 212, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    box-sizing: border-box;
}

.security-trusted-form {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(120px, 0.7fr) auto;
    gap: 10px;
    margin-bottom: 12px;
}

.security-trusted-form input {
    width: 100%;
    height: 38px;
    padding: 9px 11px;
    border: 1px solid rgba(6, 171, 212, 0.38);
    border-radius: 11px;
    background: rgba(8, 12, 16, 0.96);
    color: #ffffff;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.security-trusted-form input:focus {
    border-color: rgba(6, 217, 255, 0.78);
    box-shadow: 0 0 0 3px rgba(6, 217, 255, 0.12);
}

.security-trusted-form button {
    min-height: 38px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(74, 255, 137, 0.40);
    border-radius: 11px;
    background: rgba(74, 255, 137, 0.10);
    color: #9dffba;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.security-trusted-form button:disabled {
    cursor: wait;
    opacity: 0.66;
}

.security-trusted-list {
    display: grid;
    gap: 9px;
}

.security-trusted-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(6, 171, 212, 0.20);
    border-radius: 12px;
    background: rgba(8, 12, 16, 0.70);
}

.security-trusted-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(74, 255, 137, 0.26);
    border-radius: 11px;
    background: rgba(74, 255, 137, 0.08);
    color: #6dff9a;
}

.security-trusted-main {
    min-width: 0;
    text-align: left;
}

.security-trusted-label {
    margin-bottom: 3px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 850;
}

.security-trusted-address {
    overflow: hidden;
    color: rgba(207, 239, 255, 0.74);
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.security-trusted-remove {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 92, 92, 0.28);
    border-radius: 10px;
    background: rgba(255, 92, 92, 0.08);
    color: #ffc6c6;
    cursor: pointer;
}

.security-trusted-remove:hover {
    border-color: rgba(255, 92, 92, 0.48);
    background: rgba(255, 92, 92, 0.14);
}

.security-password-grid {
    width: 100%;
    display: grid;
    gap: 16px;
}

.security-password-form .form-group {
    width: 100%;
    max-width: none;
    margin: 0;
}

.security-password-form .form-group label {
    text-align: left;
    color: #e8fbff;
    font-weight: 700;
}

.security-password-field {
    position: relative;
    width: 100%;
}

.security-password-form input {
    width: 100%;
    height: 42px;
    padding: 10px 44px 10px 12px;
    border: 1px solid rgba(6, 171, 212, 0.38);
    border-radius: 12px;
    background: rgba(8, 12, 16, 0.96);
    color: #ffffff;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.security-password-form input.has-value {
    background: #fff8cf;
    color: #111111;
    border-color: rgba(6, 171, 212, 0.48);
}

.security-password-form input:focus {
    border-color: rgba(6, 217, 255, 0.78);
    box-shadow: 0 0 0 3px rgba(6, 217, 255, 0.12);
}

.security-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
    color: #000000;
    cursor: pointer;
}

.security-password-toggle:hover,
.security-password-toggle:focus-visible {
    background: rgba(6, 171, 212, 0.16);
    color: #000000;
    outline: none;
}

.security-password-message {
    display: none;
    margin: 0 auto 14px;
    padding: 10px 12px;
    border: 1px solid rgba(6, 171, 212, 0.28);
    border-radius: 10px;
    background: rgba(8, 12, 16, 0.92);
    color: #cfefff;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    width: min(100%, 560px);
    box-sizing: border-box;
}

.security-password-message.show {
    display: block;
}

.security-password-message.success {
    border-color: rgba(74, 255, 137, 0.58);
    background: rgba(74, 255, 137, 0.12);
    color: #6dff9a;
    box-shadow: 0 0 14px rgba(74, 255, 137, 0.14);
}

.security-password-message.error {
    border-color: rgba(255, 95, 95, 0.54);
    color: #ffb0b0;
}

.security-password-hint {
    display: flex;
    align-items: center;
    gap: 9px;
    width: min(100%, 560px);
    margin: 16px auto;
    padding: 10px 12px;
    border: 1px solid rgba(6, 171, 212, 0.18);
    border-radius: 12px;
    background: rgba(6, 171, 212, 0.08);
    color: #cfefff;
    font-size: 13px;
    text-align: left;
    box-sizing: border-box;
}

.security-password-hint i {
    color: #06d9ff;
}

.security-confirmation-step {
    width: min(100%, 560px);
    margin: 16px auto 0;
}

.security-confirmation-step[hidden] {
    display: none;
}

.security-confirmation-step label {
    display: block;
    margin: 0 0 8px;
    color: #e8fbff;
    font-size: 14px;
    font-weight: 800;
    text-align: left;
}

.security-confirmation-step input {
    width: 100%;
    height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(6, 171, 212, 0.38);
    border-radius: 12px;
    background: rgba(8, 12, 16, 0.96);
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-align: center;
    outline: none;
    box-sizing: border-box;
}

.security-confirmation-step input.has-value {
    background: #fff8cf;
    color: #111111;
}

.security-change-password-btn {
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid rgba(6, 217, 255, 0.54);
    border-radius: 12px;
    background:
        linear-gradient(90deg, rgba(6, 171, 212, 0.30), rgba(0, 255, 204, 0.12)),
        rgba(6, 171, 212, 0.16);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-left: calc((100% - min(100%, 560px)) / 2);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.security-change-password-btn:hover {
    border-color: rgba(6, 217, 255, 0.82);
    box-shadow: 0 0 18px rgba(6, 217, 255, 0.24);
    transform: translateY(-1px);
}

.security-change-password-btn:disabled {
    cursor: wait;
    opacity: 0.68;
    transform: none;
}

.security-sessions-panel {
    width: min(100%, 680px);
    margin: 18px auto 0;
    padding: 18px;
    border: 1px solid rgba(6, 171, 212, 0.30);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
        rgba(8, 12, 16, 0.82);
    box-shadow:
        0 0 18px rgba(6, 171, 212, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    box-sizing: border-box;
}

.security-sessions-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    text-align: left;
}

.security-sessions-header h3 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}

.security-sessions-header p {
    margin: 0;
    color: #cfefff;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    max-width: 360px;
}

.security-sessions-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.security-add-passkey {
    min-height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(6, 217, 255, 0.42);
    border-radius: 10px;
    background: rgba(6, 171, 212, 0.12);
    color: #e8fbff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.security-add-passkey:hover {
    border-color: rgba(6, 217, 255, 0.72);
    background: rgba(6, 171, 212, 0.20);
}

.security-add-passkey:disabled {
    cursor: wait;
    opacity: 0.66;
}

.security-refresh-sessions {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(6, 217, 255, 0.42);
    border-radius: 10px;
    background: rgba(6, 171, 212, 0.12);
    color: #e8fbff;
    cursor: pointer;
}

.security-logout-other-sessions {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid rgba(255, 188, 72, 0.46);
    border-radius: 10px;
    background: rgba(255, 188, 72, 0.11);
    color: #fff2cf;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.security-refresh-sessions:hover {
    border-color: rgba(6, 217, 255, 0.72);
    background: rgba(6, 171, 212, 0.20);
}

.security-logout-other-sessions:hover {
    border-color: rgba(255, 188, 72, 0.72);
    background: rgba(255, 188, 72, 0.18);
}

.security-refresh-sessions:disabled,
.security-logout-other-sessions:disabled {
    cursor: wait;
    opacity: 0.66;
}

.security-sessions-message {
    display: none;
    margin: -2px 0 12px;
    padding: 9px 11px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.security-sessions-message.show {
    display: block;
}

.security-sessions-message.success {
    border: 1px solid rgba(0, 255, 204, 0.26);
    background: rgba(0, 255, 204, 0.09);
    color: #b8ffec;
}

.security-sessions-message.error {
    border: 1px solid rgba(255, 92, 92, 0.30);
    background: rgba(255, 92, 92, 0.10);
    color: #ffd7d7;
}

.security-sessions-list {
    display: grid;
    gap: 10px;
}

.security-passkey-list {
    margin-top: 0;
    display: grid;
    gap: 10px;
}

.security-session-card,
.security-passkey-row,
.security-sessions-empty {
    border: 1px solid rgba(6, 171, 212, 0.20);
    border-radius: 12px;
    background: rgba(8, 12, 16, 0.72);
    color: #cfefff;
    box-sizing: border-box;
}

.security-session-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    text-align: left;
}

.security-passkey-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    justify-content: normal;
    min-height: auto;
    padding: 12px;
    text-align: left;
}

.security-passkey-row::before {
    content: "\f084";
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(6, 217, 255, 0.34);
    border-radius: 12px;
    background: rgba(6, 171, 212, 0.12);
    color: #06d9ff;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.security-passkey-row div {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.security-passkey-row strong {
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
}

.security-passkey-row span {
    color: rgba(207, 239, 255, 0.72);
    font-size: 12px;
}

.security-passkey-row button {
    min-height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(255, 92, 92, 0.28);
    border-radius: 10px;
    background: rgba(255, 92, 92, 0.08);
    color: #ffc6c6;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.security-passkey-row button:hover {
    border-color: rgba(255, 92, 92, 0.48);
    background: rgba(255, 92, 92, 0.14);
}

.security-session-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(6, 217, 255, 0.34);
    border-radius: 12px;
    background: rgba(6, 171, 212, 0.12);
    color: #06d9ff;
}

.security-session-main {
    min-width: 0;
}

.security-session-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
}

.security-session-current {
    padding: 3px 8px;
    border: 1px solid rgba(0, 255, 204, 0.32);
    border-radius: 999px;
    background: rgba(0, 255, 204, 0.10);
    color: #b8ffec;
    font-size: 11px;
    font-weight: 800;
}

.security-session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: #cfefff;
    font-size: 12px;
}

.security-session-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.security-session-last-seen {
    color: rgba(207, 239, 255, 0.72);
    font-size: 12px;
    white-space: nowrap;
}

.security-sessions-empty {
    padding: 12px;
    text-align: center;
}

@media (max-width: 640px) {
    .security-panel-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .security-panel-heading-score p {
        white-space: normal;
    }

    .security-guardian-score {
        width: 100%;
        min-width: 0;
        height: auto;
        padding: 14px;
    }

    .security-change-password-btn {
        width: 100%;
        margin-left: 0;
    }

    .security-guardian-meta {
        grid-template-columns: 1fr;
    }

    .security-guardian-signal {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .security-guardian-signal-status {
        grid-column: 2;
        justify-self: start;
    }

    .security-trusted-form {
        grid-template-columns: 1fr;
    }

    .security-trusted-item {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .security-trusted-remove {
        grid-column: 2;
        justify-self: start;
    }

    .security-sessions-header {
        flex-direction: column;
        align-items: stretch;
    }

    .security-sessions-actions {
        justify-content: flex-start;
    }

    .security-add-passkey {
        width: 100%;
        white-space: normal;
    }

    .security-logout-other-sessions {
        flex: 1 1 auto;
        white-space: normal;
    }

    .security-session-card,
    .security-passkey-row {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .security-passkey-row button {
        grid-column: 2;
        justify-self: start;
    }

    .security-session-last-seen {
        grid-column: 2;
        white-space: normal;
    }
}

/* ========================= */
/* ACCOUNT SETTINGS: PAXOR MODAL STYLE */
/* ========================= */

#settings .settings-container,
#security .security-container {
    margin: 0;
    width: 100%;
    overflow: visible;
    text-align: left;
    border: 1px solid rgba(6, 171, 212, 0.44);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
        linear-gradient(180deg, rgba(6, 171, 212, 0.14), rgba(0, 0, 0, 0.10)),
        rgba(15, 18, 22, 0.98);
    box-shadow:
        0 0 24px rgba(6, 171, 212, 0.22),
        0 18px 50px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
}

#settings .settings-container .tab-section-header,
#security .security-container .tab-section-header {
    position: relative;
    min-height: 72px;
    margin: 0;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #037d9c;
    border-radius: 15px;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.14) 48%, rgba(0, 0, 0, 0.04)),
        radial-gradient(circle at 78% 48%, rgba(3, 125, 156, 0.42), transparent 38%),
        linear-gradient(180deg, rgba(3, 125, 156, 0.38), rgba(4, 22, 32, 0.84));
    box-shadow:
        0 0 16px rgba(3, 125, 156, 0.48),
        0 10px 24px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    box-sizing: border-box;
}

#settings .settings-container .tab-section-header::before,
#security .security-container .tab-section-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 42%),
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.12), transparent 32%);
    pointer-events: none;
}

#settings .settings-container .tab-section-header h2,
#security .security-container .tab-section-header h2 {
    position: relative;
    z-index: 2;
    margin: 0;
    color: #ffffff;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.48);
}

#settings .settings-container .tab-section-body,
#security .security-container .tab-section-body {
    padding: 18px 20px 20px;
}

#settings .settings-container p,
#security .security-container p {
    margin: 0 0 18px;
    color: #cfefff;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.45;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

#settings .settings-form {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 16px;
    border: 1px solid rgba(6, 171, 212, 0.28);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
        rgba(8, 12, 16, 0.92);
    box-shadow:
        0 0 18px rgba(6, 171, 212, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    box-sizing: border-box;
}

#settings .form-group {
    width: 100%;
    max-width: none;
    margin: 0 0 14px;
}

#settings .language-select-box {
    width: min(100%, 420px);
    max-width: 100%;
    margin: 0 auto;
    transform: translateX(12px);
}

#settings .form-group label {
    margin: 0 0 8px;
    color: #e8fbff;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
}

#settings .form-group select,
#settings #language-select {
    width: 100%;
    min-height: 42px;
    height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(6, 171, 212, 0.38);
    border-radius: 12px;
    background: rgba(8, 12, 16, 0.96);
    color: #ffffff;
    font-size: 14px;
    line-height: 1.45;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#settings #language-select {
    padding-left: 46px;
    padding-right: 46px;
    text-align: center;
    text-align-last: center;
}

#settings .form-group select:hover,
#settings .form-group select:focus,
#settings #language-select:hover,
#settings #language-select:focus {
    border-color: rgba(6, 217, 255, 0.78);
    background: rgba(12, 16, 20, 1);
    box-shadow: 0 0 0 3px rgba(6, 217, 255, 0.12);
}

#settings .language-flag-inside {
    left: 13px;
    width: 24px;
    height: 24px;
    box-shadow: 0 0 10px rgba(6, 217, 255, 0.20);
}

#settings .save-settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: fit-content;
    min-width: 116px;
    min-height: 28px;
    margin: 16px auto 0;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(93, 255, 154, 0.42);
    background:
        radial-gradient(circle at 26% 0%, rgba(93, 255, 154, 0.22), transparent 42%),
        linear-gradient(135deg, rgba(54, 168, 102, 0.34), rgba(6, 171, 212, 0.20)),
        rgba(8, 12, 16, 0.94);
    color: #eafff2;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    box-shadow:
        0 0 10px rgba(54, 168, 102, 0.16),
        0 6px 14px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

#settings .save-settings-btn:hover {
    border-color: rgba(93, 255, 154, 0.72);
    background:
        radial-gradient(circle at 26% 0%, rgba(93, 255, 154, 0.32), transparent 44%),
        linear-gradient(135deg, rgba(54, 168, 102, 0.46), rgba(6, 171, 212, 0.26)),
        rgba(8, 12, 16, 0.98);
    color: #ffffff;
    box-shadow:
        0 0 12px rgba(54, 168, 102, 0.26),
        0 7px 15px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#settings .save-settings-btn .save-icon-stack {
    width: 18px;
    height: 18px;
    min-width: 18px;
    font-size: 9px;
    line-height: 18px;
}

#settings .save-settings-btn .save-icon-circle {
    color: rgba(93, 255, 154, 0.24);
}

#settings .save-settings-btn .save-icon-symbol {
    color: #5dff9a;
}

#settings .save-settings-btn .save-settings-text {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

#settings .save-settings-btn .save-settings-check {
    font-size: 12px;
    line-height: 1;
}

body.light-theme #settings .settings-container,
body.light-theme #settings .settings-form {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
        linear-gradient(180deg, rgba(6, 171, 212, 0.14), rgba(0, 0, 0, 0.10)),
        rgba(15, 18, 22, 0.98);
    color: #ffffff;
}

body.light-theme #settings .settings-container p,
body.light-theme #settings .form-group label {
    color: #cfefff;
}

body.light-theme #settings .form-group select,
body.light-theme #settings #language-select {
    background: rgba(8, 12, 16, 0.96);
    border-color: rgba(6, 171, 212, 0.38);
    color: #ffffff;
}

#security .security-password-form,
#security .security-sessions-panel {
    width: min(100%, 720px);
}

#security .security-password-grid {
    width: min(100%, 560px);
    margin: 0 auto;
}

#security .security-password-form .form-group,
#security .security-password-field,
#security .security-password-form input {
    width: 100%;
    max-width: none;
}

#security .security-password-form .form-group label {
    text-align: left;
}

#security .security-sessions-header > div:first-child {
    min-width: 0;
}

#security .security-panel-heading .security-panel-heading-copy p,
#security .security-sessions-header p {
    margin-left: 0;
    text-align: left;
}

#security .security-panel-heading-score .security-panel-heading-copy p,
#security .security-trusted-panel .security-sessions-header p {
    max-width: none;
    white-space: nowrap;
}

@media (max-width: 760px) {
    #security .security-panel-heading-score .security-panel-heading-copy p,
    #security .security-trusted-panel .security-sessions-header p {
        white-space: normal;
    }

    #settings .settings-container .tab-section-header,
    #security .security-container .tab-section-header {
        min-height: 68px;
        padding: 12px 16px;
    }

    #settings .settings-container .tab-section-header h2,
    #security .security-container .tab-section-header h2 {
        font-size: 24px;
    }

    #settings .settings-container .tab-section-body,
    #security .security-container .tab-section-body {
        padding: 14px;
    }

    #settings .language-select-box {
        transform: none;
    }
}
