/* ============================================
   FRONTPAGES SHARED CSS — JOE Zenith HCIS
   Used by: login, signup, register_company,
            verify_otp, subscribe
   Mobile-first, no Bootstrap dependency
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', Arial, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #4f2d9e 0%, #7c3aed 50%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
}

/* ============ BLOBS ============ */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}
.blob-1 {
    width: 380px; height: 380px;
    background: rgba(255,255,255,0.07);
    top: -100px; left: -100px;
}
.blob-2 {
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.05);
    bottom: -80px; right: -80px;
}

/* ============ LAYOUT ============ */
.page-wrapper {
    width: 100%;
    max-width: 860px;
    position: relative;
    z-index: 1;
}

.card-container {
    display: flex;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.28);
    background: white;
}

/* ============ LEFT PANEL ============ */
.left-panel {
    flex: 0 0 38%;
    background: linear-gradient(170deg, #1e1b4b 0%, #312e81 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 48px 32px;
}

.brand-logo {
    width: 150px;
    object-fit: contain;
    margin-bottom: 28px;
}

.left-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.left-desc {
    font-size: 13px;
    line-height: 1.7;
    opacity: 0.8;
    max-width: 240px;
    margin-bottom: 24px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 220px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    opacity: 0.9;
    text-align: left;
}

.feature-item i {
    color: #a5f3fc;
    font-size: 10px;
    flex-shrink: 0;
    width: 14px;
}

/* ============ RIGHT PANEL ============ */
.right-panel {
    flex: 1;
    background: white;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 44px;
    overflow-y: auto;
}

.form-box {
    width: 100%;
    max-width: 360px;
}

.form-header {
    margin-bottom: 24px;
    text-align: center;
}

.form-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 13px;
    color: #6b7280;
}

/* ============ ALERTS ============ */
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #991b1b;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #166534;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* ============ FORM FIELDS ============ */
.field-group {
    margin-bottom: 16px;
}

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

.field-label i {
    color: #4f2d9e;
    margin-right: 3px;
    font-size: 11px;
}

.req { color: #ef4444; margin-left: 2px; }

/* Universal input styling — targets Django form-control AND bare inputs */
.field-group input,
.field-group textarea,
.field-group select,
.field-group .form-control {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #111827;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: 'Inter', Arial, sans-serif;
    appearance: none;
    -webkit-appearance: none;
    line-height: 1.4;
}

.field-group textarea {
    resize: vertical;
    min-height: 80px;
}

.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus,
.field-group .form-control:focus {
    border-color: #4f2d9e;
    box-shadow: 0 0 0 3px rgba(79, 45, 158, 0.12);
}

.field-group input::placeholder,
.field-group textarea::placeholder { color: #9ca3af; }

.field-error {
    display: block;
    font-size: 11px;
    color: #dc2626;
    margin-top: 4px;
}

.form-hint {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Password field */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 42px;
}

.toggle-pw {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}
.toggle-pw:hover { color: #4f2d9e; }

/* ============ PRIMARY BUTTON ============ */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #4f2d9e, #7c3aed);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', Arial, sans-serif;
    margin-top: 4px;
}

.btn-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(79,45,158,0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============ DIVIDER ============ */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    font-size: 12px;
    color: #9ca3af;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* ============ FOOTER LINKS ============ */
.footer-note {
    margin-top: 18px;
    text-align: center;
}

.footer-note a {
    color: #4f2d9e;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.footer-note a:hover { text-decoration: underline; }

/* ============================================
   RESPONSIVE — Mobile First
   (correct font sizes, no crazy px values)
   ============================================ */

@media (max-width: 840px) {
    body {
        padding: 16px;
        align-items: flex-start;
    }

    .card-container {
        flex-direction: column;
        border-radius: 20px;
    }

    .left-panel {
        flex: none;
        width: 100%;
        padding: 28px 24px;
    }

    .brand-logo  { width: 120px; margin-bottom: 14px; }
    .left-title  { font-size: 16px; }
    .left-desc   { font-size: 12px; margin-bottom: 0; max-width: 100%; }
    .feature-list{ display: none; }

    .right-panel {
        padding: 28px 24px 36px;
        overflow-y: visible;
    }

    .form-box { max-width: 100% !important; }

    .form-title    { font-size: 22px; }
    .form-subtitle { font-size: 13px; }

    /* Prevent iOS auto-zoom on input focus (min 16px) */
    .field-group input,
    .field-group textarea,
    .field-group select,
    .field-group .form-control {
        font-size: 16px;
        padding: 12px 14px;
    }

    .btn-primary { font-size: 15px; padding: 14px; }
}

@media (max-width: 480px) {
    .left-panel { display: none; }

    .right-panel { padding: 32px 18px 40px; }

    .form-title { font-size: 22px; }
    .blob       { display: none; }
}
