.settings-options-menu {
    display: grid;
    gap: 10px;
}

.settings-option {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, .28);
    background: #fff;
    border-radius: 18px;
    padding: 13px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    text-align: left;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .055);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.settings-option:hover,
.settings-option.active {
    border-color: rgba(233, 145, 56, .45);
    box-shadow: 0 16px 38px rgba(15, 23, 42, .09);
    transform: translateY(-1px);
}

.settings-option-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(233, 145, 56, .12);
    font-size: 18px;
}

.settings-option-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.settings-option-copy strong {
    color: #111827;
    font-size: 14px;
    font-weight: 950;
    letter-spacing: -.02em;
}

.settings-option-copy small {
    color: #667085;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
}

.settings-option-arrow {
    color: #98a2b3;
    font-size: 24px;
    line-height: 1;
}

.settings-workspace {
    min-height: calc(100vh - 32px);
}

.app-main.settings-workspace-open > .app-header,
.app-main.settings-workspace-open > .calendar-panel {
    display: none !important;
}

.settings-screen {
    min-height: calc(100vh - 32px);
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 16px;
}

.settings-screen-header {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 28px;
    padding: 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    box-shadow: 0 18px 55px rgba(15, 23, 42, .08);
}

.settings-screen-kicker {
    color: #f97316;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.settings-screen-header h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 3.4vw, 38px);
    font-weight: 950;
    letter-spacing: -.05em;
}

.settings-screen-header p {
    margin: 5px 0 0;
    color: #667085;
    font-size: 14px;
}

.settings-screen-body {
    min-height: 0;
}

.settings-screen-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .75fr);
    align-items: start;
    gap: 16px;
}

.settings-help-column {
    display: grid;
    gap: 14px;
}

.dav-credentials-settings {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.dav-card {
    border: 1px solid rgba(148, 163, 184, .28);
    background: #fff;
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

.dav-card-main {
    padding: 22px;
}

.dav-card-muted {
    color: #667085;
}

.dav-card-error {
    border-color: rgba(239, 68, 68, .35);
    background: rgba(254, 242, 242, .85);
}

.dav-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.dav-card-kicker {
    color: #f97316;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dav-card-title {
    font-size: 16px;
    font-weight: 950;
    color: #111827;
    letter-spacing: -.03em;
}

.dav-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    background: #f3f4f6;
    color: #475467;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.dav-status.is-active {
    background: rgba(34, 197, 94, .13);
    color: #15803d;
}

.dav-help {
    margin: 0 0 14px;
    color: #667085;
    font-size: 13px;
    line-height: 1.45;
}

.dav-warning {
    margin: 10px 0 14px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(251, 191, 36, .16);
    color: #92400e;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.dav-field-list,
.dav-advanced {
    display: grid;
    gap: 11px;
}

.dav-field {
    display: grid;
    gap: 6px;
}

.dav-field > span {
    color: #667085;
    font-size: 12px;
    font-weight: 800;
}

.dav-value-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dav-value-row code,
.dav-password-input {
    min-width: 0;
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f9fafb;
    color: #111827;
    padding: 10px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dav-password-input {
    height: auto;
    outline: 0;
}

.dav-password-input.has-password {
    letter-spacing: .08em;
}

.dav-password-input.has-password[type="text"] {
    letter-spacing: normal;
}

.dav-password-toggle {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 900;
    padding: 9px 10px;
    min-width: 42px;
    white-space: nowrap;
}

.dav-password-toggle:hover {
    background: #f3f4f6;
}

.dav-copy {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 900;
    padding: 9px 10px;
    white-space: nowrap;
}

.dav-copy:hover {
    background: #f3f4f6;
}

.dav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.dav-steps {
    margin: 8px 0 0;
    padding-left: 18px;
    color: #374151;
    font-size: 13px;
    line-height: 1.55;
}

.dav-card-compact {
    padding: 0;
    overflow: hidden;
}

.dav-accordion {
    width: 100%;
    border: 0;
    background: #fff;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 16px;
    font-weight: 900;
}

.dav-accordion.is-open span {
    transform: rotate(180deg);
}

.dav-advanced {
    border-top: 1px solid #eef0f4;
    padding: 16px;
}

@media (max-width: 1100px) {
    .settings-screen-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .settings-screen-header {
        flex-direction: column;
        border-radius: 22px;
    }

    .settings-screen-header .btn {
        width: 100%;
    }

    .dav-value-row {
        align-items: stretch;
        flex-direction: column;
    }

    .dav-copy,
    .dav-password-toggle {
        width: 100%;
    }
}

.dav-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(15, 23, 42, .38);
    backdrop-filter: blur(8px);
}

.dav-dialog-card {
    width: min(470px, 100%);
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 26px;
    padding: 22px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .26);
    display: grid;
    gap: 16px;
}

.dav-dialog-card-wide {
    width: min(680px, 100%);
}

.dav-dialog-icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(233, 145, 56, .14);
    font-size: 24px;
}

.dav-dialog-content h2 {
    margin: 0;
    color: #111827;
    font-size: 22px;
    font-weight: 950;
    letter-spacing: -.04em;
}

.dav-dialog-content p {
    margin: 8px 0 0;
    color: #475467;
    line-height: 1.5;
    font-size: 14px;
}

.dav-dialog-note {
    margin-top: 12px;
    border-radius: 16px;
    background: rgba(251, 191, 36, .16);
    color: #92400e;
    padding: 11px 12px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

.dav-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.dav-copy-fallback {
    width: 100%;
    min-height: 150px;
    margin-top: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f9fafb;
    color: #111827;
    padding: 12px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 640px) {
    .dav-dialog-actions .btn {
        width: 100%;
    }
}
