:root {
    --primary-color: #0056b3;
    /* Classic Blue */
    --secondary-color: #e3f2fd;
    /* Very Light Blue */
    --accent-color: #6c757d;
    /* Gray */
    --text-color: #333333;
    --light-bg: #f8f9fa;
    /* Off-white */
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

/* Vertical Center for Login */
#page-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary-color), #004494);
    color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 20px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link:hover,
.nav-link.active {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Cards */
.card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border-top: 4px solid var(--primary-color);
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-weight: 500;
}

/* Form */
.form-section {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #004494;
}

/* Lists */
.loan-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.loan-item {
    background: #fff;
    border: 1px solid #e9ecef;
    padding: 20px;
    border-radius: var(--radius);
    transition: shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.loan-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.loan-item.returned {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.loan-item h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.loan-item.returned h3 {
    color: #6c757d;
}

.loan-item p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 5px;
}

.btn-return {
    background-color: #28a745;
    /* Success Green for action */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 15px;
    width: 100%;
    transition: background-color 0.2s;
}

.btn-return:hover {
    background-color: #218838;
}

.btn-delete {
    background-color: #dc3545;
    /* Danger Red */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 15px;
    width: 100%;
    transition: background-color 0.2s;
}

.btn-delete:hover {
    background-color: #c82333;
}

#loading,
#formMessage {
    font-weight: 500;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
    color: #6c757d;
    font-size: 0.9rem;
    border-top: 1px solid #e9ecef;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}