/* eKnižnica GBAS CSS Stylesheet */

:root {
    /* Color Palette - Light Theme */
    --body-bg: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    
    /* Vibrant Indigo & Bright Cyan */
    --accent-burgundy: #4f46e5;
    --accent-burgundy-hover: #4338ca;
    --accent-orange: #0ea5e9;
    --accent-orange-hover: #0284c7;
    --accent-orange-light: rgba(14, 165, 233, 0.08);
    
    --shadow-card: 0 10px 30px rgba(79, 70, 229, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 40px rgba(79, 70, 229, 0.08), 0 1px 10px rgba(79, 70, 229, 0.05);
    
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(79, 70, 229, 0.06);
    
    --badge-green-bg: rgba(16, 185, 129, 0.1);
    --badge-green-color: #10b981;
    --badge-red-bg: rgba(239, 68, 68, 0.1);
    --badge-red-color: #ef4444;
    --badge-orange-bg: rgba(245, 158, 11, 0.1);
    --badge-orange-color: #d97706;
    
    --transition-speed: 0.25s;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

/* Dark Theme Variables */
html[data-theme="dark"] {
    --body-bg: #090a10;
    --bg-card: #111322;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #1e2238;
    
    --accent-burgundy: #6366f1;
    --accent-burgundy-hover: #818cf8;
    --accent-orange: #38bdf8;
    --accent-orange-hover: #7dd3fc;
    --accent-orange-light: rgba(56, 189, 248, 0.12);
    
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 20px 45px rgba(99, 102, 241, 0.12), 0 8px 24px rgba(0, 0, 0, 0.3);
    
    --glass-bg: rgba(17, 19, 34, 0.85);
    --glass-border: rgba(255, 255, 255, 0.05);
    
    --badge-green-bg: rgba(16, 185, 129, 0.15);
    --badge-green-color: #34d399;
    --badge-red-bg: rgba(239, 68, 68, 0.15);
    --badge-red-color: #f87171;
    --badge-orange-bg: rgba(245, 158, 11, 0.15);
    --badge-orange-color: #fbbf24;
}

/* Base resets & typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--body-bg);
    background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.03) 0px, transparent 50%),
                      radial-gradient(at 50% 0%, rgba(14, 165, 233, 0.04) 0px, transparent 50%),
                      radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.03) 0px, transparent 50%);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

a {
    color: var(--accent-burgundy);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--accent-orange);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--body-bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Library Hero Section */
.library-hero {
    position: relative;
    background: linear-gradient(135deg, rgba(245, 243, 255, 0.94) 0%, rgba(224, 242, 254, 0.9) 50%, rgba(253, 242, 248, 0.45) 100%), url('modern_library_banner.png');
    background-size: cover;
    background-position: center;
    color: #1e293b;
    padding: 60px 0 80px 0;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

/* Fallback subtle pattern on hero */
.library-hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: rgba(99, 102, 241, 0.12);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

.library-hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 350px;
    height: 350px;
    background: rgba(14, 165, 233, 0.12);
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 1;
}

html[data-theme="dark"] .library-hero {
    background: linear-gradient(135deg, rgba(9, 10, 16, 0.96) 0%, rgba(18, 21, 38, 0.9) 50%, rgba(9, 10, 16, 0.5) 100%), url('modern_library_banner_night.png');
    background-size: cover;
    background-position: center;
    color: #f8fafc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .library-hero::before {
    background: rgba(99, 102, 241, 0.2);
}

html[data-theme="dark"] .library-hero::after {
    background: rgba(56, 189, 248, 0.18);
}


.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Top Navigation inside Hero */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--accent-burgundy), var(--accent-orange));
    color: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
}

html[data-theme="dark"] .logo-title {
    color: #ffffff;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--accent-burgundy);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: -3px;
}

html[data-theme="dark"] .logo-subtitle {
    color: var(--accent-orange);
}

.top-nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Theme toggle button */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.6);
    color: #0f172a;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    transition: all var(--transition-speed) ease;
}

.theme-toggle:hover {
    background: rgba(15, 23, 42, 0.05);
    border-color: var(--accent-burgundy);
    color: var(--accent-burgundy);
}

