/*
 * ePaper SaaS Platform
 * Developed by Netmore Technology, Jamshedpur, India
 * Crafted with love in Jamshedpur, by Netmore Technology.
 * (c) 2026 Netmore Technology. All rights reserved.
 */

:root {
    --primary: #e53935;
    --primary-dark: #c62828;
    --primary-light: #ff6f60;
    --secondary: #858796;
    --success: #1cc88a;
    --info: #36b9cc;
    --warning: #f6c23e;
    --danger: #e74a3b;
    --light: #f5f7fa;
    --dark: #2d3436;
    --sidebar-width: 250px;
    --sidebar-bg: #ffffff;
    --sidebar-text: #636e72;
    --sidebar-active: #e53935;
    --sidebar-hover-bg: #fff5f5;
    --topnav-height: 60px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light);
    color: #333;
    margin: 0;
}

/* ========== SIDEBAR - White Clean Style ========== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1000;
    overflow-y: auto;
    transition: all 0.3s ease;
    border-right: 1px solid #e9ecef;
    box-shadow: 2px 0 8px rgba(0,0,0,0.04);
}

.sidebar-brand {
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    min-height: 65px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.brand-text h3 {
    margin: 0;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
    line-height: 1.2;
    text-transform: uppercase;
}
.brand-text small {
    font-size: 0.65rem;
    color: #999;
    text-transform: italic;
    letter-spacing: 0.5px;
}

.sidebar-collapse-btn {
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
    transition: color 0.2s;
}
.sidebar-collapse-btn:hover { color: #333; }

.sidebar-nav {
    padding: 8px 0;
    list-style: none;
    margin: 0;
}

.sidebar-nav .nav-section {
    padding: 18px 18px 6px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #adb5bd;
    font-weight: 700;
}

.sidebar-nav .nav-item a {
    display: flex;
    align-items: center;
    padding: 9px 18px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
    margin: 1px 0;
}

.sidebar-nav .nav-item a:hover {
    color: var(--sidebar-active);
    background: var(--sidebar-hover-bg);
    border-left-color: var(--primary-light);
}

.sidebar-nav .nav-item a.active {
    color: var(--sidebar-active);
    background: var(--sidebar-hover-bg);
    border-left-color: var(--sidebar-active);
    font-weight: 600;
}

.sidebar-nav .nav-item a i {
    width: 22px;
    margin-right: 10px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}
.sidebar-nav .nav-item a:hover i,
.sidebar-nav .nav-item a.active i {
    opacity: 1;
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* ========== SIDEBAR DARK THEME (Admin) ========== */
.sidebar.sidebar-dark {
    background: linear-gradient(180deg, #0f0c29 0%, #1a1a2e 40%, #16213e 100%);
    border-right: 1px solid rgba(255,255,255,0.06);
    box-shadow: 2px 0 12px rgba(0,0,0,0.2);
}
.sidebar-dark::-webkit-scrollbar-thumb { background: #333; }
.sidebar-dark .sidebar-brand {
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-dark .brand-icon {
    background: rgba(229,57,53,0.2);
    color: #ff6f60;
}
.sidebar-dark .brand-text h3 {
    color: #fff;
    text-transform: none;
    font-size: 1rem;
}
.sidebar-dark .brand-text small {
    color: rgba(255,255,255,0.35);
}
.sidebar-dark .sidebar-nav .nav-section {
    color: rgba(255,255,255,0.25);
}
.sidebar-dark .sidebar-nav .nav-item a {
    color: rgba(255,255,255,0.55);
    border-left-color: transparent;
}
.sidebar-dark .sidebar-nav .nav-item a i {
    opacity: 0.5;
}
.sidebar-dark .sidebar-nav .nav-item a:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
    border-left-color: rgba(229,57,53,0.5);
}
.sidebar-dark .sidebar-nav .nav-item a:hover i {
    opacity: 1;
    color: #ff6f60;
}
.sidebar-dark .sidebar-nav .nav-item a.active {
    color: #fff;
    background: rgba(229,57,53,0.12);
    border-left-color: #e53935;
    font-weight: 600;
}
.sidebar-dark .sidebar-nav .nav-item a.active i {
    opacity: 1;
    color: #ff6f60;
}
.sidebar-dark .sidebar-collapse-btn {
    color: rgba(255,255,255,0.3);
}
.sidebar-dark .sidebar-collapse-btn:hover {
    color: #fff;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--light);
}

/* ========== TOPNAV ========== */
.topnav {
    background: #fff;
    padding: 0 25px;
    height: var(--topnav-height);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid #eee;
}

.topnav .page-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.topnav .user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-open-epaper {
    background: var(--primary);
    color: #fff !important;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}
.btn-open-epaper:hover {
    background: var(--primary-dark);
    color: #fff !important;
}

.user-avatar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s;
}
.user-avatar-btn:hover { border-color: var(--primary); }

.topnav .user-info {
    text-align: right;
}
.topnav .user-info .name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}
.topnav .user-info .role {
    font-size: 0.75rem;
    color: var(--secondary);
}

.topnav .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ========== CONTENT AREA ========== */
.content-area {
    padding: 25px;
}

/* ========== STAT CARDS ========== */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-left: 4px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.stat-card.border-success { border-left-color: var(--success); }
.stat-card.border-info { border-left-color: var(--info); }
.stat-card.border-warning { border-left-color: var(--warning); }
.stat-card.border-danger { border-left-color: var(--danger); }

.stat-card .stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 5px;
}
.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}
.stat-card .stat-icon {
    font-size: 2rem;
    color: #e0e0e0;
}

