/* ==========================================================================
   Ritiko Auth Pages — auth.css
   Light theme with clean, minimal design inspired by Variant 5.
   ========================================================================== */

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

:root {
    --auth-teal: #32b0a5;
    --auth-teal-dark: #2a9a90;
    --auth-teal-light: #5dd9cf;
    --auth-teal-bg: rgba(50, 176, 165, 0.06);
    --auth-teal-glow: rgba(50, 176, 165, 0.12);
    --auth-black: #111827;
    --auth-gray-700: #374151;
    --auth-gray-500: #6b7280;
    --auth-gray-400: #9ca3af;
    --auth-gray-200: #e5e7eb;
    --auth-gray-100: #f3f4f6;
    --auth-gray-50: #f9fafb;
    --auth-white: #ffffff;
    --auth-error: #dc2626;
    --auth-error-bg: #fef2f2;
    --auth-error-border: #fecaca;
}

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */
@keyframes auth-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html, body {
    height: 100%;
    margin: 0;
}

body.auth-page {
    min-height: 100vh;
    background: var(--auth-teal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    color: var(--auth-black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */
.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 24px;
    animation: auth-fade-in 0.45s ease-out;
}

/* --------------------------------------------------------------------------
   Back Link
   -------------------------------------------------------------------------- */
.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 28px;
    transition: color 0.2s ease;
}

.auth-back-link:hover {
    color: var(--auth-white);
    text-decoration: none;
}

.auth-back-link .fa {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.auth-back-link:hover .fa {
    transform: translateX(-3px);
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.auth-card {
    position: relative;
    background: var(--auth-white);
    border: none;
    border-radius: 16px;
    padding: 44px 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* --------------------------------------------------------------------------
   Logo
   -------------------------------------------------------------------------- */
.auth-logo {
    display: block;
    margin: 0 auto 32px;
    max-height: 48px;
    transition: opacity 0.3s ease;
}

.auth-logo:hover {
    opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
.auth-card h2 {
    text-align: center;
    color: var(--auth-black);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--auth-gray-500);
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 28px;
}

/* --------------------------------------------------------------------------
   Form Groups
   -------------------------------------------------------------------------- */
.auth-card .form-group {
    margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   Input Groups — icon inline with input
   -------------------------------------------------------------------------- */
.auth-card .input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 10px;
    width: 100%;
    position: relative;
}

.auth-card .input-group .form-control {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    padding: 12px 16px;
    border-radius: 10px !important;
    border: 1px solid var(--auth-gray-200);
    font-size: 15px;
    font-family: inherit;
    color: var(--auth-black);
    background-color: var(--auth-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card .input-group .form-control:focus {
    border-color: var(--auth-teal);
    box-shadow: 0 0 0 3px rgba(50, 176, 165, 0.12);
    background-color: var(--auth-white);
    outline: none;
}

.auth-card .input-group .form-control::placeholder {
    color: var(--auth-gray-400);
}

.auth-card .input-group .input-group-append {
    display: flex !important;
    flex-shrink: 0;
    margin-left: 0;
}

.auth-card .input-group .input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    color: var(--auth-gray-400);
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-card .input-group .input-group-text .fa,
.auth-card .input-group .input-group-text .far,
.auth-card .input-group .input-group-text em {
    font-size: 14px;
    line-height: 1;
    font-weight: 400 !important;
    font-family: "Font Awesome 5 Free" !important;
    -webkit-font-smoothing: antialiased;
}

.auth-card .input-group .input-group-text:hover {
    color: var(--auth-teal);
}

/* Standalone inputs (without icon) */
.auth-card .form-control:not(.input-group .form-control) {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--auth-gray-200);
    font-size: 15px;
    font-family: inherit;
    color: var(--auth-black);
    background-color: var(--auth-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card .form-control:not(.input-group .form-control):focus {
    border-color: var(--auth-teal);
    box-shadow: 0 0 0 3px rgba(50, 176, 165, 0.12);
    outline: none;
}

.auth-card .form-control:not(.input-group .form-control)::placeholder {
    color: var(--auth-gray-400);
}

/* Autofill fix */
.auth-card .form-control:-webkit-autofill,
.auth-card .form-control:-webkit-autofill:hover,
.auth-card .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-black);
    -webkit-box-shadow: 0 0 0 1000px var(--auth-white) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* --------------------------------------------------------------------------
   Button
   -------------------------------------------------------------------------- */
.auth-card .btn-auth {
    display: block;
    width: 100%;
    padding: 13px 16px;
    background: var(--auth-teal);
    color: var(--auth-white);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    margin-top: 8px;
    letter-spacing: 0.01em;
}

.auth-card .btn-auth:hover {
    background: var(--auth-teal-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(50, 176, 165, 0.25);
}

.auth-card .btn-auth:active {
    transform: translateY(0);
    box-shadow: none;
}

.auth-card .btn-auth:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */
.auth-card .auth-link {
    color: var(--auth-teal);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.auth-card .forgot-password {
    text-align: right;
    margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   Error States
   -------------------------------------------------------------------------- */
.auth-card .alert-auth-error {
    background-color: var(--auth-error-bg);
    border: 1px solid var(--auth-error-border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.auth-card .alert-auth-error p {
    color: var(--auth-error);
    margin: 0;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Info Text
   -------------------------------------------------------------------------- */
.auth-card .auth-info {
    color: var(--auth-gray-500);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 24px;
}

/* --------------------------------------------------------------------------
   Success Card (password reset done)
   -------------------------------------------------------------------------- */
.auth-card .auth-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--auth-teal-bg);
    color: var(--auth-teal);
    font-size: 24px;
    margin: 0 auto 24px;
}

.auth-card .auth-back-to-login {
    display: block;
    text-align: center;
    margin-top: 24px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.auth-footer a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: var(--auth-white);
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */
.bg-ritiko {
    background-color: var(--auth-teal) !important;
}

/* Override Bootstrap utility classes that conflict */
.auth-card .bg-transparent {
    background: transparent !important;
}

.auth-card .border-right-0 {
    border-right: 0 !important;
}

.auth-card .border-left-0 {
    border-left: 0 !important;
}

.auth-card .text-muted {
    color: var(--auth-gray-400) !important;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .auth-container {
        padding: 16px;
    }

    .auth-card {
        padding: 32px 24px;
        border-radius: 14px;
    }

    .auth-logo {
        max-height: 40px;
        margin-bottom: 28px;
    }

    .auth-card h2 {
        font-size: 20px;
    }
}
