/* ============================================================
   AUTH PAGES - INDEPENDENT STYLES
   No external dependencies, full-height no-scroll layout
   ============================================================ */

/* ----- reset & base ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-page {
    overflow: hidden;
    height: 100vh;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #14690356 0%, #066e3a69 100%);
}

/* ----- main container ----- */
.auth-wrapper {
    height: 100vh;
    overflow: hidden;
    padding: 1rem;
    background: linear-gradient(135deg, #eff6ff71 0%, #eef2ff7a 100%);
}

.auth-container {
    max-width: 1280px;
    margin: 0 auto;
    height: 100%;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    height: 100%;
    align-content: center;
}

/* ----- left panel - brand ----- */
.brand-panel {
    background: linear-gradient(135deg, #4f46e5, #1e40af);
    border-radius: 1.25rem;
    color: #ffffff;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    min-height: 400px;
}

.brand-panel .flex-1 {
    flex: 1;
}

/* logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.brand-logo .logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: #ffffff;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    flex-shrink: 0;
}

.brand-logo .logo-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

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

.brand-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.brand-subtitle {
    color: #bfdbfe;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* feature list */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feature-item svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #86efac;
    flex-shrink: 0;
}

.feature-item span {
    font-size: 0.875rem;
}

/* brand footer */
.brand-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(59, 130, 246, 0.5);
    margin-top: auto;
}

.brand-footer .action-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s;
}

.brand-footer .action-link:hover {
    color: #bfdbfe;
}

.brand-footer .action-link svg {
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
}

.brand-footer .help-text {
    color: #bfdbfe;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.contact-link {
    display: flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.15s;
    gap: 0.5rem;
}

.contact-link:hover {
    color: #bfdbfe;
}

.contact-link svg {
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
}

/* ----- right panel - form card ----- */
.form-card {
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 1.75rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    max-height: 100%;
}

/* register card - scrollable */
.form-card-register {
    overflow-y: auto;
}

.form-card-register::-webkit-scrollbar {
    width: 5px;
}

.form-card-register::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.form-card-register::-webkit-scrollbar-thumb {
    background: #c7d2fe;
    border-radius: 10px;
}

.form-card-register::-webkit-scrollbar-thumb:hover {
    background: #818cf8;
}