/* ========== CARDS ========== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    margin-bottom: 20px;
    background: #fff;
}
.card-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px 12px 0 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========== TABLES - Launching Press Style ========== */
.lp-table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    overflow: hidden;
}

.lp-table-header {
    padding: 20px 24px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.lp-table-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.lp-table-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-search {
    position: relative;
}
.lp-search input {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 14px 8px 36px;
    font-size: 0.85rem;
    width: 220px;
    transition: border-color 0.2s;
    outline: none;
}
.lp-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(229,57,53,0.1);
}
.lp-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 0.85rem;
}

.lp-filter-btn,
.lp-view-btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    color: #666;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
    position: relative;
}
.lp-filter-btn:hover,
.lp-view-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.filter-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table {
    margin-bottom: 0;
}
.table thead th {
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: none;
    letter-spacing: 0;
    color: #555;
    border-top: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 16px;
    white-space: nowrap;
}
.table thead th .sort-icon {
    color: #ccc;
    margin-left: 4px;
    font-size: 0.7rem;
}
.table tbody td {
    vertical-align: middle;
    padding: 14px 16px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.9rem;
    color: #444;
}
.table tbody tr:hover {
    background: #fafafa;
}
.table tbody tr:last-child td {
    border-bottom: none;
}
.table .checkbox-col {
    width: 40px;
}
.table .form-check-input {
    cursor: pointer;
}

/* Action links - text style like screenshot */
.action-link {
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    margin-right: 12px;
    white-space: nowrap;
}
.action-link:hover { text-decoration: underline; }
.action-link i { margin-right: 3px; font-size: 0.78rem; }
.action-view { color: #888; }
.action-edit { color: var(--primary); }
.action-open { color: var(--success); }
.action-delete { color: #e53935; }
.action-delete:hover { color: var(--primary-dark); }

/* Pagination */
.lp-table-footer {
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    font-size: 0.85rem;
    color: #888;
}
.lp-table-footer .per-page {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lp-table-footer select {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.85rem;
    outline: none;
}

.btn-new-edition {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}
.btn-new-edition:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* ========== BUTTONS ========== */
.btn { border-radius: 8px; font-weight: 500; }
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ========== BADGES ========== */
.badge { border-radius: 6px; font-weight: 500; padding: 5px 10px; }

/* ========== PROGRESS ========== */
.progress { border-radius: 10px; height: 10px; }

.storage-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
}
.storage-bar .fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s;
}

/* ========== MOBILE TOGGLE ========== */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--dark);
    cursor: pointer;
    padding: 8px;
    -webkit-tap-highlight-color: transparent;
}

