.demo-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    padding: 16px;
    box-sizing: border-box;
}
.demo-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}
.demo-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.demo-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 660px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    z-index: 1;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}
.demo-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 34px; height: 34px;
    font-size: 14px;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.demo-modal-close:hover { background: var(--primary-600, #6032ac); color: #fff; }
.demo-modal-inner { padding: 44px 44px 40px; }
.demo-modal-header { text-align: center; margin-bottom: 28px; }
.demo-modal-logo   { height: 38px; width: auto; margin-bottom: 18px; }
.demo-modal-header h2 { font-size: 24px; font-weight: 700; color: #111; margin-bottom: 6px; }
.demo-modal-header p  { color: #777; font-size: 14px; }
.demo-form-row   { display: flex; gap: 16px; }
.demo-form-group { flex: 1; margin-bottom: 16px; display: flex; flex-direction: column; }
.demo-form-group label { font-size: 13px; font-weight: 600; color: #444; margin-bottom: 5px; }
.demo-form-group label span { color: var(--primary-600, #6032ac); }
.demo-form-group input {
    border: 1.5px solid #e5e5e5;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    background: #fafafa;
    box-sizing: border-box;
}
.demo-form-group input:focus { border-color: var(--primary-600, #6032ac); background: #fff; }
.demo-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-600, #6032ac), var(--primary-700, #4e2890));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 6px;
}
.demo-submit-btn:hover:not(:disabled) { opacity: 0.9; }
.demo-submit-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.demo-error {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff5f5;
    border: 1px solid #fca5a5;
    border-left: 3px solid #ef4444;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 13.5px;
    color: #b91c1c;
    animation: errorSlideIn 0.22s ease;
}
.demo-error i { flex-shrink: 0; font-size: 15px; }
@keyframes errorSlideIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}
.demo-success { text-align: center; padding: 0; }
.demo-success-icon {
    width: 120px; height: 120px;
    background: #e9f9f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 54px;
    color: #22c55e;
    margin: 0 auto;
}
.demo-success h3 { font-size: 24px; font-weight: 700; color: #111; margin-bottom: 10px; }
.demo-success p  { font-size: 16px; color: #555; margin: 0; }
@media (max-width: 767px) {
    .demo-modal { padding: 0; }
    .demo-modal.active { align-items: flex-start; }
    .demo-modal-content {
        width: 100vw; max-width: 100vw;
        height: 100vh; max-height: 100vh;
        border-radius: 0; overflow-y: auto;
    }
    .demo-modal-inner  { padding: 52px 20px 32px; }
    .demo-modal-header h2 { font-size: 20px; }
    .demo-form-row { flex-direction: column; gap: 0; }
}
