/* assets/css/signin.css - Coffee Theme Signin Page */
/* ======================
   Global
====================== */
:root {
    /* Coffee Theme Color Palette */
    --primary-brown: #6F4E37;      /* Coffee / Espresso */
    --dark-brown: #4B3D2A;         /* Deep Roast */
    --light-cream: #ECE0D1;        /* Creamy Latte */
    --beige: #DBC1AC;              /* Warm Beige */
    --accent-brown: #967259;       /* Mocha Accent */
    --text-dark: #38220F;          /* Dark Roast Text */
    --white: #FFFFFF;
    --off-white: #F9F5F0;         /* Soft Milk Foam */
    --success: #8B6F47;            /* Warm Golden Success */
    --error: #A0522D;              /* Sienna Error */
    --shadow: rgba(111, 78, 55, 0.15);
    --border: #DBC1AC;
    --input-bg: #F9F5F0;
    --hover-brown: #5A3E2E;
}

body {
    font-family: 'Segoe UI', 'Roboto', system-ui, sans-serif;
    background: var(--light-cream);
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(150, 114, 89, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 80% 20%, rgba(219, 193, 172, 0.05) 0%, transparent 20%);
    z-index: 0;
}

.signin-container {
    max-width: 420px;
    width: 90%;
    margin: 40px auto;
    background: var(--off-white);
    padding: 35px 30px;
    border-radius: 16px;
    box-shadow: 
        0 10px 30px rgba(111, 78, 55, 0.15),
        0 2px 10px rgba(111, 78, 55, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(219, 193, 172, 0.3);
    backdrop-filter: blur(10px);
}

/* Coffee cup decorative element */
.signin-container::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-brown), var(--primary-brown));
    clip-path: polygon(0 20%, 100% 20%, 85% 100%, 15% 100%);
    border-radius: 50% 50% 0 0;
    z-index: -1;
    box-shadow: 0 8px 20px var(--shadow);
}

/* Page Title */
.page-title {
    text-align: center;
    margin-bottom: 30px;
}

.page-title h2 {
    color: var(--primary-brown);
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.page-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--accent-brown), var(--success));
    border-radius: 2px;
}

.page-title p {
    color: var(--accent-brown);
    font-size: 15px;
    margin: 0;
    opacity: 0.8;
}

/* ======================
   Form Inputs
====================== */
.signin-form {
    margin-top: 10px;
}

.signin-form input {
    width: 100%;
    padding: 16px 48px 16px 16px;
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: var(--input-bg);
    color: var(--text-dark);
    box-shadow: inset 0 2px 4px rgba(111, 78, 55, 0.05);
}

.signin-form input::placeholder {
    color: #A08B7A;
    opacity: 0.7;
}

.signin-form input:focus {
    border-color: var(--accent-brown);
    box-shadow: 
        0 0 0 3px rgba(150, 114, 89, 0.2),
        inset 0 2px 4px rgba(111, 78, 55, 0.05);
    outline: none;
    background-color: var(--white);
}

.signin-form input:hover {
    border-color: var(--accent-brown);
}

/* ======================
   Password Toggle
====================== */
.password-container {
    position: relative;
    margin-bottom: 20px;
}

.password-container .toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--accent-brown);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 20px;
}

.password-container .toggle-password:hover {
    transform: translateY(-50%) scale(1.1);
}

.password-container svg {
    width: 22px;
    height: 22px;
}

.password-container svg path,
.password-container svg circle {
    transition: 0.3s;
    stroke: currentColor;
    fill: none;
}

/* ======================
   Remember Me
====================== */
.signin-links-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.remember-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--text-dark);
}

.remember-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--accent-brown);
    border-radius: 4px;
    border: 1px solid var(--border);
    background-color: var(--input-bg);
}

.remember-container input[type="checkbox"]:checked {
    background-color: var(--accent-brown);
    border-color: var(--accent-brown);
}

.remember-container input[type="checkbox"]:focus {
    outline: 2px solid rgba(150, 114, 89, 0.3);
    outline-offset: 2px;
}

.remember-container label {
    margin: 0;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    color: var(--dark-brown);
}

/* ======================
   Forgot Password Link
====================== */
.forgot-link {
    margin: 0;
    font-size: 15px;
    text-align: right;
}

.forgot-link a {
    color: var(--accent-brown);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 6px;
    position: relative;
    display: inline-block;
}

.forgot-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-brown);
    transition: width 0.3s ease;
}

