/* ============================================
   BIBLIOTECA ȘCOLII - Main Stylesheet
   Design: Warm, scholarly aesthetic with terracotta accents
   ============================================ */

:root {
    /* Color Palette - Warm library aesthetic */
    --color-cream: #FDF6E3;
    --color-parchment: #F5E6D3;
    --color-warm-white: #FFFBF5;
    --color-terracotta: #C75B39;
    --color-terracotta-dark: #A84832;
    --color-terracotta-light: #E8907A;
    --color-forest: #2D4739;
    --color-forest-light: #3D5F4D;
    --color-ink: #2C2416;
    --color-ink-light: #4A3F2F;
    --color-gold: #C4A35A;
    --color-gold-light: #E5D4A1;
    
    /* Semantic Colors */
    --color-success: #4A7C59;
    --color-warning: #D4A03B;
    --color-danger: #C75B39;
    --color-info: #5B8A9A;
    
    /* Status Colors */
    --status-pending: #D4A03B;
    --status-approved: #4A7C59;
    --status-completed: #5B8A9A;
    --status-rejected: #C75B39;
    --status-expired: #8B7355;
    
    /* Typography */
    --font-serif: 'Libre Baskerville', Georgia, serif;
    --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(44, 36, 22, 0.08);
    --shadow-md: 0 4px 12px rgba(44, 36, 22, 0.1);
    --shadow-lg: 0 8px 24px rgba(44, 36, 22, 0.12);
    --shadow-xl: 0 16px 48px rgba(44, 36, 22, 0.16);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ============== Reset & Base ============== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-ink);
    background: var(--color-cream);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============== Typography ============== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-ink);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--color-terracotta);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-terracotta-dark);
}

/* ============== Header ============== */
.header {
    background: var(--color-warm-white);
    border-bottom: 1px solid var(--color-parchment);
    padding: var(--space-md) var(--space-xl);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-terracotta), var(--color-terracotta-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-icon svg {
    width: 28px;
    height: 28px;
}

.logo-text h1 {
    font-size: 1.25rem;
    margin: 0;
}

.logo-text .tagline {
    font-size: 0.8rem;
    color: var(--color-ink-light);
    font-style: italic;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.admin-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-forest);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.admin-link svg {
    width: 18px;
    height: 18px;
}

.admin-link:hover {
    background: var(--color-forest-light);
    color: white;
    transform: translateY(-1px);
}

/* ============== Main Content ============== */
.main-content {
    flex: 1;
}

/* ============== Hero Section ============== */
.hero {
    position: relative;
    padding: var(--space-3xl) var(--space-xl);
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(199, 91, 57, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(196, 163, 90, 0.15) 0%, transparent 50%),
        linear-gradient(180deg, var(--color-parchment) 0%, var(--color-cream) 100%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.828-1.415 1.415L51.8 0h2.827zM5.373 0l-.83.828L5.96 2.243 8.2 0H5.374zM48.97 0l3.657 3.657-1.414 1.414L46.143 0h2.828zM11.03 0L7.372 3.657 8.787 5.07 13.857 0H11.03zm32.284 0L49.8 6.485 48.384 7.9l-7.9-7.9h2.83zM16.686 0L10.2 6.485 11.616 7.9l7.9-7.9h-2.83zM22.344 0L13.858 8.485 15.272 9.9l9.9-9.9h-2.83zM32 0l-3.172 3.172L27.414 4.586 32 0zm-6.172 0L20.343 5.485l1.414 1.414L28 0h-2.172zM0 5.373l.828-.83 1.415 1.415L0 8.2V5.374zm0 5.656l.828-.829 1.415 1.415L0 13.857v-2.83zm0 5.656l.828-.828 1.415 1.414L0 19.515v-2.83zm0 5.657l.828-.828 1.415 1.414L0 25.172v-2.83zM60 5.373V8.2l-2.243-2.243 1.415-1.414.828.83zm0 5.656v2.828l-2.243-2.242 1.415-1.415.828.83zm0 5.656v2.83l-2.243-2.243 1.415-1.415.828.83zm0 5.657v2.83l-2.243-2.243 1.415-1.415.828.83z' fill='%23C4A35A' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.8;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
    color: var(--color-ink);
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--color-ink-light);
    max-width: 500px;
    margin: 0 auto;
}

/* ============== Catalog Section ============== */
.catalog-section {
    padding: var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
}

/* Search Box */
.search-container {
    margin-bottom: var(--space-xl);
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: var(--space-md) var(--space-xl);
    padding-left: 3.5rem;
    font-size: 1rem;
    font-family: var(--font-sans);
    border: 2px solid var(--color-parchment);
    border-radius: var(--radius-xl);
    background: var(--color-warm-white);
    transition: all var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-terracotta);
    box-shadow: 0 0 0 4px rgba(199, 91, 57, 0.1);
}