/* login card - centered content */
.form-card-login {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* form header */
.form-header {
    margin-bottom: 1.5rem;
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.form-header p {
    color: #6b7280;
    font-size: 0.875rem;
}

/* status message */
.status-success {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    color: #15803d;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.status-success svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* form elements */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-group .label-optional {
    font-weight: 400;
    color: #6b7280;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    visibility: hidden;
    left: 0;
    padding-left: 0.75rem;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.input-wrapper .input-icon svg {
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
}

.input-wrapper .input-suffix {
    position: absolute;
    visibility: hidden;
    right: 0;
    padding-right: 0.75rem;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.input-wrapper .input-suffix svg {
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
}

.auth-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    padding-left: 2.25rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.15s;
    background: #ffffff;
    color: #1f2937;
}

.auth-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

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

.auth-select {
    appearance: none;
    padding-right: 2.25rem;
    cursor: pointer;
}

.auth-error {
    color: #dc2626;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.auth-error svg {
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
}

/* checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    color: #4f46e5;
    border-color: #d1d5db;
    border-radius: 0.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
    accent-color: #4f46e5;
}

.checkbox-wrapper label {
    font-size: 0.75rem;
    color: #374151;
}

.checkbox-wrapper label a {
    color: #4f46e5;
    font-weight: 500;
    text-decoration: none;
}

.checkbox-wrapper label a:hover {
    color: #4338ca;
}

/* remember & forgot row */
.form-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forgot-link {
    font-size: 0.75rem;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    color: #4338ca;
}

/* submit button */
.auth-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    cursor: pointer;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #4338ca, #1d4ed8);
}

.auth-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.auth-btn .btn-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* spinner */
.spinner {
    animation: spin 1s linear infinite;
}

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

/* ----- responsive ----- */
@media (min-width: 1024px) {
    .auth-grid {
        grid-template-columns: 5fr 7fr;
    }

    .brand-panel {
        padding: 2rem 2.5rem;
    }

    .form-card {
        padding: 2rem 2.5rem;
    }

    .brand-title {
        font-size: 2rem;
    }

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

    .form-grid .col-span-2 {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .auth-wrapper {
        padding: 0.5rem;
    }

    .brand-panel {
        padding: 1.25rem;
        min-height: auto;
    }

    .form-card {
        padding: 1.25rem;
    }

    .brand-title {
        font-size: 1.25rem;
    }

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

    .form-header h2 {
        font-size: 1.25rem;
    }
}

/* hide scrollbar on login card */
.form-card-login {
    overflow: hidden;
}

/* utility */
.hidden {
    display: none !important;
}

.mb-1 {
    margin-bottom: 0.25rem;
}
.mb-2 {
    margin-bottom: 0.5rem;
}
.mb-4 {
    margin-bottom: 1rem;
}
.mb-6 {
    margin-bottom: 1.5rem;
}
.mb-8 {
    margin-bottom: 2rem;
}
.mt-1 {
    margin-top: 0.25rem;
}
.pt-2 {
    padding-top: 0.5rem;
}
.pt-4 {
    padding-top: 1rem;
}
.space-y-2 > * + * {
    margin-top: 0.5rem;
}
.space-y-4 > * + * {
    margin-top: 1rem;
}
.space-y-6 > * + * {
    margin-top: 1.5rem;
}
.gap-4 {
    gap: 1rem;
}
.gap-6 {
    gap: 1.5rem;
}

/* ============================================================
   ADDITIONS FOR PASSWORD RESET PAGES
   ============================================================ */

/* ----- Password Reset specific styles ----- */
.reset-container {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.reset-card {
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.reset-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.reset-logo .logo-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.reset-logo .logo-icon svg {
    width: 2rem;
    height: 2rem;
    color: #ffffff;
}

.reset-logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.reset-logo p {
    color: #6b7280;
    font-size: 0.875rem;
}

.reset-form .form-group {
    margin-bottom: 1.25rem;
}

.reset-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.reset-form .input-wrapper {
    position: relative;
}

.reset-form .input-wrapper .input-icon {
    position: absolute;
    inset-y: 0;
    left: 0;
    padding-left: 0.875rem;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.reset-form .input-wrapper .input-icon svg {
    width: 1.125rem;
    height: 1.125rem;
    color: #9ca3af;
}

.reset-form .auth-input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    padding-left: 2.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.15s;
    background: #ffffff;
    color: #1f2937;
}

.reset-form .auth-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.reset-form .auth-input::placeholder {
    color: #9ca3af;
}

.reset-form .auth-input.is-invalid {
    border-color: #dc2626;
}

.reset-form .auth-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
}

.reset-form .auth-error {
    color: #dc2626;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.reset-form .auth-error svg {
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
}

.reset-form .auth-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.reset-form .auth-success svg {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

.reset-form .btn-reset {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    cursor: pointer;
    gap: 0.5rem;
}

.reset-form .btn-reset:hover {
    background: linear-gradient(135deg, #4338ca, #1d4ed8);
}

.reset-form .btn-reset:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.reset-form .btn-reset svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.reset-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.reset-footer a {
    color: #4f46e5;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: color 0.15s;
}

.reset-footer a:hover {
    color: #4338ca;
}

.reset-footer a svg {
    width: 1rem;
    height: 1rem;
}

/* Spinner animation */
.spinner {
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 640px) {
    .reset-card {
        padding: 1.5rem 1.25rem;
    }
    
    .reset-logo h2 {
        font-size: 1.25rem;
    }
}