.popup-container {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.45);
    font-family: "Segoe UI", Arial, sans-serif;
}

.popup-container.show {
    display: flex;
}

.popup-form {
    width: 300px;
    max-width: 92vw;
    max-height: 88vh;
    overflow: visible;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.35);
    padding: 24px 18px 18px;
    position: relative;
}

.popup-form .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 18px;
    cursor: pointer;
}

.popup-form h2 {
    margin: 0 0 16px;
    text-align: center;
    font-size: 30px;
    line-height: 1.2;
    color: #0f172a;
    text-decoration: underline;
}

.popup-form .form-row {
    margin-bottom: 12px;
}

.popup-form .floating-group,
.popup-form .custom-select-group {
    position: relative;
    width: 100%;
}

.popup-form .floating-group input,
.popup-form .floating-group textarea,
.popup-form .custom-select {
    width: 100%;
    height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    padding: 14px 12px 6px;
    font-size: 14px;
    color: #111827;
    box-sizing: border-box;
}

.popup-form .floating-group textarea {
    min-height: 90px;
    height: auto;
    resize: vertical;
    padding-top: 18px;
}

.popup-form .floating-group input:focus,
.popup-form .floating-group textarea:focus,
.popup-form .custom-select.open {
    border-color: #2563eb;
    outline: none;
}

.popup-form .floating-labels {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 5px;
    border-radius: 5px;
    font-size: 13px;
    color: #6b7280;
    background: #fff;
    z-index: 2;
    pointer-events: none;
    transition: all .2s ease;
}

.popup-form .custom-select-group .floating-labels {
    top: 50%;
    transform: translateY(-50%);
}

.popup-form .floating-group.focused .floating-labels,
.popup-form .custom-select-group.focused .floating-labels,
.popup-form .custom-select-group.has-value .floating-labels,
.popup-form .floating-group input:focus + .floating-labels,
.popup-form .floating-group textarea:focus + .floating-labels {
    top: -1px;
    transform: translateY(-50%);
    color: #1d4ed8;
}

.popup-form .custom-select {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding-right: 32px;
}

.popup-form .custom-select::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    transform: translateY(-60%) rotate(45deg);
    pointer-events: none;
}

.popup-form .selected-text {
    width: 100%;
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popup-form .selected-text.selected {
    color: #111827;
}

.popup-form .options {
    list-style: none;
    margin: 4px 0 0;
    padding: 4px 0;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(2, 6, 23, .18);
    display: none;
    z-index: 50;
}

.popup-form .custom-select.open .options {
    display: block;
}

.popup-form .options li {
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
}

.popup-form .options li:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.popup-form .form-status {
    min-height: 20px;
    margin: 8px 0 4px;
    text-align: center;
    font-size: 13px;
}

.popup-form .success-msg {
    color: #047857;
    font-weight: 600;
}

.popup-form .error-msg {
    color: #b91c1c;
    font-weight: 600;
}

.popup-form button[type="submit"] {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: #3A996E;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-form button[type="submit"]:hover {
    background: #2b7654;
}

.popup-form button[type="submit"]:disabled {
    opacity: .85;
    cursor: not-allowed;
}

.popup-form .btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s ease, visibility .15s ease;
}

.popup-form .loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    margin-left: -9px;
    border: 2px solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: popup-spin .8s linear infinite;
    display: none;
}

.popup-form button[type="submit"].is-loading .btn-text {
    opacity: 0;
    visibility: hidden;
}

.popup-form button[type="submit"].is-loading .loader {
    display: block !important;
}

@keyframes popup-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 360px) {
    .popup-form {
        width: 92vw;
    }
}