/* =============================================
   ESTILOS GLOBAIS
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7f6; /* Um cinza muito claro para o fundo */
    color: #333;
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand i {
    margin-right: 8px;
}

/* =============================================
   CARDS DE LIVROS (DASHBOARD)
   ============================================= */
.book-card .card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    overflow: hidden; /* Garante que nada vaze do card */
}

.book-card .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.book-card .card-title {
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Adiciona "..." se o título for muito longo */
}

.book-card .card-text {
    font-size: 0.9rem;
    color: #555;
}

.book-card .card-text strong {
    color: #34495e;
}

/* =============================================
   BOTÕES
   ============================================= */
.btn {
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Botão de Ler (info) */
.read-book-btn {
    background-color: #3498db;
    border-color: #3498db;
}
.read-book-btn:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

/* Botão de Deletar (danger) */
.delete-book-btn {
    background-color: #e74c3c;
    border-color: #e74c3c;
}
.delete-book-btn:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

/* =============================================
   MODAIS
   ============================================= */
/* Estilo para o modal de leitura em tela cheia */
.modal-fullscreen .modal-content {
    height: 100%;
    border: none;
    border-radius: 0;
}

.modal-fullscreen .modal-body {
    padding: 0;
}

/* Estilo para o modal de adicionar livro */
#addBookModal .modal-header {
    background-color: #343a40;
    color: #fff;
    border-radius: 0.5rem 0.5rem 0 0;
}

#addBookModal .modal-title {
    font-weight: 600;
}

/* =============================================
   CATEGORIAS
   ============================================= */
.category-section {
    border-radius: 12px;
    background: #fff;
    padding: 1.5rem;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.05);
}

.category-section h3 {
    font-weight: 600;
    color: #2c3e50;
}

.category-grid {
    margin-top: 0.5rem;
}

/* =============================================
   ADMIN DASHBOARD
   ============================================= */
.admin-summary .summary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.admin-summary .summary-card-icon {
    font-size: 2rem;
    opacity: 0.85;
}

.admin-summary .summary-card h4 {
    margin-bottom: 0.2rem;
    font-weight: 700;
}

.admin-summary .summary-card p {
    margin: 0;
    font-size: 0.9rem;
}

.admin-summary table tbody tr td {
    vertical-align: middle;
}

.admin-summary table tbody tr td small {
    font-size: 0.75rem;
}

.books-table-view .table thead th {
    white-space: nowrap;
}

.books-table-view .table td,
.books-table-view .table th {
    vertical-align: middle;
}

.books-table-view .table td strong {
    display: block;
}

.books-table-view .table td .btn {
    min-width: 36px;
}

/* =============================================
   LEITOR DE PDF
   ============================================= */
.pdf-reader-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    background-color: #fff;
}

.pdf-reader-toolbar {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.pdf-reader-toolbar .btn {
    min-width: 36px;
}

.pdf-reader-body {
    flex: 1;
    position: relative;
    overflow: auto;
    padding: 1.5rem;
    background-color: #f1f3f5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.pdf-canvas-container {
    position: relative;
    box-shadow: 0 12px 24px rgba(33, 37, 41, 0.25);
    border-radius: 4px;
    overflow: hidden;
}

.pdf-canvas-container.pdf-loading {
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.pdf-canvas-container canvas {
    display: block;
    background-color: #fff;
    max-width: 100%;
    height: auto;
}

.pdf-loading-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* =============================================
   FORMULÁRIOS (LOGIN/REGISTRO)
   ============================================= */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.card-title {
    font-weight: 700;
    color: #2c3e50;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* =============================================
   ALERTAS
   ============================================= */
.alert {
    border: none;
    border-radius: 8px;
    font-weight: 500;
}

/* =============================================
   FOOTER (OPCIONAL)
   ============================================= */
/* Adicionei um estilo básico para um rodapé, caso queira usá-lo no futuro. */
footer {
    margin-top: 50px;
    padding: 20px 0;
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
}
