/* SAHEL BOOKS - MODERN DESIGN */
:root {
    --primary: #0a2540;
    --primary-light: #1a3a5c;
    --accent: #d4a017;
    --accent-hover: #c4920f;
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --text: #1a1a2e;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
    --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary);
    text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo img { height: 52px; width: auto; border-radius: 4px; }
nav ul { display: flex; gap: 8px; list-style: none; }
nav a {
    padding: 8px 16px;
    color: var(--text);
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s;
    text-decoration: none;
}
nav a:hover { 
    background: var(--bg-alt); 
    color: var(--primary);
    text-decoration: none;
}

/* Main */
main { flex: 1; }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 80px 24px;
    text-align: center;
}
.hero-content { max-width: 1100px; margin: 0 auto; }
.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.hero-desc {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-light); }
.btn-accent { background: var(--accent); color: var(--primary); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline {
    background: transparent;
    border: 2px solid currentColor;
    color: inherit;
}
.hero .btn-outline { border-color: rgba(255,255,255,0.5); color: var(--white); }
.hero .btn-outline:hover { background: rgba(255,255,255,0.1); }

/* Sections */
.section { padding: 64px 24px; max-width: 1200px; margin: 0 auto; }
.section-alt { background: var(--bg-alt); max-width: none; }
.section-alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}
.section-header h2, .section-title { font-size: 1.75rem; font-weight: 700; }
.section-title { text-align: center; margin-bottom: 40px; }
.link-more { color: var(--primary); font-weight: 600; }

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}
.book-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}
.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.book-cover-wrap {
    aspect-ratio: 2/3;
    background: #f0f0f0;
    overflow: hidden;
}
.book-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.no-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.85rem;
}
.book-info { padding: 12px; }
.book-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.book-info .author { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; }
.book-info .price { font-weight: 700; color: var(--primary); }

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}
.step { text-align: center; }
.step-num {
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 auto 16px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.95rem; }

/* Footer */
footer {
    background: var(--primary);
    color: rgba(255,255,255,0.8);
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}
footer a { color: var(--accent); }