html[data-theme="dark"] .theme-toggle {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

html[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

/* User profile details badge */
.user-profile-badge {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 6px 12px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

html[data-theme="dark"] .user-profile-badge {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.user-profile-badge .avatar {
    width: 32px;
    height: 32px;
    background: rgba(15, 23, 42, 0.05);
    color: var(--accent-burgundy);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.95rem;
}

html[data-theme="dark"] .user-profile-badge .avatar {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-orange);
}

.user-profile-badge .user-details {
    display: flex;
    flex-direction: column;
}

.user-profile-badge .user-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
}

html[data-theme="dark"] .user-profile-badge .user-name {
    color: #ffffff;
}

.user-profile-badge .user-class {
    font-size: 0.72rem;
    color: #475569;
}

html[data-theme="dark"] .user-profile-badge .user-class {
    color: rgba(255, 255, 255, 0.6);
}

.user-profile-badge .logout-btn {
    color: #64748b;
    font-size: 0.9rem;
    margin-left: 6px;
    transition: color var(--transition-speed) ease;
}

html[data-theme="dark"] .user-profile-badge .logout-btn {
    color: rgba(255, 255, 255, 0.5);
}

.user-profile-badge .logout-btn:hover {
    color: #ff6b6b;
}

/* Hero Content Box */
.hero-content {
    margin-top: auto;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.8px;
    color: #0f172a;
    line-height: 1.25;
}

html[data-theme="dark"] .hero-content h1 {
    color: #ffffff;
}

.hero-content p {
    font-size: 1.05rem;
    color: #334155;
    max-width: 600px;
    margin-bottom: 30px;
}

html[data-theme="dark"] .hero-content p {
    color: rgba(255, 255, 255, 0.75);
}

/* Stats Row */
.stats-row {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.stat-badge {
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-burgundy);
}

html[data-theme="dark"] .stat-val {
    color: var(--accent-orange);
}

.stat-lbl {
    font-size: 0.75rem;
    color: #475569;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

html[data-theme="dark"] .stat-lbl {
    color: rgba(255, 255, 255, 0.55);
}

.stat-divider {
    width: 1px;
    height: 35px;
    background: rgba(15, 23, 42, 0.1);
}

html[data-theme="dark"] .stat-divider {
    background: rgba(255, 255, 255, 0.15);
}

/* Main Layout Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    min-height: 500px;
}

/* Tab Navigation Buttons */
.main-tabs-row {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.tabs {
    display: flex;
    gap: 16px;
    margin-bottom: -2px;
}

.tab-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-speed) ease;
}

.tab-link:hover {
    color: var(--accent-burgundy);
}

.tab-link.active {
    color: var(--accent-burgundy);
    border-bottom-color: var(--accent-burgundy);
}

html[data-theme="dark"] .tab-link.active {
    color: var(--accent-orange);
    border-bottom-color: var(--accent-orange);
}

/* Filters Card Section */
.filters-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    margin-bottom: 30px;
    transition: all var(--transition-speed) ease;
}

.filters-form {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr auto;
    gap: 16px;
    align-items: center;
    width: 100%;
}

@media (max-width: 1024px) {
    .filters-form {
        grid-template-columns: 1fr 1fr;
    }
    .filter-buttons {
        grid-column: span 2;
        justify-content: flex-end;
    }
}

@media (max-width: 600px) {
    .filters-form {
        grid-template-columns: 1fr;
    }
    .filter-buttons {
        grid-column: span 1;
        width: 100%;
    }
    .filter-buttons .btn {
        flex: 1;
    }
}

.search-input-wrapper {
    position: relative;
    flex-grow: 2;
    min-width: 250px;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.search-input-wrapper input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--body-bg);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-speed) ease;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-burgundy);
    box-shadow: 0 0 0 3px rgba(114, 47, 55, 0.1);
}

html[data-theme="dark"] .search-input-wrapper input:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.15);
}

.filter-select-wrapper {
    position: relative;
    min-width: 200px;
    flex-grow: 1;
}