/* ========== RESPONSIVE - TABLET ========== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: block;
    }
    .content-area {
        padding: 18px;
    }
    .topnav {
        padding: 0 15px;
    }
    .topnav .page-title {
        font-size: 1rem;
    }
    .lp-table-header {
        flex-direction: column;
        align-items: stretch;
    }
    .lp-search input { width: 100%; }
    .lp-table-controls {
        flex-wrap: wrap;
    }
    /* Cards responsive */
    .stat-card {
        padding: 16px;
    }
    .stat-card .stat-value {
        font-size: 1.3rem;
    }
    .stat-card .stat-icon {
        font-size: 1.5rem;
    }
    /* Settings responsive */
    .settings-card .settings-body {
        padding: 16px;
    }
    .gateway-option {
        padding: 14px;
    }
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 768px) {
    .content-area {
        padding: 12px;
    }
    .topnav {
        padding: 0 12px;
        height: 54px;
    }
    .topnav .page-title {
        font-size: 0.92rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 180px;
    }
    .topnav .user-menu {
        gap: 8px;
    }
    .btn-open-epaper {
        padding: 6px 12px;
        font-size: 0.78rem;
    }
    .btn-open-epaper span.d-none-mobile { display: none; }
    .user-avatar-btn {
        width: 34px;
        height: 34px;
        font-size: 0.82rem;
    }
    .topnav .user-info .name {
        font-size: 0.82rem;
    }
    .topnav .user-info .role {
        font-size: 0.7rem;
    }
    /* Stat cards */
    .stat-card {
        padding: 14px;
        border-radius: 10px;
    }
    .stat-card .stat-value {
        font-size: 1.15rem;
    }
    .stat-card .stat-label {
        font-size: 0.68rem;
    }
    .stat-card .stat-icon {
        font-size: 1.3rem;
    }
    /* Cards */
    .card {
        border-radius: 10px;
        margin-bottom: 14px;
    }
    .card-header {
        padding: 12px 14px;
        font-size: 0.88rem;
        flex-wrap: wrap;
        gap: 8px;
    }
    .card-body { padding: 14px; }
    /* Tables - mobile card style */
    .table thead th {
        font-size: 0.75rem;
        padding: 10px 8px;
        white-space: nowrap;
    }
    .table tbody td {
        font-size: 0.82rem;
        padding: 10px 8px;
    }
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
    /* Action buttons stacking */
    .btn-action {
        padding: 5px 7px;
        font-size: 0.75rem;
    }
    .action-link {
        font-size: 0.78rem;
        margin-right: 8px;
    }
    /* LP Table */
    .lp-table-header {
        padding: 14px 16px 12px;
        flex-direction: column;
        align-items: stretch;
    }
    .lp-table-header h2 {
        font-size: 1.15rem;
    }
    .lp-table-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    .lp-search input {
        width: 100%;
    }
    .lp-table-footer {
        padding: 10px 14px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .btn-new-edition {
        padding: 8px 16px;
        font-size: 0.82rem;
        width: 100%;
        justify-content: center;
    }
    /* Forms */
    .form-control, .form-select {
        padding: 9px 12px;
        font-size: 0.88rem;
    }
    /* Buttons */
    .btn { font-size: 0.85rem; }
    .btn-sm { font-size: 0.78rem; }
    /* Sidebar brand truncation */
    .brand-text h3 {
        font-size: 0.85rem;
    }
    .sidebar {
        width: 270px;
    }
    /* Settings page */
    .settings-card .settings-header {
        padding: 14px 16px;
    }
    .settings-card .settings-header h5 {
        font-size: 0.95rem;
    }
    .settings-card .settings-body {
        padding: 14px 16px;
    }
    .settings-nav li a {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    .gateway-option {
        padding: 14px 10px;
    }
    /* Empty state */
    .empty-state {
        padding: 40px 15px;
    }
    .empty-state i {
        font-size: 3rem;
    }
    /* Edition cards */
    .edition-card img {
        height: 160px;
    }
    .edition-card .card-body {
        padding: 12px;
    }
    /* Badges */
    .badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

/* ========== RESPONSIVE - SMALL MOBILE ========== */
@media (max-width: 480px) {
    .content-area {
        padding: 10px;
    }
    .topnav {
        padding: 0 10px;
        height: 50px;
    }
    .topnav .page-title {
        font-size: 0.85rem;
        max-width: 140px;
    }
    .stat-card .stat-value {
        font-size: 1rem;
    }
    .stat-card .stat-icon {
        font-size: 1.1rem;
    }
    .card-header {
        padding: 10px 12px;
        font-size: 0.82rem;
    }
    .card-body { padding: 12px; }
    .lp-table-header h2 {
        font-size: 1rem;
    }
    /* Table scrolls horizontally on tiny screens */
    .table-responsive {
        font-size: 0.8rem;
    }
    .btn-new-edition {
        padding: 8px 14px;
        font-size: 0.78rem;
    }
    .sidebar {
        width: 260px;
    }
    .sidebar-nav .nav-item a {
        padding: 8px 14px;
        font-size: 0.84rem;
    }
    .sidebar-nav .nav-section {
        padding: 14px 14px 5px;
        font-size: 0.65rem;
    }
}

/* ========== TOUCH FRIENDLY UTILITIES ========== */
@media (pointer: coarse) {
    .btn, .btn-action, .action-link, .pub-nav-link, .pub-pg-btn,
    .sidebar-nav .nav-item a, .settings-nav li a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    .sidebar-nav .nav-item a {
        display: flex;
    }
    .table tbody td {
        padding: 12px 8px;
    }
    .dropdown-item {
        padding: 10px 16px;
    }
}

/* ========== PREVENT HORIZONTAL OVERFLOW ========== */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}
.container, .container-fluid {
    overflow-x: hidden;
}

/* ========== FLIPBOOK STYLES ========== */
.flipbook-container {
    background: #2c3e50;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.flipbook-toolbar {
    background: #1a252f;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}
.flipbook-toolbar .title {
    font-weight: 600;
    font-size: 1rem;
}
.flipbook-toolbar .controls {
    display: flex;
    gap: 10px;
    align-items: center;
}
.flipbook-toolbar .btn-tool {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.flipbook-toolbar .btn-tool:hover { background: rgba(255,255,255,0.2); }

.flipbook-viewer {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}
.flipbook-viewer img {
    max-height: calc(100vh - 120px);
    max-width: 100%;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    transition: transform 0.3s;
}

.flipbook-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 15px 12px;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    border-radius: 8px;
    transition: background 0.2s;
}
.flipbook-nav:hover { background: rgba(0,0,0,0.8); }
.flipbook-nav.prev { left: 15px; }
.flipbook-nav.next { right: 15px; }

.page-indicator {
    color: #fff;
    font-size: 0.9rem;
    padding: 5px 15px;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
}

.page-thumbnails {
    background: #1a252f;
    padding: 10px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    justify-content: center;
}
.page-thumb {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
}
.page-thumb.active,
.page-thumb:hover {
    border-color: var(--primary);
    opacity: 1;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary);
}
.empty-state i {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.3;
}
.empty-state h5 { font-weight: 600; color: #555; }

/* ========== FORMS ========== */
.form-group { margin-bottom: 1rem; }
.form-label { font-weight: 500; color: #555; margin-bottom: 5px; font-size: 0.88rem; }
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(229,57,53,0.1);
}

/* ========== OVERLAY ========== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.sidebar-overlay.show { display: block; }

/* ========== ACTION BUTTONS ========== */
.btn-action {
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* ========== EDITION CARDS (Archive) ========== */
.edition-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.edition-card:hover { transform: translateY(-4px); }
.edition-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.edition-card .card-body { padding: 15px; }
.edition-card .date { font-size: 0.8rem; color: var(--secondary); }
.edition-card .title { font-weight: 600; margin: 5px 0; }

/* ========== SETTINGS PAGE ========== */
.settings-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    overflow: hidden;
}
.settings-card .settings-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.settings-card .settings-header .icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
}
.settings-card .settings-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.05rem;
}
.settings-card .settings-header p {
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: #999;
}
.settings-card .settings-body {
    padding: 24px;
}

.gateway-option {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.gateway-option:hover,
.gateway-option.selected {
    border-color: var(--primary);
    background: #fff5f5;
}
.gateway-option img {
    height: 40px;
    margin-bottom: 8px;
}
.gateway-option .name {
    font-weight: 600;
    font-size: 0.95rem;
}
.gateway-option .badge-live {
    background: var(--success);
    color: #fff;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 10px;
}
.gateway-option .badge-test {
    background: var(--warning);
    color: #333;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 10px;
}

.settings-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.settings-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}
.settings-nav li a:hover,
.settings-nav li a.active {
    background: #fff5f5;
    color: var(--primary);
    border-left-color: var(--primary);
}
.settings-nav li a i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

/* ========== READER NAVBAR ========== */
.reader-navbar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 15px 0;
}
.reader-navbar a { color: #fff; text-decoration: none; }
.reader-navbar .brand { font-weight: 700; font-size: 1.3rem; }
