/* Global reset */
body {
    margin: 0;
    font-family: "Arial", sans-serif;
    background-color: #dfe3e7; /* light gray background */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

/* Outer container to center card */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem; /* prevent edge squeeze on small screens */
}

/* Card layout */
.login-card {
    display: flex;
    background: #f6f7fb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    width: 100%;
    min-height: 400px;
    max-height: 500px;
}

/* Left side image */
.login-image {
    flex: 1;
    background-color: #123; /* fallback */
}
.login-image img {
    width: 100%;
    height: 100%;
    display: block;
}

/* Right side form */
.login-form {
    flex: 1;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Logo */
.login-logo {
    max-width: 220px;
    margin-bottom: 2rem;
}

/* Form fields */
.form-group {
    margin-bottom: 1rem;
    width: 100%;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

/* Button */
.btn {
    width: 100%;
    padding: 0.75rem;
    background-color: #1c666b;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #145153;
}

/* Dashboard Layout */
.dashboard-container {
    width: 100%;
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--background, #fff);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.dashboard-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary, #2c3e50);
}

.dashboard-welcome {
    color: var(--text-muted, #666);
}

/* Cards Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.dashboard-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    background: var(--card-bg, #f8f9fa);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    color: var(--primary, #2c3e50);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    background: var(--primary-light, #eaf2f8);
}

.admin-card {
    border: 2px solid var(--accent, #e74c3c);
    color: var(--accent, #e74c3c);
}

/* Logout Button */
.dashboard-footer {
    text-align: center;
    margin-top: 2rem;
}

.btn-logout {
    background: var(--accent, #e74c3c);
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-logout:hover {
    background: #c0392b;
}

/* -------------------- */
/* Responsive Behavior  */
/* -------------------- */

/* For tablets and smaller screens */
@media (max-width: 768px) {
    .login-card {
        flex-direction: column; /* stack instead of side by side */
    }

    .login-image {
        display: none; /* hide bookshelf image */
    }

    .login-form {
        flex: none;
        width: 100%;
        padding: 2rem 1.5rem;
    }

    .login-logo {
        max-width: 180px;
        margin-bottom: 1.5rem;
    }
}

/* For very small phones */
@media (max-width: 480px) {
    .login-form {
        padding: 1.5rem 1rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    .btn {
        font-size: 0.9rem;
        padding: 0.65rem;
    }
}