.filter-select-wrapper select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--body-bg);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f8c8d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 40px;
    transition: all var(--transition-speed) ease;
}

.filter-select-wrapper select:focus {
    outline: none;
    border-color: var(--accent-burgundy);
}

html[data-theme="dark"] .filter-select-wrapper select:focus {
    border-color: var(--accent-orange);
}

/* Custom Checkbox styles */
.checkbox-wrapper {
    min-width: 150px;
    display: flex;
    align-items: center;
}

.custom-checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    user-select: none;
}

.custom-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: var(--body-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all var(--transition-speed) ease;
}

.custom-checkbox-container:hover input ~ .checkmark {
    border-color: var(--accent-burgundy);
}

html[data-theme="dark"] .custom-checkbox-container:hover input ~ .checkmark {
    border-color: var(--accent-orange);
}

.custom-checkbox-container input:checked ~ .checkmark {
    background-color: var(--accent-burgundy);
    border-color: var(--accent-burgundy);
}

html[data-theme="dark"] .custom-checkbox-container input:checked ~ .checkmark {
    background-color: var(--accent-orange);
    border-color: var(--accent-orange);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

/* Premium Buttons Styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-burgundy), var(--accent-burgundy-hover));
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(114, 47, 55, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(114, 47, 55, 0.3);
}

html[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-hover));
    color: #0b0d12;
    box-shadow: 0 4px 12px rgba(255, 159, 67, 0.2);
}

html[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 6px 16px rgba(255, 159, 67, 0.3);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--border-color);
}

.btn-outline-danger {
    background-color: transparent;
    border-color: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.btn-outline-danger:hover {
    background-color: rgba(231, 76, 60, 0.08);
}

.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* Book Catalog Grid & Cards */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

.book-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all var(--transition-speed) cubic-bezier(0.165, 0.84, 0.44, 1);
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(114, 47, 55, 0.15);
}

html[data-theme="dark"] .book-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
}

/* Visual placeholder on card */
.book-cover-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.04) 0%, rgba(14, 165, 233, 0.08) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
}

.book-card:hover .book-cover-placeholder {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(14, 165, 233, 0.15) 100%);
    border-color: rgba(79, 70, 229, 0.2);
}

.book-cover-accent {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 6px;
    background: linear-gradient(to bottom, var(--accent-burgundy), var(--accent-orange));
}

.book-cover-placeholder .book-icon {
    font-size: 3rem;
    color: var(--accent-burgundy);
    opacity: 0.35;
    transition: transform var(--transition-speed) ease;
}

.book-card:hover .book-cover-placeholder .book-icon {
    transform: scale(1.15) rotate(-6deg);
}