.search-box input::placeholder {
    color: var(--color-ink-light);
    opacity: 0.6;
}

.search-icon {
    position: absolute;
    left: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-ink-light);
    pointer-events: none;
}

.clear-btn {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-parchment);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-ink-light);
    transition: all var(--transition-fast);
}

.clear-btn:hover {
    background: var(--color-terracotta);
    color: white;
}

.clear-btn svg {
    width: 16px;
    height: 16px;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

/* Book Card */
.book-card {
    background: var(--color-warm-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--color-parchment);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-terracotta-light);
}

.book-card .book-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    color: var(--color-ink);
}

.book-card .book-icon svg {
    width: 24px;
    height: 24px;
}

.book-card h3 {
    font-size: 1.1rem;
    margin-bottom: var(--space-xs);
    color: var(--color-ink);
}

.book-card .author {
    color: var(--color-ink-light);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: var(--space-md);
}

.book-card .availability {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-parchment);
}

.availability-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-success);
}

.availability-dot.unavailable {
    background: var(--color-danger);
}

.availability-text {
    font-size: 0.85rem;
    color: var(--color-ink-light);
}

.book-card .btn-reserve {
    margin-top: var(--space-md);
}

/* ============== Buttons ============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn svg {
    width: 18px;
    height: 18px;
}

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

.btn-primary:hover {
    background: var(--color-terracotta-dark);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--color-parchment);
    color: var(--color-ink-light);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--color-parchment);
    color: var(--color-ink);
}

.btn-secondary:hover {
    background: var(--color-gold-light);
}

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

.btn-danger:hover {
    background: var(--color-terracotta-dark);
}

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

.btn-success:hover {
    background: var(--color-forest);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8rem;
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

/* ============== Empty & Loading States ============== */
.empty-state,
.loading-state {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--color-ink-light);
}

.empty-state svg,
.loading-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-lg);
    opacity: 0.4;
}

.empty-state h3 {
    font-family: var(--font-serif);
    margin-bottom: var(--space-sm);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-parchment);
    border-top-color: var(--color-terracotta);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-md);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============== Modal ============== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44, 36, 22, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    padding: var(--space-lg);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--color-warm-white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 450px;
    width: 100%;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-xl);
}

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

.modal-small {
    max-width: 360px;
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 36px;
    height: 36px;
    border: none;
    background: var(--color-parchment);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-ink-light);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--color-terracotta);
    color: white;
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-header {
    margin-bottom: var(--space-lg);
}

.modal-header h3 {
    margin-bottom: var(--space-xs);
}

.modal-header .book-title {
    color: var(--color-terracotta);
    font-style: italic;
    font-size: 1rem;
}

/* ============== Forms ============== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-ink);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-sans);
    font-size: 1rem;
    border: 2px solid var(--color-parchment);
    border-radius: var(--radius-md);
    background: var(--color-warm-white);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-terracotta);
    box-shadow: 0 0 0 4px rgba(199, 91, 57, 0.1);
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    margin-top: var(--space-xl);
}

.input-wrapper {
    position: relative;
}

.input-wrapper svg {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--color-ink-light);
    pointer-events: none;
}

.input-wrapper input {
    padding-left: 2.75rem;
}

/* ============== Login Page ============== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(199, 91, 57, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(196, 163, 90, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, var(--color-parchment) 0%, var(--color-cream) 100%);
}

.login-container {
    background: var(--color-warm-white);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-xl);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    margin-bottom: var(--space-xl);
    color: var(--color-ink-light);
}

.back-link svg {
    width: 18px;
    height: 18px;
}

.back-link:hover {
    color: var(--color-terracotta);
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-forest), var(--color-forest-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    color: white;
}

.login-logo svg {
    width: 32px;
    height: 32px;
}

.login-header h1 {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.login-header p {
    color: var(--color-ink-light);
    margin: 0;
}

.login-form .btn {
    margin-top: var(--space-lg);
}

/* Alert Messages */
.alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(199, 91, 57, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(199, 91, 57, 0.2);
}

