body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 14, 20, 0.75);
    z-index: 2000;
}

.modal-overlay.is-open {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 760px;
    background: #1a1f2e;
    border: 1px solid #2a3142;
    border-radius: 16px;
    padding: 24px;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #2a3142;
    background: transparent;
    color: #b0b3b8;
    cursor: pointer;
    font-weight: 700;
}

.modal-close:hover {
    border-color: #3b4863;
    color: #fff;
}

.modal-header h2 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 4px;
}

.modal-subtitle {
    color: #8a96a5;
    font-size: 14px;
    margin-bottom: 14px;
}

.modal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.modal-tab {
    background: #0f1419;
    border: 1px solid #2a3142;
    color: #b0b3b8;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.modal-tab.is-active {
    background: #0099ff;
    border-color: #0099ff;
    color: #fff;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
}

.modal-copy h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 8px;
}

.modal-copy p {
    color: #b0b3b8;
    font-size: 14px;
    line-height: 1.6;
}

.modal-note {
    margin-top: 12px;
    font-size: 13px;
    color: #8a96a5;
    padding: 10px 12px;
    background: #0f1419;
    border: 1px solid #2a3142;
    border-radius: 10px;
}

.modal-action {
    background: #0f1419;
    border: 1px solid #2a3142;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #2a3142;
    color: #b0b3b8;
    font-size: 12px;
}

.modal-pill.ok {
    border-color: rgba(0, 212, 255, 0.4);
    color: #00d4ff;
}

.modal-pill.warn {
    border-color: rgba(255, 210, 77, 0.4);
    color: #ffd24d;
}

.modal-pill.bad {
    border-color: rgba(255, 85, 85, 0.4);
    color: #ff7575;
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #2a3142;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    font-size: 13px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.modal-btn:hover {
    transform: translateY(-1px);
    border-color: #0099ff;
}

.modal-btn-primary {
    background: #0099ff;
    border-color: #0099ff;
}

.modal-btn-primary:hover {
    background: #0088ee;
    border-color: #0088ee;
}

.modal-btn-outline {
    border-color: rgba(255, 255, 255, 0.2);
}

.modal-code-wrap {
    flex-direction: column;
    gap: 10px;
}

.modal-code-box {
    background: #141a24;
    border: 1px solid #2a3142;
    border-radius: 10px;
    padding: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 18px;
    letter-spacing: 1px;
    color: #fff;
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.modal-input {
    background: #141a24;
    border: 1px solid #2a3142;
    border-radius: 10px;
    padding: 10px 12px;
    color: #e4e6eb;
    font-size: 14px;
}

.modal-input:focus {
    outline: none;
    border-color: #0099ff;
}

.modal-form-status {
    font-size: 13px;
    color: #b0b3b8;
}

.modal-user {
    color: #b0b3b8;
    font-size: 14px;
}

.modal-user strong {
    color: #fff;
}

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

    .modal-card {
        padding: 20px;
    }
}