.forgot-link a:hover {
    color: var(--primary-brown);
}

.forgot-link a:hover::after {
    width: 100%;
}

/* ======================
   Buttons
====================== */
.btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    box-shadow: 
        0 4px 12px rgba(111, 78, 55, 0.2),
        0 2px 4px rgba(111, 78, 55, 0.1);
}

.btn::after {
    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.7s ease;
}

.btn:hover::after {
    left: 100%;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary-brown), var(--dark-brown));
    color: var(--white);
    border: 1px solid rgba(111, 78, 55, 0.3);
}

.btn.primary:hover {
    background: linear-gradient(135deg, var(--hover-brown), var(--primary-brown));
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(111, 78, 55, 0.25),
        0 4px 8px rgba(111, 78, 55, 0.15);
}

.btn.primary:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(111, 78, 55, 0.2),
        0 1px 3px rgba(111, 78, 55, 0.1);
}

/* ======================
   Toaster (Matching Coffee Theme)
====================== */
.toaster {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: 90%;
}

/* Common toast styling */
.toast {
    padding: 16px 20px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 15px;
    min-width: 240px;
    max-width: 100%;
    color: var(--white);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 10px 30px rgba(111, 78, 55, 0.25),
        0 4px 15px rgba(111, 78, 55, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
}

/* Success → Warm Golden */
.toast.success {
    background: linear-gradient(135deg, var(--success), #A6895B);
    border-left: 6px solid #7D5E3A;
}

/* Info → Mocha Brown */
.toast.info {
    background: linear-gradient(135deg, var(--accent-brown), #B89A7A);
    border-left: 6px solid #8B6F47;
}

/* Error → Sienna Red */
.toast.error {
    background: linear-gradient(135deg, var(--error), #C1734D);
    border-left: 6px solid #8B4513;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Toast exit animation */
.toast.exiting {
    animation: slideOutRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ======================
   Signup Link
====================== */
.signin-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(219, 193, 172, 0.5);
    font-size: 15px;
    color: var(--accent-brown);
}

.signin-link a {
    color: var(--primary-brown);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 6px;
    position: relative;
    display: inline-block;
}

.signin-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-brown);
    transition: width 0.3s ease;
}

.signin-link a:hover {
    color: var(--dark-brown);
    background-color: rgba(219, 193, 172, 0.1);
}

.signin-link a:hover::after {
    width: 100%;
}

/* ======================
   Responsive Design
====================== */

/* Tablet */
@media (max-width: 768px) {
    .signin-container {
        max-width: 380px;
        padding: 30px 25px;
        margin: 30px auto;
    }
    
    .page-title h2 {
        font-size: 26px;
    }
    
    .toaster {
        right: 15px;
        left: 15px;
        width: auto;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* Mobile */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .signin-container {
        margin: 20px auto;
        padding: 25px 20px;
        width: 95%;
    }
    
    .signin-container::before {
        top: -40px;
        width: 80px;
        height: 60px;
    }
    
    .page-title h2 {
        font-size: 24px;
    }
    
    .signin-links-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .forgot-link {
        text-align: left;
        width: 100%;
    }
    
    .remember-container {
        order: -1;
    }
    
    .signin-form input {
        padding: 14px 44px 14px 14px;
        font-size: 15px;
    }
    
    .btn {
        padding: 14px;
        font-size: 15px;
    }
    
    .toaster {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
    
    .toast {
        padding: 14px 16px;
        font-size: 14px;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .signin-container {
        padding: 20px 16px;
    }
    
    .page-title h2 {
        font-size: 22px;
    }
    
    .page-title p {
        font-size: 14px;
    }
    
    .signin-form input {
        padding: 12px 40px 12px 12px;
        font-size: 14px;
    }
    
    .btn {
        padding: 13px;
        font-size: 14px;
    }
    
    .signin-links-row {
        font-size: 14px;
    }
    
    .remember-container {
        font-size: 14px;
    }
    
    .forgot-link {
        font-size: 14px;
    }
    
    .signin-link {
        font-size: 14px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .signin-form input,
    .toast {
        transition: none;
        animation: none;
    }
    
    .btn::after {
        display: none;
    }
}

/* Focus visible for keyboard navigation */
.signin-form input:focus-visible,
.btn:focus-visible,
.remember-container input[type="checkbox"]:focus-visible,
.forgot-link a:focus-visible,
.signin-link a:focus-visible {
    outline: 2px solid var(--accent-brown);
    outline-offset: 2px;
}