/* Forms (keep existing) */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 24px;
}
.auth-card { width: 100%; max-width: 400px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
}
.alert { padding: 12px; border-radius: 6px; margin-bottom: 16px; text-align: center; }
.alert-error { background: #fef2f2; color: #dc2626; }
.alert-success { background: #f0fdf4; color: #16a34a; }
.btn-full { width: 100%; }
.card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

/* Admin Layout */
.admin-layout { display: flex; min-height: 100vh; background: #f8f9fa; }
.admin-sidebar {
    width: 240px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
}
.sidebar-header { 
    padding: 20px 16px; 
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    color: #fff; 
    font-weight: 600;
    font-size: 0.95rem;
}
.sidebar-logo img { height: 28px; border-radius: 4px; }
.sidebar-nav { flex: 1; padding: 8px; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.15s;
    text-decoration: none;
}
.sidebar-nav a:hover {
    text-decoration: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.sidebar-nav a.active {
    text-decoration: none;
    background: var(--accent);
    color: var(--primary);
    font-weight: 600;
}
.sidebar-nav .icon { 
    width: 18px; 
    text-align: center; 
    font-size: 0.9rem;
    opacity: 0.8;
}
.sidebar-footer { 
    padding: 12px 16px; 
    border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-footer a { 
    display: block; 
    color: rgba(255,255,255,0.5); 
    padding: 8px 0; 
    font-size: 0.8rem;
    transition: color 0.15s;
    text-decoration: none;
}
.sidebar-footer a:hover { color: #fff; }
.admin-content { flex: 1; margin-left: 220px; }
.admin-topbar {
    background: #fff;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}
.admin-topbar h1 { font-size: 1.1rem; font-weight: 600; }
.admin-user { font-size: 0.85rem; color: #6b7280; }
.admin-main { padding: 24px; }

/* Empty state */
.empty-state { text-align: center; color: var(--text-muted); padding: 40px; }

/* Mobile */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero { padding: 48px 20px; }
    .books-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .admin-sidebar { transform: translateX(-100%); }
    .admin-content { margin-left: 0; }
    nav ul { gap: 4px; }
    nav a { padding: 8px 12px; font-size: 0.9rem; }
}

/* Catalogue */
.catalogue-header {
    background: var(--bg-alt);
    padding: 48px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.catalogue-header h1 { font-size: 2.25rem; margin-bottom: 8px; }
.catalogue-header p { color: var(--text-muted); }

.catalogue-filters {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.filter-form { display: flex; flex-direction: column; gap: 16px; }
.search-box {
    display: flex;
    gap: 12px;
    max-width: 500px;
}
.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}
.search-box input:focus { outline: none; border-color: var(--primary); }

.filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.category-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--bg-alt);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}
.pill:hover { background: var(--border); }
.pill.active { background: var(--primary); color: var(--white); }

.sort-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--white);
}
.results-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .search-box { flex-direction: column; }
    .filter-row { flex-direction: column; align-items: flex-start; }
}

/* Book Detail */
.book-detail { max-width: 1000px; margin: 0 auto; padding: 48px 24px; }
.book-detail-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    margin-bottom: 48px;
}
.book-detail-cover img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}
.no-cover-large {
    aspect-ratio: 2/3;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}
.category-badge {
    display: inline-block;
    background: var(--bg-alt);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 12px;
}
.book-detail-info h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}
.subtitle { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 12px; }
.author-line { margin-bottom: 24px; }
.author-line a { color: var(--primary); font-weight: 500; }
.author-line a:hover { text-decoration: underline; }
.price-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.price-large { font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.meta-row { color: var(--text-muted); font-size: 0.9rem; }
.book-abstract h2 { font-size: 1.25rem; margin-bottom: 16px; }
.abstract-text { line-height: 1.8; color: var(--text); text-align: justify; }

@media (max-width: 700px) {
    .book-detail-grid { grid-template-columns: 1fr; gap: 24px; }
    .book-detail-cover { max-width: 240px; margin: 0 auto; }
    .price-box { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Cart */
.cart-page { max-width: 700px; margin: 0 auto; padding: 48px 24px; }
.cart-page h1 { font-size: 1.75rem; margin-bottom: 24px; }
.empty-cart { text-align: center; padding: 48px 0; }
.empty-cart p { color: var(--text-muted); margin-bottom: 16px; }
.cart-items { border-top: 1px solid var(--border); }
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.cart-item h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.cart-item-meta { color: var(--text-muted); font-size: 0.85rem; }
.cart-item-price { text-align: right; }
.cart-item-price span { display: block; font-weight: 600; margin-bottom: 4px; }
.remove-link { color: #dc2626; font-size: 0.85rem; }
.remove-link:hover { text-decoration: underline; }
.cart-summary { margin-top: 32px; padding-top: 24px; border-top: 2px solid var(--border); }
.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
}
.total-amount { color: var(--primary); }
.cart-actions { display: flex; gap: 12px; justify-content: flex-end; }

@media (max-width: 500px) {
    .cart-actions { flex-direction: column; }
    .cart-actions .btn { width: 100%; }
}

/* Dashboard */
.dashboard { padding: 0; }
.welcome-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.welcome-bar h2 { font-size: 1.5rem; margin: 0; }
.role-badge {
    background: var(--accent);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.stat-value { display: block; font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.stat-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.action-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.action-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.action-icon { font-size: 1.5rem; display: block; margin-bottom: 8px; }
.action-title { display: block; font-weight: 600; margin-bottom: 4px; }
.action-desc { display: block; font-size: 0.85rem; color: var(--text-muted); }

/* Admin Dashboard */
.admin-dash { padding: 0; }
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.kpi-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.kpi-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.kpi-value { display: block; font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.kpi-warning .kpi-value { color: #d97706; }
.kpi-success .kpi-value { color: #059669; }
.admin-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}
.admin-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.card-header h3 { font-size: 1rem; margin: 0; }
.activity-list { padding: 8px 0; }
.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.activity-item:last-child { border-bottom: none; }
.activity-main { display: flex; flex-direction: column; gap: 2px; }
.activity-main strong { font-size: 0.9rem; }
.activity-main span { font-size: 0.8rem; color: var(--text-muted); }
.activity-time { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.empty-note { padding: 20px; color: var(--text-muted); text-align: center; }
.quick-actions { padding: 8px; }
.quick-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: background 0.15s;
}
.quick-action:hover { background: var(--bg-alt); }
.quick-action .badge {
    margin-left: auto;
    background: var(--accent);
    color: var(--primary);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

@media (max-width: 900px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-grid { grid-template-columns: 1fr; }
}

/* Admin Books */
.admin-page { padding: 0; }
.books-admin-list { display: flex; flex-direction: column; gap: 12px; }
.book-admin-item {
    display: flex;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.book-admin-cover { width: 60px; flex-shrink: 0; }
.book-admin-cover img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 4px;
}
.no-cover-sm {
    width: 100%;
    aspect-ratio: 2/3;
    background: #f0f0f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #999;
}
.book-admin-info { flex: 1; }
.book-admin-info h3 { font-size: 1rem; margin-bottom: 6px; }
.book-admin-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.status-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}
.status-approved { background: #d1fae5; color: #065f46; }
.status-pending_review { background: #fef3c7; color: #92400e; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-draft { background: #e5e7eb; color: #374151; }
.price-tag { font-weight: 600; color: var(--primary); }
.book-admin-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cover-form { display: flex; gap: 8px; align-items: center; }
.cover-form input[type="file"] { font-size: 0.8rem; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }

/* Settings */
.settings-form { max-width: 600px; }
.settings-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.settings-section h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.settings-section .form-group:last-child { margin-bottom: 0; }
.current-logo {
    margin-bottom: 12px;
    padding: 8px;
    background: var(--bg-alt);
    border-radius: 4px;
    display: inline-block;
}
.current-logo img { height: 40px; width: auto; }
.webhook-note { display: block; margin-top: 8px; color: var(--text-muted); font-size: 0.8rem; }

/* Users */
.page-header { margin-bottom: 16px; }
.count-badge {
    background: var(--bg-alt);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.users-list { display: flex; flex-direction: column; gap: 8px; }
.user-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}
.user-info { flex: 1; }
.user-info h3 { font-size: 0.95rem; margin-bottom: 2px; }
.user-email { font-size: 0.8rem; color: var(--text-muted); }
.user-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
}
.role-tag {
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}
.role-admin { background: #dbeafe; color: #1e40af; }
.role-author { background: #fef3c7; color: #92400e; }
.role-buyer { background: #f3e8ff; color: #6b21a8; }
.institution { color: var(--text-muted); }
.joined { color: var(--text-muted); }

@media (max-width: 600px) {
    .user-item { flex-wrap: wrap; }
    .user-meta { width: 100%; margin-top: 8px; }
}

/* Active nav state */
nav a.active {
    color: var(--primary);
    font-weight: 600;
    position: relative;
}
nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

/* Mobile toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}

/* Mobile nav */
@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    nav { 
        display: none;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    nav.open { display: block; }
    nav ul { 
        flex-direction: column; 
        padding: 8px 0;
        gap: 0;
    }
    nav a { 
        display: block;
        padding: 12px 24px;
        border-radius: 0;
    }
    nav a.active::after {
        left: 24px;
        right: auto;
        width: 40px;
    }
    
    /* Mobile hero */
    .hero { padding: 48px 20px; }
    .hero h1 { font-size: 1.75rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    
    /* Mobile books grid */
    .books-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    
    /* Mobile book detail */
    .book-detail-grid { grid-template-columns: 1fr; }
    .book-detail-cover { max-width: 200px; margin: 0 auto; }
    
    /* Mobile cart */
    .cart-actions { flex-direction: column; }
    .cart-actions .btn { width: 100%; }
}

/* Author Profile */
.author-profile { background: var(--bg-alt); padding: 48px 24px; border-bottom: 1px solid var(--border); }
.author-header { max-width: 800px; margin: 0 auto; display: flex; align-items: center; gap: 24px; }
.author-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    flex-shrink: 0;
}
.author-info h1 { font-size: 1.75rem; margin-bottom: 4px; }
.author-institution { color: var(--text-muted); margin-bottom: 8px; }
.orcid-link { color: var(--accent); font-size: 0.9rem; text-decoration: none; }
.orcid-link:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .author-header { flex-direction: column; text-align: center; }
}

/* Logo with tagline */
.logo-text { display: flex; flex-direction: column; }
.logo-title { font-weight: 700; font-size: 1.35rem; line-height: 1.2; }
.logo-tagline { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }

/* Page hero */
.page-hero {
    background: var(--bg-alt);
    padding: 48px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: 2rem; margin-bottom: 8px; }
.page-hero p { color: var(--text-muted); }

/* Page content */
.page-content { max-width: 800px; }
.content-block { margin-bottom: 32px; }
.content-block h2 { font-size: 1.25rem; margin-bottom: 12px; }
.content-block p { line-height: 1.8; color: var(--text); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info h3 { margin-bottom: 16px; }
.contact-info p { margin-bottom: 8px; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.team-card { text-align: center; padding: 24px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); }
.team-avatar {
    width: 64px; height: 64px; background: var(--primary); color: var(--white);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 600; margin: 0 auto 12px;
}
.team-card h3 { font-size: 1rem; margin-bottom: 4px; }
.team-card p { font-size: 0.85rem; color: var(--text-muted); }

/* How To */
.howto-section { margin-bottom: 48px; }
.howto-section h2 { margin-bottom: 24px; }

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; gap: 32px; }
    .logo-tagline { display: none; }
}

/* Tag badge */
.tag-badge {
    display: inline-block;
    background: var(--bg-alt);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-bottom: 4px;
}

/* Homepage layout */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
}
.home-main .section-header { margin-bottom: 24px; }
.home-sidebar { display: flex; flex-direction: column; gap: 16px; }
.stats-card {
    background: var(--white);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}
.stats-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
.stats-card h3 {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}
.stat-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-alt);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.stat-info { flex: 1; }
.stat-row .stat-label { font-size: 0.75rem; color: var(--text-muted); display: block; }
.stat-row .stat-value { font-size: 1rem; font-weight: 600; color: var(--primary); }
.stats-revenue {
    background: var(--primary);
}
.stats-revenue::before { background: linear-gradient(90deg, var(--accent), #fff); }
.stats-revenue h3 { color: rgba(255,255,255,0.6); }
.stats-revenue .stat-icon { background: rgba(255,255,255,0.1); }
.stats-revenue .stat-label { color: rgba(255,255,255,0.6); }
.stats-revenue .stat-value { color: var(--white); }

@media (max-width: 900px) {
    .home-layout { grid-template-columns: 1fr; }
    .home-sidebar { order: -1; flex-direction: row; flex-wrap: wrap; }
    .stats-card { flex: 1; min-width: 260px; }
}

/* Stats 4 boxes */
.stats-title {
    background: var(--primary);
    color: var(--white) !important;
    margin: -16px -16px 16px -16px !important;
    padding: 12px 16px !important;
    border-radius: 12px 12px 0 0;
    font-size: 0.85rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
.stats-grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.stat-box {
    text-align: center;
    padding: 12px 8px;
    background: var(--bg-alt);
    border-radius: 8px;
}
.stat-box .stat-icon { 
    width: auto; 
    height: auto; 
    background: none; 
    font-size: 1.25rem; 
    margin-bottom: 4px;
}
.stat-box .stat-value { 
    display: block; 
    font-size: 1.1rem; 
    font-weight: 700; 
    color: var(--primary);
}
.stat-box .stat-label { 
    display: block; 
    font-size: 0.7rem; 
    color: var(--text-muted);
    margin-top: 2px;
}

/* Shelf style */
.shelf { margin-bottom: 40px; }
.shelf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.shelf-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}
.shelf-line {
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 50%, transparent 100%);
    margin-bottom: 20px;
    border-radius: 2px;
}

/* Contact for pricing button */
.price-box .btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    padding: 12px 24px;
}
.price-box .btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Justified abstract */
.book-abstract p {
    text-align: justify;
    line-height: 1.8;
}

/* DOI line */
.doi-line {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.doi-line a {
    color: var(--primary);
    text-decoration: none;
}
.doi-line a:hover { text-decoration: underline; }

/* DOI on cards */
.doi-small {
    display: block;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
    margin-top: 2px;
    margin-bottom: 4px;
}
.doi-small a {
    color: var(--primary);
    text-decoration: none;
}
.doi-small a:hover { text-decoration: underline; }

/* DOI line on cards */
.doi-line-card {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px 8px;
    font-size: 0.75rem;
}
.doi-line-card span {
    color: var(--text-muted);
    font-weight: 500;
}
.doi-line-card a {
    color: var(--primary);
    text-decoration: none;
    word-break: break-all;
}
.doi-line-card a:hover { text-decoration: underline; }

/* Book card as div */
.book-card { display: block; }
.book-card > a { text-decoration: none; color: inherit; display: block; }

/* Latest publications */
.latest-list { display: flex; flex-direction: column; gap: 8px; }
.latest-item {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    background: var(--bg-alt);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s;
}
.latest-item:hover { background: var(--border); }
.latest-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
    line-height: 1.3;
}
.latest-author {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}
