:root {
    --cr-primary: #1e3c72;
    --cr-secondary: #2a5298;
    --cr-bg: #eef2f8;
    --cr-border: #e3e8f0;
    --cr-text: #2c3e50;
    --cr-muted: #6c757d;
    --cr-success: #10b981;
    --cr-warning: #f59e0b;
}

* { box-sizing: border-box; }

body.cr-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--cr-bg);
    color: var(--cr-text);
}

.cr-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.cr-promo-bar {
    background: linear-gradient(90deg, #059669, #10b981);
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 600;
}

.cr-promo-bar i {
    margin-right: 6px;
}

.cr-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 32px;
}

.cr-card {
    width: 100%;
    max-width: 980px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(30, 60, 114, 0.12);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
}

.cr-brand {
    background: linear-gradient(145deg, var(--cr-primary) 0%, var(--cr-secondary) 55%, #1a6b4a 100%);
    color: #fff;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.cr-brand__decor {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(16, 185, 129, 0.25) 0%, transparent 40%);
    pointer-events: none;
}

.cr-brand__inner {
    position: relative;
    z-index: 1;
}

.cr-brand__logo {
    width: 120px;
    height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.cr-brand h1 {
    margin: 0 0 12px;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.25;
}

.cr-brand > .cr-brand__inner > p,
.cr-brand__inner > p.cr-brand__lead {
    margin: 0 0 24px;
    opacity: 0.92;
    font-size: 0.95rem;
    line-height: 1.55;
}

.cr-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cr-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 500;
}

.cr-features li i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.cr-form-wrap {
    padding: 36px 32px 32px;
}

.cr-form-wrap h2 {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--cr-text);
}

.cr-form-wrap > p {
    margin: 0 0 24px;
    font-size: 0.88rem;
    color: var(--cr-muted);
}

.cr-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.cr-field {
    margin-bottom: 0;
}

.cr-field--full {
    grid-column: 1 / -1;
}

.cr-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cr-muted);
    margin-bottom: 8px;
}

.cr-field label i {
    margin-right: 5px;
    color: var(--cr-secondary);
}

.cr-field label .cr-required {
    color: #ef4444;
}

.cr-input,
.cr-field input.form-control,
.cr-field input[type="text"],
.cr-field input[type="email"],
.cr-field input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 2px solid var(--cr-border);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--cr-text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.cr-input:focus,
.cr-field input:focus {
    outline: none;
    border-color: var(--cr-secondary);
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.12);
}

.cr-password-row {
    display: flex;
    gap: 8px;
}

.cr-password-row input {
    flex: 1;
    min-width: 0;
}

.cr-btn-eye {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    padding: 0;
    border: 2px solid var(--cr-border);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--cr-muted);
    font-size: 1.05rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.cr-btn-eye:hover {
    border-color: var(--cr-secondary);
    color: var(--cr-secondary);
}

.cr-btn-eye i {
    pointer-events: none;
    line-height: 1;
}

.cr-field .iti {
    width: 100%;
    display: block;
}

.cr-field .iti input[type="tel"] {
    width: 100% !important;
    height: 48px !important;
    min-height: 48px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-right: 14px !important;
    border: 2px solid var(--cr-border) !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    color: var(--cr-text);
    background: #fff !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.cr-field .iti input[type="tel"]:focus {
    outline: none;
    border-color: var(--cr-secondary) !important;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.12);
}

.cr-field .iti .iti__selected-flag {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 10px 0 12px;
    background: #f8fafc;
    border-radius: 8px 0 0 8px;
    border-right: 1px solid var(--cr-border);
}

.cr-field .iti .iti__selected-dial-code {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cr-text);
    margin-left: 6px;
}

.cr-field .iti .iti__country-list {
    z-index: 30;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.cr-invalid-link {
    text-align: center;
    padding: 24px 8px 8px;
}

.cr-invalid-link__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.cr-invalid-link h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--cr-text);
    margin-bottom: 12px;
}

.cr-invalid-link p {
    color: var(--cr-muted);
    max-width: 420px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.cr-notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid var(--cr-warning);
    border-radius: 10px;
    padding: 12px 14px;
    margin: 20px 0;
    font-size: 0.82rem;
    color: #78350f;
    line-height: 1.45;
}

.cr-notice i {
    color: #b45309;
    margin-top: 2px;
}

.cr-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.cr-btn--primary {
    color: #fff;
    background: linear-gradient(45deg, var(--cr-primary), var(--cr-secondary));
    box-shadow: 0 4px 14px rgba(30, 60, 114, 0.3);
}

.cr-btn--primary:hover {
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

.cr-btn--secondary {
    color: var(--cr-primary);
    background: #fff;
    border: 2px solid var(--cr-border);
}

.cr-btn--secondary:hover {
    border-color: var(--cr-secondary);
    color: var(--cr-secondary);
    text-decoration: none;
}

.cr-btn.is-loading {
    opacity: 0.75;
    pointer-events: none;
}

.cr-footer-link {
    text-align: center;
    margin-top: 16px;
    font-size: 0.82rem;
    color: var(--cr-muted);
}

.cr-footer-link a {
    color: var(--cr-secondary);
    font-weight: 600;
}

/* Modals */
.cr-modal .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.cr-modal .modal-header {
    border: none;
    padding: 18px 22px;
}

.cr-modal .modal-header.bg-success,
.cr-modal .modal-header.bg-danger {
    color: #fff;
}

.cr-modal .modal-header .close {
    color: inherit;
    opacity: 0.9;
    text-shadow: none;
}

.cr-modal .modal-body {
    padding: 28px 24px;
    text-align: center;
}

.cr-modal__icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.cr-modal__icon--success { color: var(--cr-success); }
.cr-modal__icon--danger { color: #ef4444; }

.cr-modal .modal-footer {
    border-top: 1px solid var(--cr-border);
    justify-content: center;
    padding: 14px 20px;
}

@media (max-width: 767.98px) {
    .cr-card {
        grid-template-columns: 1fr;
        border-radius: 16px;
    }

    .cr-brand {
        padding: 28px 24px;
        text-align: center;
    }

    .cr-brand__logo {
        width: 90px;
        margin-left: auto;
        margin-right: auto;
    }

    .cr-brand h1 {
        font-size: 1.4rem;
    }

    .cr-features {
        display: none;
    }

    .cr-form-wrap {
        padding: 24px 20px 28px;
    }

    .cr-form-grid {
        grid-template-columns: 1fr;
    }

    .cr-field--full {
        grid-column: auto;
    }
}

@media (max-width: 479.98px) {
    .cr-main {
        padding: 16px 12px 24px;
    }

    .cr-promo-bar {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}
