/* LogBinary Chatbot - Premium Auth UI
   Shared Styles for Login / Register / Forgot / Reset / Set Password
   Light Theme Only */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ---- Reset ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Background */
    --bg-deep: #F0F2F5;
    --bg-card: #FFFFFF;
    --bg-input: #F7F8FA;
    /* Borders */
    --border-subtle: #E2E5EA;
    --border-hover: #CBD0D8;
    /* Primary */
    --primary: #4267ff;
    --primary-hover: #667eea;
    --primary-glow: rgba(13, 67, 148, 0.15);
    /* Accent */
    --accent: #EA580C;
    --accent-glow: rgba(234, 88, 12, 0.12);
    /* Status */
    --success: #16A34A;
    --success-bg: rgba(22, 163, 74, 0.08);
    --success-border: rgba(22, 163, 74, 0.25);
    --error: #DC2626;
    --error-bg: rgba(220, 38, 38, 0.06);
    --error-border: rgba(220, 38, 38, 0.25);
    /* Text */
    --text-primary: #1A1D27;
    --text-secondary: #4B5563;
    --text-muted: #6B7280;
    /* Misc */
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    /* Side panel */
    --side-bg-from: #4267ff;
    --side-bg-to: #4267ff;
    --side-border: var(--border-subtle);
    --side-glow-primary: rgba(13, 148, 136, 0.06);
    --side-glow-accent: rgba(234, 88, 12, 0.04);
    --decor-circle-primary: rgba(13, 148, 136, 0.10);
    --decor-circle-accent: rgba(234, 88, 12, 0.07);
    --decor-line-primary: rgba(13, 148, 136, 0.12);
    --decor-line-accent: rgba(234, 88, 12, 0.08);
    /* Shadow */
    --card-shadow-1: rgba(0, 0, 0, 0.06);
    --card-shadow-2: rgba(0, 0, 0, 0.10);
    /* Alert text */
    --alert-error-text: #B91C1C;
    --alert-success-text: #15803D;
    /* Error message text */
    --error-msg-text: #DC2626;
    /* Modal overlay */
    --modal-overlay: rgba(0, 0, 0, 0.35);
    --modal-shadow: rgba(0, 0, 0, 0.15);
    /* Loader */
    --loader-bg: var(--bg-deep);
    /* Info box */
    --info-box-bg: rgba(13, 148, 136, 0.06);
    --info-box-border: rgba(13, 148, 136, 0.15);
    --info-box-text: #0F766E;
    /* Body gradient */
    --body-grad-1: rgba(13, 148, 136, 0.04);
    --body-grad-2: rgba(234, 88, 12, 0.02);
    --body-grad-3: rgba(13, 148, 136, 0.02);
    /* Scrollbar */
    --scrollbar-track: var(--bg-deep);
    --scrollbar-thumb: var(--border-hover);
    --scrollbar-thumb-hover: var(--text-muted);
    /* Select option */
    --option-bg: var(--bg-card);
    --option-text: var(--text-primary);
    /* Spinner on btn */
    --spinner-border: rgba(255, 255, 255, 0.3);
    --spinner-top: #FFFFFF;
    /* Checkbox */
    --checkbox-accent: var(--primary);
    /* Color scheme for native elements */
    color-scheme: light;
}



/* ---- Body ---- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, var(--body-grad-1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, var(--body-grad-2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, var(--body-grad-3) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ---- Auth Layout Wrapper ---- */
.auth-wrapper {
    display: flex;
    width: 100%;
    max-width: 960px;
    min-height: 580px;
    max-height: 95vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px var(--border-subtle),
        0 25px 80px -12px var(--card-shadow-1),
        0 0 60px -20px var(--primary-glow);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
    transition: box-shadow var(--transition);
}

/* ---- Decorative Side Panel ---- */
.auth-side-panel {
    flex: 0 0 380px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    border-right: 1px solid var(--side-border);
    transition: background var(--transition), border-color var(--transition);
}

.auth-side-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 40%, var(--side-glow-primary) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, var(--side-glow-accent) 0%, transparent 40%);
    animation: panelGlow 8s ease-in-out infinite alternate;
}

@keyframes panelGlow {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-5%, 5%) rotate(3deg); }
}

.side-panel-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Logo Container */
.side-panel-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 28px;

    /* Premium subtle glow (no background) */
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.25),
        0 0 40px rgba(255, 255, 255, 0.06);

    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Soft hover elevation */
.side-panel-logo:hover {
    transform: translateY(-4px);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.35),
        0 0 60px rgba(255, 255, 255, 0.08);
}

/* Logo Image */
.logo-img {
    width: 72%;
    height: auto;
    object-fit: contain;

    user-select: none;
    pointer-events: none;

    transition: transform 0.35s ease;
}

.side-panel-logo:hover .logo-img {
    transform: scale(1.04);
}

