/*
 * main.css - Shared styles for MERCY Malaysia Volunteer Management System
 */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

:root {
    --primary-color: #0056b3;
    --secondary-color: #f0f0f0;
    --accent-color: #28a745;
    --danger-color: #dc3545;
    --light-gray: #e9ecef;
    --dark-text: #333333;
    --light-text: #ffffff;
}

/* Base body styling */
body {
    font-family: 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
    color: var(--dark-text);
    line-height: 1.6;
}

/* Logo Styling */
.logo-container {
    text-align: center;
    padding-bottom: 20px; 
}

.logo-container img {
    max-width: 180px;
    height: auto;
}

/* Main Content Containers */
.container, .form-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 30px;
    background-color: var(--light-text);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.form-container {
    max-width: 500px;
}

/* Forms and Inputs */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.form-group {
    margin-bottom: 15px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s ease;
    color: var(--dark-text);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 86, 179, 0.5);
}

/* Button styling */
.button, button {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none; /* For <a> tags styled as buttons */
    display: inline-block; /* For <a> tags styled as buttons */
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.button:hover, button:hover {
    background-color: #004085;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    color: var(--light-text);
    text-decoration: none;
}

.danger-button {
    background-color: var(--danger-color) !important;
}

.danger-button:hover {
    background-color: #c82333 !important;
}

/* Typography and Links */
h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}

h2 {
    color: var(--primary-color);
    margin-top: 25px;
    margin-bottom: 15px;
}

p {
    margin: 0 0 10px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #004085;
    text-decoration: underline;
}

/* Messages and Alerts */
.message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    font-weight: bold;
    text-align: left;
    border-left: 4px solid;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border-color: var(--accent-color);
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border-color: var(--danger-color);
}

.info-message {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 28px;
    }
    .container, .form-container {
        margin: 20px;
        padding: 20px;
    }
    form {
        padding: 15px;
    }
}

/*
 * =========================================
 * LOGIN PAGE STYLES
 * =========================================
 */

/* 1. The Background */
body.login-page {
    /* Use your uploaded background image */
    background-image: url('login-background.png'); 
    background-size: cover; /* Cover the entire screen */
    background-position: center center; /* Center the image */
    background-repeat: no-repeat;
    background-attachment: fixed; /* Keeps image still on scroll */
    
    /* Ensure the wrapper fills the screen */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    
    /* Reset background color for this page */
    background-color: #333; /* Fallback color */
}

/* 2. The Login Card */
body.login-page .login-card {
    /* This replaces the old .form-container style, but *only* on this page */
    max-width: 450px; /* A good width for a login box */
    width: 90%; /* Responsive width */
    margin: 20px; /* Spacing from screen edge */
    padding: 30px 40px; /* More internal spacing */
    
    /* The semi-transparent card effect */
    background-color: rgba(255, 255, 255, 0.95); /* White, 95% opaque */
    
    border-radius: 10px; /* Softer corners */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); /* Stronger shadow */
    text-align: center;
    
    /* Remove the default margin: 50px auto from .form-container */
    position: relative; 
    top: 0;
    left: 0;
    transform: none;
    
    /* Ensure it works on top of the wrapper */
    z-index: 2; 
}

/* 3. Override dashboard container styles on this page */
body.login-page .container,
body.login-page .form-container {
    /* These styles are for the dashboard, reset them for the login page */
    max-width: none;
    margin: 0;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
}

/* 4. Tweak logo */
body.login-page .logo-container img {
    max-width: 150px; /* Adjust as needed */
}

/* 5. Tweak headings */
body.login-page h1 {
    font-size: 24px;
    color: #333; /* Darker text on light card */
}
body.login-page h2 {
    font-size: 20px;
    margin-top: 10px;
}