.api-key-create-panel {
    padding: 24px;
    background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
}

.api-key-create-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.api-key-name-field {
    min-width: 200px;
    flex: 1;
}

.api-key-name-label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

.api-key-name-input {
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    padding: 0 14px;
    border: 1.5px solid #e0e5ec;
    border-radius: 10px;
    outline: none;
    background: #fff;
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
}

.api-key-name-input:focus {
    border-color: #1e78ff;
    box-shadow: 0 0 0 3px rgba(30, 120, 255, .08);
}

.btn-create-key {
    height: 44px;
    padding: 0 24px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1e78ff, #0a4da8);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .25s, box-shadow .25s, opacity .25s;
}

.btn-create-key:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(30, 120, 255, .25);
}

.btn-create-key:active {
    transform: translateY(0);
}

.btn-create-key:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.api-key-list-heading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-key-limit-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 22px;
    padding: 0 8px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.api-key-created-popup {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .2);
}

.api-key-created-popup .swal2-title {
    margin: 0;
    padding: 26px 28px 8px;
    color: #080b12;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
}

.api-key-created-popup .swal2-content {
    padding: 8px 28px 0;
    text-align: left;
}

.api-key-created-content {
    text-align: left;
}

.api-key-created-description {
    margin: 0 0 14px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.65;
}

.api-key-created-field {
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    transition: border-color .2s, box-shadow .2s;
}

.api-key-created-field:focus-within {
    box-shadow: 0 0 0 3px rgba(30, 120, 255, .08);
}

#created-api-key {
    display: block;
    width: 100%;
    height: 50px;
    box-sizing: border-box;
    padding: 0 14px;
    border: 0;
    outline: none;
    background: transparent;
    color: #080b12;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 14px;
    font-weight: 600;
}

.api-key-copy-status {
    min-height: 0;
    margin: 0;
    color: #16a34a;
    font-size: 12px;
    line-height: 18px;
}

.api-key-copy-status:not(:empty) {
    min-height: 18px;
    margin-top: 7px;
}

.api-key-copy-status.is-error {
    color: #d97706;
}

.api-key-created-popup .swal2-actions {
    justify-content: flex-end;
    width: auto;
    margin: 0;
    padding: 23px 28px 26px;
    gap: 12px;
    border-top: 0;
}

.api-key-created-popup .swal2-styled {
    min-width: 88px;
    height: 44px;
    margin: 0;
    padding: 0 22px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    line-height: 44px;
    box-shadow: none !important;
}

.api-key-created-popup .swal2-cancel {
    order: 1;
    border: 1px solid #dfe2e7;
    background: #fff !important;
    color: #080b12;
}

.api-key-created-popup .swal2-confirm {
    order: 2;
    background: #101217 !important;
    color: #fff;
}

.api-key-created-popup .swal2-confirm:hover {
    background: #272b33 !important;
}

.api-key-created-popup .swal2-confirm.is-copied {
    background: #16a34a !important;
}

.api-key-created-popup .swal2-close {
    top: 23px;
    right: 24px;
    width: 32px;
    height: 32px;
    color: #111827;
    font-size: 28px;
    line-height: 32px;
}

.api-key-created-popup .swal2-close:hover {
    color: #111827;
}

@media (max-width: 575.98px) {
    .api-key-created-popup {
        border-radius: 22px;
    }

    .api-key-created-popup .swal2-title {
        padding: 22px 20px 6px;
        font-size: 18px;
    }

    .api-key-created-popup .swal2-content {
        padding: 8px 20px 0;
    }

    .api-key-created-popup .swal2-actions {
        padding: 20px 20px 22px;
    }

    .api-key-created-popup .swal2-styled {
        min-width: 82px;
        height: 42px;
        padding: 0 18px;
        line-height: 42px;
    }

    .api-key-created-popup .swal2-close {
        top: 18px;
        right: 16px;
    }
}

.ip-rule-popup {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .2);
}

.ip-rule-popup .swal2-title {
    margin: 0;
    padding: 25px 28px 8px;
    color: #080b12;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
}

.ip-rule-popup .swal2-content {
    padding: 10px 28px 0;
    text-align: left;
}

.ip-rule-content {
    text-align: left;
}

.ip-rule-scope-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 18px;
    padding: 11px 13px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #eff6ff;
    color: #36516f;
    font-size: 12px;
    line-height: 1.55;
}

.ip-rule-scope-note i {
    margin-top: 3px;
    color: #2563eb;
}

.ip-rule-scope-note strong {
    color: #1e3a5f;
    font-weight: 600;
}

.ip-rule-field + .ip-rule-field {
    margin-top: 18px;
}

.ip-rule-field label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
}

.ip-rule-field label span {
    padding: 2px 6px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 10px;
    font-weight: 500;
}

.ip-rule-field textarea {
    display: block;
    width: 100%;
    min-height: 96px;
    box-sizing: border-box;
    padding: 11px 12px;
    resize: vertical;
    border: 1.5px solid #e1e5eb;
    border-radius: 10px;
    outline: none;
    background: #f8fafc;
    color: #111827;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.55;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.ip-rule-field textarea:focus {
    border-color: #1e78ff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 120, 255, .08);
}

.ip-rule-field p {
    margin: 6px 0 0;
    color: #8a94a3;
    font-size: 11px;
    line-height: 1.5;
}

.ip-rule-popup .swal2-actions {
    justify-content: flex-end;
    width: auto;
    margin: 0;
    padding: 22px 28px 25px;
    gap: 12px;
}

.ip-rule-popup .swal2-styled {
    min-width: 88px;
    height: 42px;
    margin: 0;
    padding: 0 20px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 500;
    line-height: 42px;
    box-shadow: none !important;
}

.ip-rule-popup .swal2-cancel {
    order: 1;
    border: 1px solid #dfe2e7;
    background: #fff !important;
    color: #080b12;
}

.ip-rule-popup .swal2-confirm {
    order: 2;
    background: #101217 !important;
    color: #fff;
}

.ip-rule-popup .swal2-confirm:hover {
    background: #272b33 !important;
}

.ip-rule-popup .swal2-close {
    top: 22px;
    right: 24px;
    width: 32px;
    height: 32px;
    color: #111827;
    font-size: 28px;
    line-height: 32px;
}

.ip-rule-popup .swal2-close:hover {
    color: #111827;
}

.ip-rule-popup .swal2-validation-message {
    margin: 16px 28px 0;
    border-radius: 8px;
    font-size: 12px;
}

@media (max-width: 575.98px) {
    .ip-rule-popup {
        border-radius: 20px;
    }

    .ip-rule-popup .swal2-title {
        padding: 21px 20px 6px;
        font-size: 18px;
    }

    .ip-rule-popup .swal2-content {
        padding: 9px 20px 0;
    }

    .ip-rule-popup .swal2-actions {
        padding: 20px 20px 22px;
    }

    .ip-rule-popup .swal2-close {
        top: 17px;
        right: 16px;
    }

    .ip-rule-popup .swal2-validation-message {
        margin-right: 20px;
        margin-left: 20px;
    }
}