/* Product Name */
.side-panel-title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;

    color: #ffffff;

    text-align: center;
    margin-bottom: 0.5rem;

    /* Clean professional typography feel */
    font-family: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
}

.side-panel-subtitle {
    font-size: 0.9rem;
    color: rgb(255, 255, 255);
    line-height: 1.6;
    max-width: 280px;
    margin: 0 auto;
}

/* Decorative geometric elements */
.side-panel-decor {
    position: absolute;
    z-index: 0;
}

.decor-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 1px solid var(--decor-circle-primary);
    position: absolute;
}

.decor-circle-1 {
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
}

.decor-circle-2 {
    bottom: -40px;
    left: -40px;
    width: 140px;
    height: 140px;
    border-color: var(--decor-circle-accent);
}

.decor-line {
    position: absolute;
    width: 1px;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--decor-line-primary), transparent);
}

.decor-line-1 {
    top: 20%;
    right: 30%;
}

.decor-line-2 {
    bottom: 15%;
    left: 25%;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--decor-line-accent), transparent);
}

.decor-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.decor-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.4;
}

.decor-dot:nth-child(2) { opacity: 0.6; background: var(--primary); }
.decor-dot:nth-child(4) { opacity: 0.5; background: var(--accent); }

/* ---- Main Form Panel ---- */
.auth-form-panel {
    flex: 1;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    overflow-y: auto;
    transition: background var(--transition);
}

.auth-form-header {
    margin-bottom: 2rem;
}

.auth-form-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.auth-form-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ---- Alert Messages ---- */
.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    display: none;
    font-size: 0.875rem;
    line-height: 1.5;
    border-left: 3px solid transparent;
    animation: alertSlide 0.3s ease-out;
}

.alert.show {
    display: block;
}

.alert-error {
    background: var(--error-bg);
    color: var(--alert-error-text);
    border-left-color: var(--error);
}

.alert-success {
    background: var(--success-bg);
    color: var(--alert-success-text);
    border-left-color: var(--success);
}

@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Form Groups ---- */
.form-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.form-label {
    display: none; /* Hide the original labels */
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

.form-label i {
    margin-right: 0.4rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.form-label .required {
    color: var(--accent);
    margin-left: 2px;
}

/* Floating label styles */
.floating-label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    pointer-events: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    z-index: 1;
}

.floating-label i {
    font-size: 0.8rem;
    opacity: 0.7;
}

.form-input:focus + .floating-label,
.form-input.focused + .floating-label,
.form-input:not(:placeholder-shown) + .floating-label,
.form-input.has-value + .floating-label,
.phone-input:focus + .floating-label,
.phone-input.focused + .floating-label,
.phone-input:not(:placeholder-shown) + .floating-label,
.phone-input.has-value + .floating-label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.75rem;
    color: var(--primary);
    background: var(--bg-card);
    padding: 0 0.25rem;
    transform: translateY(0);
}

.password-input-wrapper .floating-label {
    left: 1rem;
}

.password-input-wrapper .form-input:focus + .floating-label,
.password-input-wrapper .form-input:not(:placeholder-shown) + .floating-label {
    left: 0.75rem;
}

/* Phone input specific floating label adjustments */
.phone-input-wrapper .floating-label {
    left: 1rem;
}

.phone-input-wrapper .phone-input:focus + .floating-label,
.phone-input-wrapper .phone-input:not(:placeholder-shown) + .floating-label {
    opacity: 1;
    left: 0.75rem;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-input);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.925rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: all var(--transition);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:hover {
    border-color: var(--border-hover);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px var(--error-bg);
}

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

.password-toggle {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.35rem;
    transition: color var(--transition);
    font-size: 0.9rem;
}

.password-toggle:hover {
    color: var(--text-secondary);
}

/* ---- Password Strength ---- */
.password-strength {
    margin-top: 0.5rem;
    height: 3px;
    background: var(--border-subtle);
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.4s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: var(--error);
}

.password-strength-bar.medium {
    width: 66%;
    background: var(--accent);
}

.password-strength-bar.strong {
    width: 100%;
    background: var(--success);
}

/* ---- Password Requirements ---- */
.password-requirements {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.password-requirements ul {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem 1rem;
}

.password-requirements li {
    padding: 0.2rem 0;
    transition: color var(--transition);
}

.password-requirements li i {
    margin-right: 0.4rem;
    width: 14px;
    font-size: 0.55rem;
    vertical-align: middle;
}

.password-requirements li.valid {
    color: var(--success);
}

.password-requirements li.valid i::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
}

/* ---- Error Messages ---- */
.error-message {
    color: var(--error-msg-text);
    font-size: 0.8rem;
    margin-top: 0.4rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* ---- Remember / Forgot Row ---- */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--checkbox-accent);
    border-radius: 3px;
}