.alert-success {
    background: rgba(74, 124, 89, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(74, 124, 89, 0.2);
}

/* ============== Admin Layout ============== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--color-forest);
    color: white;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-mini {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-mini svg {
    width: 24px;
    height: 24px;
}

.sidebar-title h2 {
    font-size: 1.1rem;
    color: white;
    margin: 0;
}

.sidebar-title span {
    font-size: 0.75rem;
    opacity: 0.7;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    width: 100%;
    text-decoration: none;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: var(--color-terracotta);
    color: white;
}

.sidebar-footer {
    padding: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item.logout:hover {
    background: rgba(199, 91, 57, 0.3);
}

/* Admin Main */
.admin-main {
    flex: 1;
    padding: var(--space-xl);
    background: var(--color-cream);
    overflow-y: auto;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-header {
    margin-bottom: var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.section-header h1 {
    margin-bottom: var(--space-xs);
}

.section-header p {
    color: var(--color-ink-light);
    margin: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.stat-card {
    background: var(--color-warm-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    border: 1px solid var(--color-parchment);
    transition: all var(--transition-fast);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.books {
    background: rgba(196, 163, 90, 0.2);
    color: var(--color-gold);
}

.stat-icon.copies {
    background: rgba(91, 138, 154, 0.2);
    color: var(--color-info);
}

.stat-icon.pending {
    background: rgba(212, 160, 59, 0.2);
    color: var(--status-pending);
}

.stat-icon.approved {
    background: rgba(74, 124, 89, 0.2);
    color: var(--status-approved);
}

.stat-icon.completed {
    background: rgba(91, 138, 154, 0.2);
    color: var(--status-completed);
}

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

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-serif);
    color: var(--color-ink);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-ink-light);
    margin-top: var(--space-xs);
}

/* Quick Actions */
.quick-actions h3 {
    margin-bottom: var(--space-lg);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-md);
}

.action-card {
    background: var(--color-warm-white);
    border: 2px dashed var(--color-parchment);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--color-ink-light);
}

.action-card svg {
    width: 32px;
    height: 32px;
    color: var(--color-terracotta);
}

.action-card:hover {
    border-color: var(--color-terracotta);
    background: var(--color-parchment);
    color: var(--color-ink);
}

/* Data Table */
.table-container {
    background: var(--color-warm-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-parchment);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--color-parchment);
}

.data-table th {
    background: var(--color-parchment);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-ink-light);
}

.data-table tbody tr:hover {
    background: rgba(196, 163, 90, 0.05);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.pending {
    background: rgba(212, 160, 59, 0.15);
    color: var(--status-pending);
}

.status-badge.approved {
    background: rgba(74, 124, 89, 0.15);
    color: var(--status-approved);
}

.status-badge.completed {
    background: rgba(91, 138, 154, 0.15);
    color: var(--status-completed);
}

.status-badge.rejected {
    background: rgba(199, 91, 57, 0.15);
    color: var(--status-rejected);
}

.status-badge.expired {
    background: rgba(139, 115, 85, 0.15);
    color: var(--status-expired);
}

/* Action Buttons Group */
.action-buttons {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

/* Filter Group */
.filter-group {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.filter-group select {
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    border: 2px solid var(--color-parchment);
    border-radius: var(--radius-md);
    background: var(--color-warm-white);
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--color-terracotta);
}

/* Toolbar */
.toolbar {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    align-items: center;
}

.search-box-admin {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.search-box-admin input {
    padding: var(--space-sm) var(--space-md);
    padding-left: 2.5rem;
    font-size: 0.9rem;
}

.search-box-admin .search-icon {
    left: var(--space-md);
    width: 16px;
    height: 16px;
}

.toolbar .filter-group {
    flex-wrap: wrap;
}

/* Status badge for cancelled */
.status-badge.cancelled {
    background: rgba(139, 115, 85, 0.15);
    color: var(--status-expired);
}

/* ============== Pagination ============== */
.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding: var(--space-lg) 0;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--color-ink-light);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: var(--space-sm);
    border: 2px solid var(--color-parchment);
    background: var(--color-warm-white);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-ink);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--color-terracotta);
    color: var(--color-terracotta);
}

.pagination-btn.active {
    background: var(--color-terracotta);
    border-color: var(--color-terracotta);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn svg {
    width: 18px;
    height: 18px;
}

.pagination-ellipsis {
    padding: 0 var(--space-sm);
    color: var(--color-ink-light);
}

/* Pagination in admin tables */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-top: 1px solid var(--color-parchment);
    background: var(--color-warm-white);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.table-pagination .pagination-info {
    margin: 0;
}

.table-pagination .pagination-controls {
    margin: 0;
}

/* ============== Toast Notifications ============== */
#toast-container {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    background: var(--color-ink);
    color: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    animation: slideIn 0.3s ease;
    min-width: 280px;
    max-width: 400px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    background: var(--color-success);
}

.toast.error {
    background: var(--color-danger);
}

.toast.warning {
    background: var(--color-warning);
}

.toast svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    padding: var(--space-xs);
}

.toast-close:hover {
    opacity: 1;
}

/* ============== Footer ============== */
.footer {
    background: var(--color-forest);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--space-lg);
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto;
}

.footer p {
    margin: 0;
}

/* ============== Responsive ============== */
@media (max-width: 1024px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: var(--space-md);
    }
    
    .sidebar-footer {
        flex-direction: row;
        display: flex;
        gap: var(--space-md);
    }
    
    .nav-item {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .hero-content h2 {
        font-size: 1.75rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .modal {
        margin: var(--space-md);
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: var(--space-sm);
    }
    
    .section-header {
        flex-direction: column;
    }
    
    #toast-container {
        left: var(--space-md);
        right: var(--space-md);
        bottom: var(--space-md);
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}

