/* Main Styles - Base styles and variables for Ojo Café */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #F7F3E7 0%, #F0EAD6 100%);
    min-height: 100vh;
    color: var(--text-primary);
}

/* CSS Variables for Consistency */
:root {
    /* Palette: accent brown from provided sample, base = eggshell */
    --primary-bg: #F0EAD6;
    /* eggshell */
    --secondary-bg: #E8E2CC;
    /* slightly deeper eggshell */
    --accent-color: #6D3726;
    /* brown (RGB ~ 109,55,38) */
    --text-primary: #2B2B2B;
    /* dark text for light backgrounds */
    --text-secondary: #5F564D;
    /* muted dark */
    --text-muted: #8B8176;
    --border-color: #D4CCB8;
    --hover-color: #8A4B34;
    /* lighter accent for hover */
    --error-color: #C0392B;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.25);
    --transition-speed: 0.3s;
}

/* Login Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    padding: 2rem;
}

.login-card {
    background: rgba(26, 26, 26, 0.95);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow-heavy);
    width: 100%;
    max-width: 450px;
    border: 1px solid var(--border-color);
    color: #f5f5f5;
    /* ensure readable text on dark card with light theme */
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background-color: var(--accent-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-bg);
    border: 3px solid var(--border-color);
    overflow: hidden;
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 3px;
    color: #ffffff;
}

.login-header p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ab6519;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--secondary-bg);
    /* keep light background on focus for readability */
    color: var(--text-primary);
    /* ensure typed text stays dark and readable */
    caret-color: var(--accent-color);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Error Messages */
.error-message {
    background-color: var(--error-color);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Success Messages */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    border: 1px solid #c3e6cb;
}

/* Remember Me and Forgot Password */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #e8e2cc;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.forgot-password {
    color: #e8e2cc;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.forgot-password:hover {
    color: #ffffff;
}

/* Buttons */
.login-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-color);
    color: var(--primary-bg);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    letter-spacing: 1px;
}

.login-btn:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Links */
.signup-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #e8e2cc;
    /* brighter text on dark login card */
}

.signup-link a {
    color: #f8f5ee;
    /* brighter for dark login/register card */
    text-decoration: none;
    font-weight: bold;
    transition: color var(--transition-speed) ease, text-decoration var(--transition-speed) ease;
}

.signup-link a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Generic page logo for hero/headers */
.page-logo {
    width: 110px;
    height: 110px;
    margin: 0 auto 1rem;
    background-color: var(--accent-color);
    border-radius: 18px;
    /* rounded square edges */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.page-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Design - Mobile First Approach */
@media (max-width: 768px) {
    .login-card {
        padding: 2rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    /* Prevent mobile auto-zoom on focus */
    input, select, textarea {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }

    .login-logo {
        width: 80px;
        height: 80px;
        font-size: 1.5rem;
    }

    .login-logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .login-header h1 {
        font-size: 1.3rem;
        letter-spacing: 2px;
    }

    .page-logo {
        width: 84px;
        height: 84px;
        border-radius: 14px;
        margin-bottom: 0.75rem;
    }
}