/* ==========================================================================
   Ramon Connect - Citizen Registration Responsive CSS
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, #eef3ff 0%, #eff6ff 100%);
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page Layout */
.auth-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Main Card Container */
.auth-card {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 0;
    border-radius: 28px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 30px 90px -10px rgba(15, 23, 42, 0.12), 0 10px 25px -5px rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Left & Right Columns */
.auth-left,
.auth-right {
    padding: 44px;
    min-width: 0;
}

.auth-left {
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

/* Brand Header */
.brand-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-text {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 0.85rem;
}

/* Form Header */
.form-header h1 {
    margin: 0 0 10px;
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.form-header p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Form Elements */
.register-form {
    margin-top: 24px;
    width: 100%;
}

.form-step h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}

.form-step > p {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Grid & Flex Rows */
.flex-gap-20 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 0;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.flex-gap-10-wrap {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.form-group-address {
    margin-bottom: 0 !important;
}

.label-center {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
    min-width: 0;
    width: 100%;
}

label {
    margin-bottom: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 13px 15px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.15);
    background: #ffffff;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

/* Password with Toggle Icon */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-with-icon input {
    padding-right: 46px;
}

.toggle-password-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 8px;
    width: auto;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.toggle-password-btn:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.05);
}

/* Checkbox Row */
.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-row label {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
}

.checkbox-row a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.checkbox-row a:hover {
    text-decoration: underline;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
    border-radius: 2px;
    transition: all 0.4s ease;
}

.step-indicator.step2-active::before {
    background: linear-gradient(90deg, #10b981 0%, #2563eb 100%);
}

.step {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 3px solid #ffffff;
    position: relative;
    z-index: 2;
}

.step.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.step.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

/* Vulnerability Section */
.vulnerability-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 14px;
    margin: 20px 0;
    border-left: 4px solid #2563eb;
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.vulnerability-section h4 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
}

.vulnerability-section p {
    margin: 0 0 16px;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.5;
}

.vulnerability-section small {
    display: block;
    margin-top: 5px;
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.35;
}

/* Action Buttons & Navigation */
.button-row {
    display: flex;
    gap: 14px;
    margin-top: 28px;
    align-items: center;
}

.next-btn,
.back-btn,
.register-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    line-height: 1;
}

.next-btn {
    width: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.next-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.back-btn {
    flex: 1;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.back-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.register-btn {
    flex: 2;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.register-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.sign-in-text {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #64748b;
    text-align: center;
}

.sign-in-text a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
}

.sign-in-text a:hover {
    text-decoration: underline;
}

/* Error Banner */
.error-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 8px;
    font-size: 0.82rem;
    color: #dc2626;
    font-weight: 500;
}

.error-banner .material-symbols-outlined {
    font-size: 18px;
    color: #dc2626;
    flex-shrink: 0;
}

/* Right-Side Showcase Panel */
.auth-right {
    background: linear-gradient(145deg, #1e3a8a 0%, #2563eb 50%, #1d4ed8 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-right::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-right::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -40px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: 0.98rem;
    line-height: 1.7;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
}

.feature-list {
    position: relative;
    z-index: 1;
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(8px);
}

.feature-item .material-symbols-outlined {
    font-size: 26px;
    color: #93c5fd;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-item h4 {
    margin: 0 0 4px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff;
}

.feature-item p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.84rem;
    line-height: 1.5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    padding: 24px 16px;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: min(680px, 100%);
    margin: auto;
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25);
    position: relative;
    max-height: 88vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 26px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    border-radius: 6px;
    padding: 2px 6px;
}

.close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.modal-content h2 {
    margin-top: 0;
    font-size: 1.45rem;
    color: #0f172a;
    padding-right: 32px;
}

.modal-update {
    color: #64748b;
    margin-top: -6px;
    margin-bottom: 18px;
    font-size: 0.84rem;
}

.modal-content h3 {
    margin-top: 20px;
    font-size: 1.05rem;
    color: #1e293b;
}

.modal-content p {
    color: #475569;
    line-height: 1.65;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.agree-btn,
.disagree-btn {
    border: none;
    border-radius: 12px;
    padding: 12px 22px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    flex: 1;
}

.agree-btn {
    background: #2563eb;
    color: #ffffff;
}

.agree-btn:hover {
    background: #1d4ed8;
}

.disagree-btn {
    background: #e2e8f0;
    color: #1e293b;
}

.disagree-btn:hover {
    background: #cbd5e1;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet and Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
    .auth-card {
        grid-template-columns: 1fr;
        max-width: 680px;
        border-radius: 24px;
    }

    .auth-left,
    .auth-right {
        padding: 36px 32px;
    }

    .auth-right {
        border-top: 1px solid rgba(226, 232, 240, 0.2);
    }

    .feature-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 12px;
    }
}

/* Medium Mobile & Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
    .auth-page {
        padding: 24px 14px;
    }

    .auth-left,
    .auth-right {
        padding: 30px 22px;
    }

    .form-header h1 {
        font-size: 1.55rem;
    }

    .flex-gap-20 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .flex-gap-10-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }
}

/* Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
    .auth-page {
        padding: 12px 8px;
        align-items: flex-start;
    }

    .auth-card {
        border-radius: 18px;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    }

    .auth-left,
    .auth-right {
        padding: 24px 16px;
    }

    .brand-bar {
        margin-bottom: 20px;
        gap: 10px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .brand-name {
        font-size: 1.1rem;
    }

    .form-header h1 {
        font-size: 1.35rem;
    }

    .form-header p {
        font-size: 0.85rem;
    }

    .flex-gap-10-wrap {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .step-indicator {
        margin-bottom: 20px;
        gap: 14px;
    }

    .step {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    .step-indicator::before {
        width: 70px;
    }

    input,
    select,
    textarea {
        padding: 12px 14px;
        font-size: 0.92rem;
        border-radius: 10px;
    }

    .button-row {
        flex-direction: column-reverse;
        gap: 10px;
        margin-top: 20px;
    }

    .button-row .back-btn,
    .button-row .register-btn,
    .button-row .next-btn {
        width: 100%;
        flex: unset;
        padding: 14px 18px;
    }

    .hero-content h2 {
        font-size: 1.45rem;
    }

    .modal-content {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .modal-buttons {
        flex-direction: column;
        gap: 8px;
    }
}