/* Status Indicator on Book Cover */
.status-indicator {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.status-indicator.available {
    background-color: var(--badge-green-bg);
    color: var(--badge-green-color);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-indicator.borrowed {
    background-color: var(--badge-red-bg);
    color: var(--badge-red-color);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Card details info */
.book-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.book-category {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 8px;
    transition: all var(--transition-speed) ease;
}

/* Dynamic Category Colors - Modern Creative Generation Vibe */
.book-card:nth-child(5n+1) .book-category {
    color: #4f46e5;
    background-color: rgba(79, 70, 229, 0.08);
}
.book-card:nth-child(5n+2) .book-category {
    color: #0891b2;
    background-color: rgba(8, 145, 178, 0.08);
}
.book-card:nth-child(5n+3) .book-category {
    color: #db2777;
    background-color: rgba(219, 39, 119, 0.08);
}
.book-card:nth-child(5n+4) .book-category {
    color: #b45309;
    background-color: rgba(180, 83, 9, 0.08);
}
.book-card:nth-child(5n+5) .book-category {
    color: #0d9488;
    background-color: rgba(13, 148, 136, 0.08);
}

/* Dark mode category contrast overrides */
html[data-theme="dark"] .book-card:nth-child(5n+1) .book-category {
    color: #a5b4fc;
    background-color: rgba(165, 180, 252, 0.15);
}
html[data-theme="dark"] .book-card:nth-child(5n+2) .book-category {
    color: #67e8f9;
    background-color: rgba(103, 232, 249, 0.15);
}
html[data-theme="dark"] .book-card:nth-child(5n+3) .book-category {
    color: #f9a8d4;
    background-color: rgba(249, 168, 212, 0.15);
}
html[data-theme="dark"] .book-card:nth-child(5n+4) .book-category {
    color: #fbbf24;
    background-color: rgba(251, 191, 36, 0.15);
}
html[data-theme="dark"] .book-card:nth-child(5n+5) .book-category {
    color: #5eead4;
    background-color: rgba(94, 234, 212, 0.15);
}

.book-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9rem;
}

.book-author {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-meta-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: 12px;
}

.book-status-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-dot.green {
    background-color: #2ecc71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
}

.status-dot.red {
    background-color: #e74c3c;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.6);
}

.queue-badge {
    background-color: var(--badge-orange-bg);
    color: var(--badge-orange-color);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.book-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.book-card-actions form {
    display: flex;
}

.book-card-actions form button,
.book-card-actions .btn {
    width: 100%;
}

/* Pagination container */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pag-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
}

.pag-btn:hover {
    border-color: var(--accent-burgundy);
    color: var(--accent-burgundy);
}

html[data-theme="dark"] .pag-btn:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.pag-btn.active {
    background-color: var(--accent-burgundy);
    border-color: var(--accent-burgundy);
    color: #ffffff;
}

html[data-theme="dark"] .pag-btn.active {
    background-color: var(--accent-orange);
    border-color: var(--accent-orange);
    color: #0b0d12;
}

.pag-ellipsis {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0 4px;
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-secondary);
    opacity: 0.3;
    margin-bottom: 20px;
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 24px auto;
}

/* Activity Grid Layout */
.activity-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .activity-grid {
        grid-template-columns: 1fr;
    }
}

