/* BiblioTech - Estilos personalizados */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    padding: 100px 0;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
}

/* Cards */
.book-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e0e0e0;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.book-cover {
    width: 100%;
    height: 280px;
    min-height: 280px;
    max-height: 280px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #764ba2;
    font-size: 4rem;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.book-cover .book-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    padding: 10px;
    background: #fff;
}

.book-img-detail {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #f8f9fa;
    border-radius: 0.375rem 0 0 0.375rem;
    padding: 15px;
}

.book-thumb-placeholder {
    width: 45px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 4px;
    font-size: 1.2rem;
}

/* Availability Badge */
.availability-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* Card Body Uniformidad */
.book-card .card-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6em;
}

.book-card .card-text {
    font-size: 0.8rem;
}

.book-card .card-footer {
    padding: 10px 15px;
    background: transparent;
    border-top: 1px solid #e0e0e0;
}

/* Grid uniforme - IMPORTANTE */
.row.g-4 {
    display: flex;
    flex-wrap: wrap;
}

.row.g-4 > [class*="col-"] {
    display: flex;
    margin-bottom: 1.5rem;
}

.row.g-4 > [class*="col-"] > .card {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Category pill */
.category-pill {
    display: inline-block;
    padding: 3px 8px;
    background: #e9ecef;
    border-radius: 12px;
    font-size: 0.7rem;
    color: #495057;
    margin-top: auto;
}

/* Stats Cards */
.stat-card {
    border: none;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.02);
}

.stat-card .stat-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.stat-card.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-card.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.stat-card.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.stat-card.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* Sidebar */
#sidebar-wrapper {
    transition: margin 0.25s ease-out;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

#sidebar-wrapper .list-group-item.active {
    background-color: var(--primary-color) !important;
}

/* Tables */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Badges */
.badge-status-active {
    background-color: var(--success-color);
}

.badge-status-returned {
    background-color: var(--secondary-color);
}

.badge-status-overdue {
    background-color: var(--danger-color);
}

/* Forms */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 8px 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

/* Search Box */
.search-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #343a40 100%);
}

/* Category Pills */
.category-pill {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    background-color: #e9ecef;
    color: #495057;
    font-size: 0.85rem;
    margin: 2px;
}

.category-pill:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* Availability Badge */
.availability-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .search-box {
        margin-top: -30px;
        padding: 20px;
    }
    
    #sidebar-wrapper {
        width: 100% !important;
        position: fixed;
        z-index: 1000;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .table {
        font-size: 12px;
    }
}
