.admin-login-box { max-width: 400px; margin: 60px auto; background: white; padding: 40px; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); text-align: center; }
.admin-login-box h2 { font-family: 'Playfair Display', serif; color: var(--color-primary); margin-bottom: 8px; }
.admin-login-box p { color: var(--color-text-light); font-size: 0.9rem; margin-bottom: 8px; }
.input-form { width: 100%; padding: 12px 14px; margin: 10px 0; border: 1px solid #DDE3DD; border-radius: var(--radius-sm); outline: none; font-size: 0.95rem; transition: var(--transition-smooth); }
.input-form:focus { border-color: var(--color-sky); box-shadow: 0 0 0 3px rgba(74,127,165,0.15); }
.w-100 { width: 100%; }
.login-error { color: #C62828; font-size: 0.85rem; margin-top: 8px; min-height: 1.2em; }

.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-header h2 { font-family: 'Playfair Display', serif; color: var(--color-primary); }
.btn-logout { background: #FFEEEB; color: #C1693C; border: none; padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; transition: var(--transition-smooth); }
.btn-logout:hover { background: #FFDFD5; }

.admin-tabs { display: flex; gap: 12px; margin-bottom: 20px; }
.admin-tab-btn { background: white; border: 1px solid #DDE3DD; padding: 10px 20px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; transition: var(--transition-smooth); }
.admin-tab-btn.active { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.alert-tab { border-color: var(--color-accent); color: #96721F; }
.alert-tab.active { background: var(--color-accent); color: white; }

.table-responsive { overflow-x: auto; border-radius: var(--radius-md); }
.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-soft); }
.admin-table th { background: rgba(26,60,42,0.04); color: var(--color-primary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.admin-table th, .admin-table td { padding: 14px; text-align: left; border-bottom: 1px solid #EEF1EE; font-size: 0.9rem; }
.admin-table tr:hover td { background: rgba(26,60,42,0.02); }
.btn-action { padding: 6px 12px; border-radius: var(--radius-sm); border: none; cursor: pointer; font-weight: 600; margin-right: 4px; transition: var(--transition-smooth); font-size: 0.82rem; }
.btn-action:hover { transform: translateY(-1px); }
.btn-approve { background: #E8F5E9; color: #2E7D32; }
.btn-reject { background: #FFEBEE; color: #C62828; }
.btn-edit { background: #E3EEF7; color: #2C5F82; }
.btn-delete { background: #FFEBEE; color: #C62828; }

/* Simple modal form for add/edit book, reused within admin dashboard */
.form-field { margin-bottom: 14px; text-align: left; }
.form-field label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--color-primary); margin-bottom: 4px; }
.form-actions { display: flex; gap: 12px; align-items: center; }
.btn-secondary { padding: 12px 16px; border: 1px solid #DDE3DD; background: #F8FAF8; color: var(--color-primary); border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; transition: var(--transition-smooth); }
.btn-secondary:hover { background: #EEF3EE; }
.upload-status { margin-top: 8px; font-size: 0.85rem; color: var(--color-text-light); }
.upload-status.error { color: #C62828; }
.upload-status.success { color: #2E7D32; }
.cover-preview { width: 100%; max-width: 220px; margin-top: 10px; border-radius: var(--radius-sm); border: 1px solid #DDE3DD; object-fit: cover; display: block; }
/* Unified Layout for Dashboard Views */
.dashboard-layout-grid {
    display: grid;
    grid-template-columns: 1fr; /* Stacks on mobile */
    gap: 32px;
    align-items: start;
    width: 100%;
}
.books-table-section,
.categories-list-section {
    min-width: 0; 
    width: 100%;
}
.books-form-section .admin-login-box,
.categories-form-section .admin-login-box {
    width: 100%;
    max-width: 100% !important; /* Removes the narrow login-box restriction */
    margin: 0 !important; /* Stops it from centering itself */
    box-sizing: border-box;
}
main.page-content {
    max-width: 95% !important; 
    margin: 0 auto;
}

/* On large screens, split into two columns (Left 65%, Right 35%) */
@media (min-width: 1024px) {
    .dashboard-layout-grid {
        grid-template-columns: 2fr 1fr; /* Table gets 66% width, Form gets 33% */
    }
}