/**
 * Auth Pages Styles
 * Applies to: /thanh-vien/dang-nhap (login), /thanh-vien/dang-ky (register)
 * Uses CSS variables from components.css
 */

/* ==========================================================================
   AUTH PAGE BACKGROUND
   ========================================================================== */

.auth-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 50%, #ede9fe 100%);
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    padding: 48px 0;
}

/* ==========================================================================
   AUTH CARD
   ========================================================================== */

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.auth-card__header {
    text-align: center;
    padding: 32px 32px 24px;
    background: linear-gradient(180deg, #fafafa 0%, white 100%);
    border-bottom: 1px solid var(--color-border-light);
}

.auth-card__logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #667eea 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 16px;
    box-shadow: 0 8px 16px rgba(22, 119, 255, 0.25);
}

.auth-card__eyebrow {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0 0 8px;
}

.auth-card__title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
    color: var(--color-text);
}

.auth-card__desc {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 8px 0 0;
}

.auth-card__body {
    padding: 32px;
}

/* ==========================================================================
   AUTH FORM
   ========================================================================== */

.auth-form .ant-form-item {
    margin-bottom: 20px;
}

.auth-form .ant-form-item-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
}

.auth-form .ant-form-item-required::before {
    content: '*';
    color: #ff4d4f;
    margin-right: 4px;
}

/* Input with Icon */
.input-with-icon {
    position: relative;
}

.input-with-icon .ant-input {
    padding-left: 44px;
}

.input-with-icon svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.ant-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    color: #1f2937;
    background: white;
    transition: all 0.2s ease;
}

.ant-input::placeholder {
    color: #9ca3af;
}

.ant-input:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.ant-input:hover {
    border-color: #14b8a6;
}

/* Remember & Forgot */
.auth-form__options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.auth-form__remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.auth-form__remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
}

.auth-form__remember span {
    font-size: 14px;
    color: var(--color-text-muted);
}

.auth-form__forgot {
    font-size: 14px;
    color: var(--color-primary);
    text-decoration: none;
}

.auth-form__forgot:hover {
    text-decoration: underline;
}

/* Terms Checkbox */
.auth-form__terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 20px;
}

.auth-form__terms input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

.auth-form__terms span {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.auth-form__terms a {
    color: var(--color-primary);
}

/* Submit Button */
.auth-form__submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
}

/* Divider */
.auth-card__divider {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-light);
}

.auth-card__divider p {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-muted);
}

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

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

/* ==========================================================================
   COMPANY NOTICE
   ========================================================================== */

.company-notice {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 24px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.company-notice__icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.company-notice__icon svg {
    color: var(--color-primary);
}

.company-notice__content {
    flex: 1;
}

.company-notice__content strong {
    display: block;
    font-size: 15px;
    color: var(--color-text);
    margin-bottom: 4px;
}

.company-notice__content p {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0 0 12px;
    line-height: 1.5;
}

.company-notice__content .ant-btn {
    display: inline-flex;
    align-items: center;
}

/* ==========================================================================
   ALERTS
   ========================================================================== */

.ant-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 24px;
}

.ant-alert-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.ant-alert-content {
    flex: 1;
    line-height: 1.5;
}

.ant-alert-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
}

.ant-alert-error .ant-alert-icon {
    color: #ff4d4f;
}

.ant-alert-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
}

.ant-alert-success .ant-alert-icon {
    color: #52c41a;
}

.ant-alert-info {
    background: #e6f4ff;
    border: 1px solid #91caff;
    color: #0958d9;
}

.ant-alert-info .ant-alert-icon {
    color: #1677ff;
}

/* ==========================================================================
   BUTTON STATES
   ========================================================================== */

.ant-btn-loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.ant-btn-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
}

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

/* ==========================================================================
   GRID
   ========================================================================== */

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

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .auth-section {
        padding: 24px 0;
        min-height: auto;
    }

    .auth-card__header {
        padding: 24px 24px 20px;
    }

    .auth-card__body {
        padding: 24px;
    }

    .auth-card__title {
        font-size: 1.5rem;
    }

    .company-notice {
        flex-direction: column;
        text-align: center;
    }

    .company-notice__icon {
        margin: 0 auto;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-card__header {
        padding: 20px 20px 16px;
    }

    .auth-card__body {
        padding: 20px;
    }

    .auth-card__logo {
        width: 48px;
        height: 48px;
    }

    .auth-form__options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

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

.auth-card {
    animation: fadeInUp 0.4s ease forwards;
}

.company-notice {
    animation: fadeInUp 0.4s ease forwards;
    animation-delay: 0.1s;
    opacity: 0;
}