.activity-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.activity-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-card-header h3 {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-card-header .icon-accent {
    color: var(--accent-burgundy);
}

html[data-theme="dark"] .activity-card-header .icon-accent {
    color: var(--accent-orange);
}

.count-pill {
    background-color: var(--body-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
}

.activity-card-body {
    padding: 24px;
}

.no-records-msg {
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
    padding: 20px 0;
}

/* Records details list */
.records-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.record-item {
    background-color: var(--body-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.record-book-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.record-details {
    flex-grow: 1;
}

.record-details h4 {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 2px;
}

.record-details .author {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.loan-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.loan-meta i {
    margin-right: 4px;
}

.record-status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.record-status-badge.active-loan {
    background-color: rgba(114, 47, 55, 0.08);
    color: var(--accent-burgundy);
    border: 1px solid rgba(114, 47, 55, 0.15);
}

html[data-theme="dark"] .record-status-badge.active-loan {
    background-color: rgba(255, 159, 67, 0.12);
    color: var(--accent-orange);
    border: 1px solid rgba(255, 159, 67, 0.2);
}

.record-status-badge.ready {
    background-color: var(--badge-green-bg);
    color: var(--badge-green-color);
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.record-status-badge.waiting {
    background-color: var(--badge-orange-bg);
    color: var(--badge-orange-color);
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.record-actions-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

@media (max-width: 500px) {
    .record-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .record-actions-column {
        align-items: flex-start;
        width: 100%;
        margin-top: 4px;
        border-top: 1px solid var(--border-color);
        padding-top: 8px;
    }
}

.btn-cancel-reservation {
    background: transparent;
    border: none;
    color: #e74c3c;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background var(--transition-speed) ease;
}

.btn-cancel-reservation:hover {
    background-color: rgba(231, 76, 60, 0.08);
}

/* Profile fields */
.profile-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-info-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.88rem;
}

.profile-info-item .label {
    color: var(--text-secondary);
    font-weight: 600;
}

.profile-info-item .val {
    font-weight: 700;
}

.profile-assistant-note {
    margin-top: 20px;
    padding: 14px;
    background-color: var(--accent-orange-light);
    border-left: 4px solid var(--accent-orange);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.profile-assistant-note i {
    color: var(--accent-orange);
    font-size: 1.1rem;
    margin-top: 2px;
}

.profile-assistant-note p {
    font-size: 0.78rem;
    color: var(--text-primary);
    line-height: 1.45;
}

.profile-assistant-note p a {
    font-weight: 700;
}

/* History lists */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background-color: var(--body-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.history-details h5 {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.history-details .date {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* Alerts and Toast Messages */
.alert {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.alert i {
    font-size: 1.15rem;
    margin-top: 1px;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.12);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.12);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

/* Modal Overlay Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    width: 92%;
    max-width: 420px;
    transform: scale(0.9);
    transition: transform var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    margin: 16px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color var(--transition-speed) ease;
}

.close-modal-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.input-icon-wrapper input {
    width: 100%;
    padding: 11px 16px 11px 38px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--body-bg);
    color: var(--text-primary);
    font-size: 0.92rem;
    transition: all var(--transition-speed) ease;
}

.input-icon-wrapper input:focus {
    outline: none;
    border-color: var(--accent-burgundy);
}

html[data-theme="dark"] .input-icon-wrapper input:focus {
    border-color: var(--accent-orange);
}

.login-submit-btn {
    width: 100%;
    margin-top: 24px;
    height: 45px;
}

/* Book Details Modal Expanded Layout */
.book-modal-card {
    max-width: 720px;
}

.book-detail-layout {
    display: flex;
    gap: 24px;
}

@media (max-width: 600px) {
    .book-detail-layout {
        flex-direction: column;
        align-items: center;
    }
}

.book-detail-cover {
    width: 140px;
    height: 200px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.04) 0%, rgba(14, 165, 233, 0.08) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    overflow: hidden;
}

.book-detail-cover .book-icon-lg {
    font-size: 4rem;
    color: var(--text-secondary);
    opacity: 0.3;
}

.book-detail-info {
    flex-grow: 1;
}

.detail-category {
    font-size: 0.72rem;
    color: var(--accent-burgundy);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

html[data-theme="dark"] .detail-category {
    color: var(--accent-orange);
}

.book-detail-info h2 {
    font-size: 1.5rem;
    margin: 2px 0 6px 0;
    line-height: 1.25;
}

.book-detail-info h4 {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 20px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-item .lbl {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
}

.meta-item .val {
    font-size: 0.88rem;
    font-weight: 700;
}

.detail-description-box {
    background-color: var(--body-bg);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.detail-description-box h5 {
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: 700;
}

.detail-description-box p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-height: 120px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.detail-action-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: 10px;
}

.detail-status-indicator {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Footer Section */
.library-footer {
    background-color: #0b0d12;
    color: rgba(255, 255, 255, 0.45);
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    text-align: center;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.school-motto {
    font-family: 'Outfit', sans-serif;
    color: var(--accent-orange);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
}

/* Hero Body Wrapper & Illustration */
.hero-body-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}



/* Collapsible Hero States */
.library-hero {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.library-hero.collapsed-hero {
    min-height: 90px !important;
    padding: 20px 0 !important;
    background: var(--bg-card) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

html[data-theme="dark"] .library-hero.collapsed-hero {
    background: var(--bg-card) !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
}

.library-hero.collapsed-hero .hero-body-wrapper {
    max-height: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transform: translateY(-20px);
}

/* Modal Inner Navigation Links */
.modal-nav-links {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.modal-nav-links a {
    color: var(--accent-burgundy);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

html[data-theme="dark"] .modal-nav-links a {
    color: var(--accent-orange);
}

.modal-nav-links a:hover {
    text-decoration: underline;
}

.modal-alert {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.modal-alert-danger {
    background-color: rgba(231, 76, 60, 0.12);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

/* System Settings View Styling */
.settings-view-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    margin-top: 20px;
}

.settings-header {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.settings-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.settings-form .form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .settings-form .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.settings-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.settings-form input[type="text"],
.settings-form input[type="number"],
.settings-form input[type="email"],
.settings-form input[type="password"],
.settings-form select {
    width: 100%;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.settings-form input:focus,
.settings-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.settings-actions {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    justify-content: flex-end;
}