.checkbox-wrapper label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color var(--transition);
}

.forgot-link:hover {
    color: var(--primary-hover);
}

/* ---- Buttons ---- */
.btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #0F766E 100%);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px var(--primary-glow);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---- Loading Spinner ---- */
.loading-spinner {
    border: 2.5px solid var(--spinner-border);
    border-top-color: var(--spinner-top);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.7s linear infinite;
}

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

/* ---- Divider ---- */
.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-subtle);
}

.divider span {
    background: var(--bg-card);
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.825rem;
    position: relative;
    z-index: 1;
}

/* ---- Links ---- */
.register-link,
.login-link,
.back-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.register-link a,
.login-link a,
.back-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition);
}

.register-link a:hover,
.login-link a:hover,
.back-link a:hover {
    color: var(--primary-hover);
}

.back-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ---- Info Box ---- */
.info-box {
    background: var(--info-box-bg);
    border: 1px solid var(--info-box-border);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
    color: var(--info-box-text);
    font-size: 0.85rem;
    line-height: 1.5;
}

.info-box i {
    margin-right: 0.5rem;
    opacity: 0.8;
}

/* ---- Phone Input Group ---- */
.phone-input-group {
    display: flex;
    gap: 0.5rem;
}

.isd-select-wrapper {
    position: relative;
    flex: 0 0 130px;
}

.isd-select {
    width: 100%;
    padding: 0.8rem 2.2rem 0.8rem 0.75rem;
    background: var(--bg-input);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: inherit;
    outline: none;
}

.isd-select::-webkit-scrollbar {
    width: 6px;
}

.isd-select::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 3px;
}

.isd-select::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

.isd-select::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.isd-select option {
    background: var(--option-bg);
    color: var(--option-text);
    padding: 8px;
}

.isd-select:hover {
    border-color: var(--border-hover);
}

.isd-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.isd-select-wrapper::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.phone-input-wrapper {
    flex: 1;
    position: relative;
}

.phone-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-input);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.925rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: all var(--transition);
    outline: none;
}

.phone-input::placeholder {
    color: var(--text-muted);
}

.phone-input:hover {
    border-color: var(--border-hover);
}

.phone-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.phone-input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px var(--error-bg);
}

.phone-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    display: block;
}

/* ---- Page Loader ---- */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--loader-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: background var(--transition);
}

.page-loader-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

/* ---- Success Modal ---- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-overlay);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 60px var(--modal-shadow);
}

.success-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.3);
}

.success-icon i {
    font-size: 2rem;
    color: white;
}

.modal-content h2 {
    color: var(--success);
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

.modal-content .email-highlight {
    color: var(--primary-hover);
    font-weight: 600;
}



/* ---- Animations ---- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* ---- Register page specific: scrollable body ---- */
.auth-form-panel.register-body-scroll {
    justify-content: flex-start;
    overflow-y: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.auth-form-panel.register-body-scroll .auth-form-header {
    margin-bottom: 1.25rem;
}

.auth-form-panel.register-body-scroll .form-group {
    margin-bottom: 1rem;
}

.auth-form-panel.register-body-scroll .login-link {
    margin-top: 1rem;
    padding-bottom: 0.5rem;
}

.auth-form-panel.register-body-scroll::-webkit-scrollbar {
    width: 5px;
}

.auth-form-panel.register-body-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.auth-form-panel.register-body-scroll::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
        max-width: 480px;
        min-height: auto;
        max-height: none;
        border-radius: 16px;
    }

    .auth-side-panel {
        flex: none;
        padding: 2rem 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }

    .side-panel-logo {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .side-panel-title {
        font-size: 1.25rem;
    }

    .side-panel-subtitle {
        font-size: 0.825rem;
    }

    .decor-circle,
    .decor-line,
    .decor-dots {
        display: none;
    }

    .auth-form-panel {
        padding: 2rem 1.5rem;
    }

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

    /* Register page on tablet: scrollable within the panel */
    .auth-form-panel.register-body-scroll {
        overflow-y: auto;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }


}

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

    .auth-wrapper {
        border-radius: 0;
        min-height: 100vh;
        max-height: none;
        box-shadow: none;
        overflow-y: auto;
    }

    .auth-side-panel {
        padding: 1.5rem 1rem;
    }

    .auth-form-panel {
        padding: 1.5rem 1.25rem;
    }

    /* Register page on mobile: allow natural flow, no cutting */
    .auth-form-panel.register-body-scroll {
        flex: 1 1 auto;
        overflow-y: visible;
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .phone-input-group {
        flex-direction: column;
    }

    .isd-select-wrapper {
        flex: 1;
    }

    .password-requirements ul {
        grid-template-columns: 1fr;
    }
}

.brand-logo {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    background: linear-gradient(135deg, #6C63FF, #3A8DFF);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}


/* ---- Utility ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}