/**
 * Healthcare24 - Authentication Pages Styles
 * Custom branded styles for login, register, forgot password, reset password
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --auth-primary: #5BB5C5;
    --auth-primary-dark: #4A9BA9;
    --auth-accent: #F5A623;
    --auth-text: #333333;
    --auth-text-light: #666666;
    --auth-text-muted: #999999;
    --auth-bg: #F8F9FA;
    --auth-card-bg: #FFFFFF;
    --auth-border: #E2E8F0;
    --auth-border-focus: #5BB5C5;
    --auth-error: #E53E3E;
    --auth-success: #48BB78;
}

/* ========================================
   Auth Page Wrapper (Inside Shop Layout)
   ======================================== */
.auth-page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 300px);
    padding: 40px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

@media (min-width: 768px) {
    .auth-page-wrapper {
        padding: 60px 20px;
        min-height: calc(100vh - 400px);
    }
}

/* ========================================
   Auth Page Body (Standalone - deprecated)
   ======================================== */
body.auth-page {
    background-color: var(--auth-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========================================
   Auth Header (Simplified)
   ======================================== */
.auth-header {
    background: #fff;
    border-bottom: 1px solid var(--auth-border);
    padding: 16px 0;
}

.auth-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.auth-header .logo img {
    height: 50px;
    width: auto;
}

.auth-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
}

.auth-phone:hover {
    color: var(--auth-primary-dark);
}

.auth-phone svg {
    stroke: currentColor;
}

/* ========================================
   Auth Main Content
   ======================================== */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

/* ========================================
   Auth Card
   ======================================== */
.auth-card {
    background: var(--auth-card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 420px;
    padding: 32px;
}

@media (min-width: 768px) {
    .auth-card {
        padding: 40px;
    }
}

/* ========================================
   Auth Logo (Inside Card)
   ======================================== */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.auth-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--auth-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-logo-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2.5;
    stroke-linecap: round;
}

.auth-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-logo-text span {
    color: var(--auth-primary);
}

/* ========================================
   Auth Title
   ======================================== */
.auth-title {
    text-align: center;
    margin-bottom: 8px;
}

.auth-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0;
}

.auth-subtitle {
    text-align: center;
    color: var(--auth-text-light);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

/* ========================================
   Auth Form
   ======================================== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form Group */
.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Form Row (side by side) */
.auth-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 480px) {
    .auth-form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Labels */
.auth-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-text);
}

.auth-label-optional {
    font-weight: 400;
    color: var(--auth-text-muted);
    font-size: 0.8rem;
}

/* ========================================
   Auth Input Fields
   ======================================== */
.auth-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--auth-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--auth-text);
    background: #FAFBFC;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

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

.auth-input:focus {
    outline: none;
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px rgba(91, 181, 197, 0.12);
    background: #fff;
}

.auth-input.error {
    border-color: var(--auth-error);
}

.auth-input.error:focus {
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12);
}

/* ========================================
   Auth Checkbox
   ======================================== */
.auth-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.auth-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--auth-border);
    border-radius: 6px;
    appearance: none;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s;
    position: relative;
}

.auth-checkbox:checked {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 181, 197, 0.2);
}

.auth-checkbox-label {
    font-size: 0.9rem;
    color: var(--auth-text-light);
    line-height: 1.5;
}

.auth-checkbox-label a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
}

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

/* ========================================
   Auth Remember & Forgot Row
   ======================================== */
.auth-remember-forgot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

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

.auth-forgot-link:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

/* ========================================
   Auth Buttons
   ======================================== */
.auth-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn-primary {
    background: var(--auth-primary);
    color: white;
}

.auth-btn-primary:hover {
    background: var(--auth-primary-dark);
}

.auth-btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 181, 197, 0.3);
}

.auth-btn-secondary {
    background: transparent;
    color: var(--auth-primary);
    border: 2px solid var(--auth-primary);
}

.auth-btn-secondary:hover {
    background: var(--auth-primary);
    color: white;
}

/* ========================================
   Auth Divider
   ======================================== */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-divider span {
    font-size: 0.875rem;
    color: var(--auth-text-muted);
}

/* ========================================
   Auth Link Section
   ======================================== */
.auth-link-section {
    text-align: center;
    color: var(--auth-text-light);
    font-size: 0.95rem;
}

.auth-link-section a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-link-section a:hover {
    text-decoration: underline;
}

/* ========================================
   Auth Back Link
   ======================================== */
.auth-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: 2px solid var(--auth-border);
    border-radius: 10px;
    color: var(--auth-text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    margin-top: 16px;
}

.auth-back-link:hover {
    border-color: var(--auth-primary);
    color: var(--auth-primary);
}

.auth-back-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* ========================================
   Auth Error Messages
   ======================================== */
.auth-error {
    color: var(--auth-error);
    font-size: 0.85rem;
    margin-top: 4px;
}

.auth-error ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ========================================
   Auth Status Message (Success)
   ======================================== */
.auth-status {
    background: rgba(72, 187, 120, 0.1);
    border: 1px solid var(--auth-success);
    border-radius: 10px;
    padding: 12px 16px;
    color: #276749;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ========================================
   Auth Info Box
   ======================================== */
.auth-info-box {
    background: rgba(91, 181, 197, 0.08);
    border: 1px solid rgba(91, 181, 197, 0.2);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.auth-info-box svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    stroke: var(--auth-primary);
}

.auth-info-box p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--auth-text-light);
    line-height: 1.5;
}

/* ========================================
   Auth Icon (for forgot/reset pages)
   ======================================== */
.auth-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background: rgba(91, 181, 197, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--auth-primary);
}

/* ========================================
   Auth Footer
   ======================================== */
.auth-footer {
    background: #fff;
    border-top: 1px solid var(--auth-border);
    padding: 20px 0;
    text-align: center;
}

.auth-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.auth-footer p {
    margin: 0;
    color: var(--auth-text-muted);
    font-size: 0.875rem;
}

/* ========================================
   Trust Badges
   ======================================== */
.auth-trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    color: var(--auth-text-muted);
}

.auth-trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
}

.auth-trust-badge svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 480px) {
    .auth-card {
        padding: 24px;
        border-radius: 12px;
    }

    .auth-title h1 {
        font-size: 1.5rem;
    }

    .auth-logo-text {
        font-size: 1.25rem;
    }

    .auth-remember-forgot {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-phone span {
        display: none;
    }
}