/* ============================================================
   AUTHENTICATION PAGES
   ------------------------------------------------------------
   The card, form and button system shared by the password reset
   screens. Lifted from auth/login.blade.php so the reset pages
   match it without carrying a third and fourth copy of the same
   300 lines inline.

   Load order: vendor CSS, then css/responsive.css, then this.

   login.blade.php and register.blade.php still hold their own
   inline copies; they can be moved onto this file later, but that
   is a change to two working pages and is left alone here.
   ============================================================ */

:root {
    --primary-color: #8B4513;
    --secondary-color: #DAA520;
    --accent-green: #228B22;
    --background-warm: #FDF5E6;
    --text-dark: #2C1810;
    --gradient-primary: linear-gradient(135deg, #8B4513 0%, #DAA520 100%);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--gradient-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Slowly drifting watermark behind the card */
body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><path d="M50 15 L85 85 L15 85 Z" fill="white"/><circle cx="50" cy="50" r="20" fill="white"/></svg>');
    background-size: 100px 100px;
    animation: movePattern 20s linear infinite;
}

@keyframes movePattern {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

.auth-container {
    max-width: 450px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.6s ease;
}

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

/* ---- header ---- */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header .logo {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2rem);
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-header .logo span:nth-child(1) { color: var(--primary-color); }
.auth-header .logo span:nth-child(2) { color: var(--secondary-color); }
.auth-header .logo span:nth-child(3) { color: var(--accent-green); }

.auth-header h2 {
    color: var(--primary-color);
    font-size: clamp(1.25rem, 1rem + 1.2vw, 1.8rem);
    margin-bottom: 10px;
}

.auth-header p {
    color: #666;
    font-size: 0.95rem;
}

/* ---- fields ---- */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group > i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-control {
    height: 55px;
    padding-left: 45px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(218, 165, 32, 0.25);
    outline: none;
}

.form-control[readonly] {
    background: #f6f6f6;
    color: #555;
}

/* A real <button>, so it is keyboard operable. appearance is reset here
   because Bootstrap's reboot sets `-webkit-appearance: button` on the
   element, which would otherwise repaint it as a native button. */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--primary-color);
}

/* The invalid-feedback sits under a positioned field, so it needs to
   clear the absolutely placed icon rather than overlap it. */
.form-group .invalid-feedback {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
}

/* ---- actions ---- */
.btn-auth {
    width: 100%;
    height: 55px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-auth:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(139, 69, 19, 0.3);
    color: white;
}

.btn-auth:hover::before { left: 100%; }

.btn-auth:focus-visible {
    outline: 3px solid var(--text-dark);
    outline-offset: 3px;
}

/* ---- links ---- */
.auth-links {
    text-align: center;
    margin-top: 25px;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-links a:hover { color: var(--secondary-color); }

.auth-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.auth-footer p {
    color: #666;
    font-size: 0.9rem;
}

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

.back-home {
    position: absolute;
    top: 30px;
    left: 30px;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    z-index: 2;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.back-home:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateX(-5px);
}

.back-home i { margin-right: 8px; }

/* ---- messages ---- */
.alert {
    border-radius: 15px;
    border: none;
    margin-bottom: 20px;
    animation: slideDown 0.5s ease;
}

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

/* ---- hint under a field ---- */
.field-hint {
    display: block;
    margin-top: 8px;
    color: #888;
    font-size: 0.85rem;
}

@media (max-width: 576px) {
    .auth-card { padding: 30px 20px; }

    .back-home {
        top: 20px;
        left: 20px;
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}
