/* =========================================================
   POLYHOOD SYSTEM GLOBAL STYLES (style.css)
   ========================================================= */

/* --- 1. CSS Variables & Theme Defaults --- */
:root {
    --primary-blue: #0070c0;
    --primary-blue-hover: #005696;
    --accent-red: #d93829;
    --accent-red-hover: #b82b1d;
    --accent-gold: #e5a83b;
    --dark-text: black;
    --body-text: gold;
    --muted-text: red;
    --light-bg: #f4f6f8;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --success-green: #28a745;
    --warning-orange: #ffc107;
    --danger-red: #dc3545;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-pill: 30px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
}


/* --- 2. Base Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    /* Removes the elastic bounce/zoom effect on mobile browsers (like iOS Safari) */
   
    
    /* Prevents horizontal shifting */
    
    
    /* Ensures the body sits perfectly flush at the top of the screen */
    margin: 0;
    padding: 0;
}

input, textarea, select {
    /* Must be at least 16px to stop iOS Safari from auto-zooming */
    font-size: 16px !important; 
    
}

/* Optional: Disables the "double-tap to zoom" gesture on buttons and inputs */
button, input, textarea, select {
  touch-action: manipulation;  
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-blue-hover);
}

/* --- 3. Breadcrumbs Bar --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--muted-text);
    margin: 15px 0 25px 0;
    padding: 8px 0;
}

.breadcrumb a {
    color: var(--muted-text);
}

.breadcrumb a:hover {
    color: var(--primary-blue);
}

.breadcrumb span.separator {
    color: #cbd5e0;
}

/* --- 4. Cards & Content Layout --- */
.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: gold;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 8px;
}

/* Book / Content Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.item-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.item-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: #edf2f7;
}

.item-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.item-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 6px;
    font-family: 'Georgia', serif;
}

.item-card-author {
    font-size: 0.85rem;
    color: var(--muted-text);
    margin-bottom: 12px;
}

.item-card-footer {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
}

/* --- 5. Forms & Inputs --- */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 6px;
    color: var(--dark-text);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--white);
    color: var(--body-text);
    outline: none;
    transition: border-color 0.2s ease;
    font-family: 'Georgia', serif;
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 112, 192, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}
/* --- 6. Tables & Status Badges --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

    .table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Enables smooth inertial scrolling on iOS */
}


.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
    min-width: 600px;
    border-colapse: collapse;
    background-color: gold;
    font-family: 'Georgia', serif;
}

.data-table th {
    background-color: #f8fafc;
    color: var(--dark-text);
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Georgia', serif;
}

.badge-available, .badge-success {
    background-color: #e6f4ea;
    color: #137333;
}

.badge-borrowed, .badge-danger {
    background-color: #fce8e6;
    color: #c5221f;
}

.badge-pending, .badge-warning {
    background-color: #fef7e0;
    color: #b06000;
}

/* --- 7. Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    font-family: 'Georgia', serif;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: gold;
    color: var(--white);
}

.btn-danger {
    background-color: var(--accent-red);
    color: var(--white);
}

.btn-danger:hover {
    background-color: var(--accent-red-hover);
    color: var(--white);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: var(--dark-text);
}

.btn-secondary:hover {
    background-color: #cbd5e0;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.78rem;
}

/* --- 8. System Alerts & Notifications --- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
    font-family: 'Georgia', serif;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
    font-family: 'Georgia', serif;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
    font-family: 'Georgia', serif;
}

/* --- 9. Utility Classes --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
/* --- Global Image & Watermark Constraints --- */
img {
    max-width: 100%;
    height: auto;
}

/* Force footer emblem / background images to stay constrained */
footer img, 
.footer-logo {
    max-width: 30px;
    height: auto;
    display: block;
    margin: 5px auto;
}

/* =========================================================
   MAIN FOOTER STYLES
   ========================================================= */

/* 1. Outer full-width background bar */
.main-footer {
    width: 100%;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 10px 20px;
    margin-top: auto;
    box-sizing: border-box;
}

/* 2. Centered content container (keeps elements away from screen edges) */
.footer-container {
    max-width: 1200px; /* Matches the header max-width */
    margin: 0 auto;    /* Centers the box horizontally */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 10px;   /* Inner margin buffer for smaller displays */
}

/* 3. Left-side section styling */
.footer-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    text-align: left;
}

.footer-left p {
    font-size: 0.88rem;
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

.footer-left a {
    color: #0070c0;
    text-decoration: none;
}

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

/* 4. Mobile Responsiveness */
@media (max-width: 768px) {
    .main-footer {
        padding: 6px 4px;
    }

    .footer-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .footer-left {
        align-items: center;
        text-align: center;
    }
}

/* --- Direct Input Field Reset for Admin Login --- */
.login-card input[type="text"],
.login-card input[type="password"],
.form-group input {
    width: 100% !important;
    padding: 10px 14px !important;
    font-size: 0.95rem !important;
    border: 1px solid #cbd5e0 !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
    margin-top: 4px;
    margin-bottom: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus {
    border-color: #0070c0 !important;
    box-shadow: 0 0 0 3px rgba(0, 112, 192, 0.15) !important;
}

/* --- Login Card Container Fix --- */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: 60vh;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.login-card h2 {
    font-size: 1.4rem;
    color: #1a202c;
    margin-bottom: 4px;
}

.login-card p.subtitle {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 20px;
}

.login-card label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #2d3748;
    display: block;
}

.btn-login {
    width: 100%;
    background-color: #0070c0;
    color: gold;
    border: none;
    padding: 11px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 8px;
}

.btn-login:hover {
    background-color: #005696;
}

/* 1. Align the input and button perfectly side-by-side */
.search-form {
    display: flex;
    align-items: center;
    gap: 8px; /* Adds clean spacing between the input and button */
    margin-bottom: 20px;
    font-family: 'Georgia', serif;
}

/* 2. Style the missing input field class */
.input-text {
    flex: 1; /* Allows the search bar to stretch nicely */
    max-width: 400px; /* Prevents it from becoming too long on wide screens */
    height: 42px; /* Matches the button height perfectly */
    padding: 10px 14px;
    font-size: 0.95rem;
    color: black;
    border: 1px solid #cbd5e0; /* Clean, modern gray border */
    border-radius: 6px; /* Matches the rounded corners of the button */
    background-color: #ffffff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Georgia', serif;
}

/* 3. Add a professional blue glow when the user clicks inside to type */
.input-text:focus {
    border-color: #0070c0;
    box-shadow: 0 0 0 3px rgba(0, 112, 192, 0.15);
}