/**
 * İKRA Topluluk — Community Platform Styles
 * Left sidebar · Instagram/Twitter hybrid · Teal palette
 */

:root {
    /* ── Teal Palette ── */
    --c-primary: #0f766e;
    --c-primary-hover: #0d6560;
    --c-primary-light: #eefbf9;
    --c-primary-pale: #f5fdfc;
    --c-accent: #0d9488;
    --c-accent-light: #d5f5f0;
    --c-accent-hover: #0b7f74;

    /* Base Tones */
    --c-bg: #fafafa;
    --c-surface: #ffffff;
    --c-border: #efefef;
    --c-border-dark: #dbdbdb;
    --c-text: #262626;
    --c-text-secondary: #555555;
    --c-text-muted: #8e8e8e;

    /* Semantic */
    --c-danger: #dc2626;
    --c-danger-light: #fef2f2;
    --c-success: #059669;
    --c-success-light: #ecfdf5;
    --c-warning: #d97706;
    --c-warning-light: #fffbeb;
    --c-like: #ed4956;
    --c-like-light: #fef2f3;
    --c-bookmark: #0d9488;
    --c-bookmark-light: #d5f5f0;
    --c-share: #0f766e;

    /* Typography */
    --c-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing & Shapes */
    --c-radius: 12px;
    --c-radius-sm: 8px;
    --c-radius-xs: 6px;
    --c-radius-full: 9999px;
    --c-shadow: 0 1px 2px rgba(0,0,0,.04);
    --c-shadow-md: 0 4px 12px rgba(0,0,0,.06);
    --c-shadow-lg: 0 10px 30px rgba(0,0,0,.1);

    /* Layout */
    --c-sidebar-w: 240px;
    --c-content-max-w: 600px;
    --c-mobile-nav-h: 52px;
    --c-transition: .2s ease;
}

/* ── Dark Theme ── */
[data-theme="dark"] {
    --c-primary: #14b8a6;
    --c-primary-hover: #0d9488;
    --c-primary-light: #0f2b29;
    --c-primary-pale: #0a1f1e;
    --c-accent: #2dd4bf;
    --c-accent-light: #132e2b;
    --c-accent-hover: #14b8a6;

    --c-bg: #0a0a0a;
    --c-surface: #141414;
    --c-border: #262626;
    --c-border-dark: #333333;
    --c-text: #e5e5e5;
    --c-text-secondary: #a3a3a3;
    --c-text-muted: #737373;

    --c-danger-light: #1c0a0a;
    --c-success-light: #071a14;
    --c-warning-light: #1a1305;
    --c-like-light: #1c0a0b;
    --c-bookmark-light: #0f2b29;

    --c-shadow: 0 1px 2px rgba(0,0,0,.2);
    --c-shadow-md: 0 4px 12px rgba(0,0,0,.3);
    --c-shadow-lg: 0 10px 30px rgba(0,0,0,.4);
}
[data-theme="dark"] img { opacity: .92; }
[data-theme="dark"] .c-loading-screen { background: #0a0a0a; }
[data-theme="dark"] .c-featured-book {
    background: linear-gradient(135deg, #0f2b29 0%, #132e2b 50%, #0a1f1e 100%);
    border-color: var(--c-accent);
    box-shadow: 0 2px 12px rgba(13,148,136,.15);
}
[data-theme="dark"] .c-featured-book::before {
    background: linear-gradient(135deg, transparent 60%, rgba(45,212,191,.06) 100%);
}
[data-theme="dark"] .c-featured-book:hover {
    box-shadow: 0 8px 24px rgba(13,148,136,.2);
}
[data-theme="dark"] .c-featured-badge {
    background: linear-gradient(135deg, #14b8a6, #2dd4bf);
    box-shadow: 0 2px 8px rgba(20,184,166,.25);
}
[data-theme="dark"] .c-featured-info h2 a { color: #e5e5e5; }
[data-theme="dark"] .c-featured-cta { color: var(--c-accent); }
[data-theme="dark"] .c-spoiler { background: var(--c-warning-light); border-color: #4a3d1a; }
[data-theme="dark"] .c-spoiler:hover { background: #231e0e; }

/* ══════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--c-font); color: var(--c-text); background: var(--c-bg); -webkit-font-smoothing: antialiased; }
.c-app { display: flex; min-height: 100vh; font-family: var(--c-font); }
.c-app a { color: var(--c-primary); text-decoration: none; transition: color var(--c-transition); }
.c-app a:hover { color: var(--c-primary-hover); }
.c-app img { max-width: 100%; display: block; }

/* ══════════════════════════════════════════════
   LOADING SCREEN
   ══════════════════════════════════════════════ */
.c-loading-screen {
    position: fixed; inset: 0; z-index: 9999; background: var(--c-surface);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity .4s, visibility .4s;
}
.c-loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.c-loading-logo { margin-bottom: 24px; }
.c-loading-logo img { max-width: 160px; max-height: 48px; object-fit: contain; }
.c-loading-logo .text-logo { font-size: 1.8rem; font-weight: 800; color: var(--c-primary); letter-spacing: -.5px; }
.c-loading-bar { width: 100px; height: 3px; background: var(--c-border-dark); border-radius: 3px; overflow: hidden; }
.c-loading-bar::after {
    content: ''; display: block; width: 40%; height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
    animation: c-loading-slide 1s ease-in-out infinite;
}
@keyframes c-loading-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* ══════════════════════════════════════════════
   LEFT SIDEBAR
   ══════════════════════════════════════════════ */
.c-sidebar {
    position: fixed; left: 0; top: 0;
    width: var(--c-sidebar-w); height: 100vh;
    background: var(--c-surface); border-right: 1px solid var(--c-border);
    display: flex; flex-direction: column;
    padding: 0 12px; z-index: 100;
}
.c-sidebar-header {
    padding: 20px 8px 16px;
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 8px;
}
.c-sidebar-logo {
    display: flex; align-items: center; gap: 8px; text-decoration: none;
}
.c-sidebar-logo-img { height: 28px; max-width: 110px; object-fit: contain; }
.c-sidebar-logo-text {
    font-size: 1.3rem; font-weight: 800; color: var(--c-primary); letter-spacing: -.3px;
}
.c-sidebar-logo-sub {
    font-size: .72rem; color: var(--c-text-muted); font-weight: 500;
}

/* ── Sidebar Navigation ── */
.c-sidebar-nav {
    flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px;
    padding: 8px 0; overflow-y: auto;
}
.c-sidebar-link {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 14px; border-radius: var(--c-radius);
    font-size: .92rem; font-weight: 500; color: var(--c-text);
    transition: all .15s; position: relative; white-space: nowrap;
}
.c-sidebar-link:hover { background: var(--c-primary-light); color: var(--c-primary); }
.c-sidebar-link.active { font-weight: 700; color: var(--c-primary); background: var(--c-primary-light); }
.c-sidebar-link i { font-size: 1.15rem; width: 24px; text-align: center; flex-shrink: 0; opacity: .55; transition: opacity .15s; }
.c-sidebar-link:hover i { opacity: .8; }
.c-sidebar-link.active i { opacity: 1; }
.c-sidebar-badge {
    min-width: 18px; height: 18px; background: var(--c-like); color: #fff;
    font-size: .6rem; border-radius: 50%; display: inline-flex; align-items: center;
    justify-content: center; font-weight: 700; padding: 0 5px; margin-left: auto;
}

/* ── Sidebar Footer / Profile ── */
.c-sidebar-footer {
    border-top: 1px solid var(--c-border);
    padding: 12px 0 8px;
}
.c-sidebar-auth { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.c-sidebar-profile-btn {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 10px 12px; border-radius: var(--c-radius-sm);
    background: transparent; border: none;
    cursor: pointer; transition: background .15s;
    text-align: left; font-family: var(--c-font); color: var(--c-text);
}
.c-sidebar-profile-btn:hover {
    background: var(--c-bg);
}
/* Override: when dropdown-trigger is inside sidebar footer, use sidebar styles */
.c-sidebar-footer .c-dropdown-trigger {
    padding: 10px 12px; border-radius: var(--c-radius-sm);
    color: var(--c-text); width: 100%;
}
.c-sidebar-footer .c-dropdown-trigger:hover {
    background: var(--c-bg);
}
.c-sidebar-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.c-sidebar-user-info { flex: 1; min-width: 0; }
.c-sidebar-name {
    display: block; font-weight: 700; font-size: .85rem; color: var(--c-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.c-sidebar-handle { display: block; font-size: .78rem; color: var(--c-text-muted); }
.c-sidebar-profile-btn > .fa-ellipsis { color: var(--c-text-muted); font-size: .7rem; flex-shrink: 0; }

/* ══════════════════════════════════════════════
   CONTENT AREA & MAIN
   ══════════════════════════════════════════════ */
.c-content-area {
    margin-left: var(--c-sidebar-w);
    flex: 1; min-height: 100vh; background: var(--c-bg);
}
.c-main {
    max-width: var(--c-content-max-w);
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* ══════════════════════════════════════════════
   PAGE TITLE
   ══════════════════════════════════════════════ */
.c-page-title {
    background: var(--c-surface);
    padding: 14px 20px;
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius);
    margin-bottom: 12px;
    font-size: 1.1rem; font-weight: 700; letter-spacing: -.2px;
}
.c-page-title small {
    font-size: .78rem; font-weight: 500; color: var(--c-text-muted);
    display: block; margin-top: 2px;
}

/* ── Feed Tabs ── */
.c-feed-tabs {
    display: flex; background: var(--c-surface);
    border: 1px solid var(--c-border); border-radius: var(--c-radius);
    margin-bottom: 12px; overflow: hidden;
}
.c-feed-tab {
    flex: 1; padding: 13px 16px; border: none; background: none;
    font-family: var(--c-font); font-size: .92rem; font-weight: 600;
    color: var(--c-text-muted); cursor: pointer;
    position: relative; transition: all .2s;
}
.c-feed-tab:hover { color: var(--c-text-secondary); background: var(--c-bg); }
.c-feed-tab.active { color: var(--c-primary); }
.c-feed-tab.active::after {
    content: ''; position: absolute; bottom: 0; left: 20%; right: 20%;
    height: 3px; background: var(--c-primary); border-radius: 3px 3px 0 0;
}

/* ══════════════════════════════════════════════
   REVIEW CARDS
   ══════════════════════════════════════════════ */
.c-review {
    background: var(--c-surface);
    border: 1px solid var(--c-border-dark);
    border-radius: var(--c-radius);
    margin-bottom: 10px;
    padding: 16px 20px;
    transition: box-shadow var(--c-transition);
    position: relative; overflow: hidden;
}
.c-review:hover { box-shadow: 0 2px 12px rgba(15,118,110,.06); }
.c-review-header { display: flex; align-items: flex-start; gap: 12px; }
.c-review-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.c-review-user { flex: 1; min-width: 0; }
.c-review-user-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.c-review-name { font-weight: 700; font-size: .88rem; color: var(--c-text); }
.c-review-name:hover { text-decoration: underline; }
.c-review-handle { font-size: .82rem; color: var(--c-text-muted); }
.c-review-dot { color: var(--c-text-muted); font-size: .6rem; }
.c-review-time { font-size: .82rem; color: var(--c-text-muted); }
.c-review-time:hover { text-decoration: underline; }
.c-review-meta { flex: 1; min-width: 0; }
.c-review-book-tag {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .75rem; color: var(--c-primary); background: var(--c-primary-light);
    padding: 2px 10px; border-radius: var(--c-radius-full);
    margin-top: 3px; font-weight: 600; transition: all var(--c-transition);
}
.c-review-book-tag:hover { background: var(--c-accent-light); color: var(--c-primary-hover); }
.c-review-book-tag img { width: 14px; height: 20px; border-radius: 2px; object-fit: cover; }
.c-review-book-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .75rem; color: var(--c-primary); background: var(--c-primary-light);
    padding: 3px 10px; border-radius: var(--c-radius-full); font-weight: 600; margin-left: auto;
    transition: all var(--c-transition); flex-shrink: 0;
}
.c-review-book-badge:hover { background: var(--c-accent-light); color: var(--c-primary-hover); }
.c-review-book-badge:hover span { color: var(--c-primary-hover); }
.c-review-book-badge img { width: 14px; height: 20px; border-radius: 2px; object-fit: cover; }
.c-review-body { margin-top: 10px; }
.c-review-content { font-size: .93rem; line-height: 1.65; word-wrap: break-word; white-space: normal; }
.c-review-image { margin-top: 12px; border-radius: var(--c-radius-sm); overflow: hidden; border: 1px solid var(--c-border); }
.c-review-image img { width: 100%; max-height: 512px; object-fit: cover; }
.c-review-actions {
    display: flex; gap: 6px; padding-top: 10px; margin-top: 10px;
    border-top: 1px solid var(--c-border);
}

/* ── Action Buttons ── */
.c-action-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; font-size: .8rem; color: var(--c-text-muted);
    background: none; border: 1px solid transparent; border-radius: var(--c-radius-full);
    cursor: pointer; transition: all .15s;
}
.c-action-btn:hover { border-color: var(--c-border-dark); background: var(--c-primary-pale); }
.c-action-btn .count { font-size: .78rem; }
.c-action-btn .action-circle {
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.c-action-btn.c-action-comment:hover { color: var(--c-primary); border-color: var(--c-primary-light); background: var(--c-primary-light); }
.c-action-btn.c-action-like:hover { color: var(--c-like); border-color: var(--c-like-light); background: var(--c-like-light); }
.c-action-btn.c-action-bookmark:hover { color: var(--c-bookmark); border-color: var(--c-bookmark-light); background: var(--c-bookmark-light); }
.c-action-btn.c-action-share:hover { color: var(--c-share); border-color: var(--c-primary-light); background: var(--c-primary-light); }
.c-action-btn.c-action-view { cursor: default; border-color: transparent !important; background: none !important; }
.c-action-btn.liked { color: var(--c-like); }
.c-action-btn.liked:hover { background: var(--c-like-light); border-color: var(--c-like-light); }
.c-action-btn.bookmarked { color: var(--c-bookmark); }
.c-action-btn.bookmarked:hover { background: var(--c-bookmark-light); border-color: var(--c-bookmark-light); }

/* ══════════════════════════════════════════════
   SPOILER
   ══════════════════════════════════════════════ */
.c-spoiler { background: var(--c-warning-light); border: 1px solid #f0d78c; border-radius: var(--c-radius-sm); padding: 12px 16px; text-align: center; cursor: pointer; }
.c-spoiler:hover { background: #fef3d1; }
.c-spoiler-cover { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .88rem; color: var(--c-text-secondary); font-weight: 500; }
.c-spoiler-cover i { color: var(--c-warning); }
.c-spoiler-text { text-align: left; margin-top: 10px; }
.c-spoiler-reveal { font-size: .78rem; padding: 2px 10px; margin-left: 8px; }

/* ══════════════════════════════════════════════
   FEATURED BOOK
   ══════════════════════════════════════════════ */
.c-featured-book {
    background: linear-gradient(135deg, #d5f5f0 0%, #c0ede7 50%, #b0e5dd 100%);
    border: 2px solid var(--c-accent);
    border-radius: var(--c-radius);
    padding: 22px 20px; margin-bottom: 12px;
    cursor: pointer; position: relative;
    transition: all .25s ease;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(13,148,136,.10);
}
.c-featured-book::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(13,148,136,.08) 100%);
    pointer-events: none;
}
.c-featured-book:hover { box-shadow: 0 8px 24px rgba(15,118,110,.12); transform: translateY(-1px); }
.c-featured-book a { position: relative; z-index: 1; }
.c-featured-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    color: #fff;
    font-size: .72rem; font-weight: 700; padding: 5px 14px;
    border-radius: var(--c-radius-full); margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(15,118,110,.2);
}
.c-featured-badge i { font-size: .7rem; animation: c-star-pulse 2s ease-in-out infinite; }
@keyframes c-star-pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.c-featured-inner { display: flex; gap: 18px; position: relative; z-index: 1; }
.c-featured-cover { flex-shrink: 0; }
.c-featured-cover img {
    width: 105px; height: 152px; border-radius: var(--c-radius-sm);
    object-fit: cover; box-shadow: 0 6px 20px rgba(0,0,0,.12);
    transition: transform .25s;
}
.c-featured-book:hover .c-featured-cover img { transform: scale(1.03); }
.c-featured-info { flex: 1; }
.c-featured-info h2 { font-size: 1.08rem; font-weight: 800; margin-bottom: 3px; line-height: 1.3; }
.c-featured-info h2 a { color: var(--c-text); }
.c-featured-info h2 a:hover { color: var(--c-primary); }
.c-featured-author { font-size: .82rem; color: var(--c-text-muted); margin-bottom: 6px; }
.c-featured-desc { font-size: .82rem; color: var(--c-text-secondary); line-height: 1.5; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-featured-meta { display: flex; gap: 14px; font-size: .78rem; color: var(--c-text-muted); }
.c-featured-meta span { display: flex; align-items: center; gap: 4px; }
.c-featured-cta {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .8rem; font-weight: 700; color: var(--c-primary);
    margin-top: 10px; transition: gap .2s;
}
.c-featured-book:hover .c-featured-cta { gap: 10px; }

/* ══════════════════════════════════════════════
   COMPOSE BOX
   ══════════════════════════════════════════════ */
.c-compose {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--c-radius); padding: 16px 20px;
    margin-bottom: 12px;
}
.c-compose-inner { display: flex; gap: 12px; }
.c-compose-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.c-compose-body { flex: 1; }
.c-compose-book-select { margin-bottom: 8px; }
.c-compose-book-select select {
    width: 100%; height: 36px; border: 1px solid var(--c-border-dark); border-radius: var(--c-radius-sm);
    padding: 0 10px; font-size: .82rem; font-family: var(--c-font); color: var(--c-text);
    background: var(--c-surface); outline: none; cursor: pointer;
}
.c-compose-book-search-wrap { position: relative; }
.c-compose-book-search {
    width: 100%; height: 36px; border: 1px solid var(--c-border-dark); border-radius: var(--c-radius-sm);
    padding: 0 10px; font-size: .82rem; font-family: var(--c-font); color: var(--c-text);
    background: var(--c-bg); outline: none; box-sizing: border-box; transition: all var(--c-transition);
}
.c-compose-book-search:focus { border-color: var(--c-primary); background: var(--c-surface); box-shadow: 0 0 0 3px var(--c-primary-light); }
.c-compose-book-dropdown {
    position: absolute; left: 0; right: 0; top: 100%; max-height: 200px; overflow-y: auto;
    background: var(--c-surface); border: 1px solid var(--c-border-dark); border-radius: var(--c-radius-sm);
    box-shadow: var(--c-shadow-lg); z-index: 50; margin-top: 2px;
}
.c-compose-book-option {
    padding: 8px 12px; cursor: pointer; transition: background .1s; display: flex; flex-direction: column;
}
.c-compose-book-option:hover { background: var(--c-primary-light); }
.c-compose-book-option strong { font-size: .82rem; font-weight: 600; }
.c-compose-book-option small { font-size: .72rem; color: var(--c-text-muted); }
.c-compose-book-no-result { padding: 10px 12px; font-size: .82rem; color: var(--c-text-muted); text-align: center; }
.c-compose-book-selected {
    display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px;
    background: var(--c-primary-light); border: 1px solid var(--c-primary); border-radius: var(--c-radius-sm);
    font-size: .82rem; font-weight: 600; color: var(--c-primary);
}
.c-compose-book-selected span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-compose-book-clear {
    background: none; border: none; color: var(--c-text-muted); cursor: pointer; font-size: .75rem; padding: 2px 4px; border-radius: 50%;
}
.c-compose-book-clear:hover { color: var(--c-danger); }
.c-compose textarea, .c-compose-textarea {
    width: 100%; min-height: 52px; border: none; outline: none; resize: none;
    font-family: var(--c-font); font-size: .95rem; line-height: 1.5;
    color: var(--c-text); padding: 8px 0; background: transparent;
}
.c-compose textarea::placeholder { color: var(--c-text-muted); }
.c-compose-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--c-border); }
.c-compose-options { display: flex; align-items: center; gap: 2px; }
.c-compose-option {
    width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; color: var(--c-accent); cursor: pointer; border: none;
    background: none; font-size: .9rem; transition: background var(--c-transition);
}
.c-compose-option:hover { background: var(--c-accent-light); }
.c-compose-option.active { color: var(--c-warning); background: var(--c-warning-light); }
/* Spoiler toggle with text label */
#spoilerToggle { width: auto; border-radius: var(--c-radius-full); padding: 0 10px; gap: 5px; font-size: .8rem; }
#spoilerToggle i { font-size: .82rem; }
.c-spoiler-label { font-size: .75rem; font-weight: 600; }
.c-compose-right { display: flex; align-items: center; gap: 10px; }
.c-compose-char { font-size: .75rem; color: var(--c-text-muted); font-weight: 500; transition: color .2s; }
.c-compose-char.warn { color: var(--c-warning); font-weight: 600; }
.c-compose-char.over { color: var(--c-danger); font-weight: 700; }
.c-compose-char.over { color: var(--c-danger); }
.c-compose-image-preview { margin-top: 8px; position: relative; display: inline-block; }
.c-compose-image-preview img { max-height: 200px; border-radius: var(--c-radius-sm); border: 1px solid var(--c-border); }
.c-compose-image-remove {
    position: absolute; top: 4px; right: 4px; width: 28px; height: 28px;
    background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .8rem;
}

/* ══════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════ */
.c-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 20px; border-radius: var(--c-radius-sm); font-weight: 600;
    font-size: .88rem; border: none; cursor: pointer; transition: all var(--c-transition);
    font-family: var(--c-font); line-height: 1;
}
.c-btn-primary { background: var(--c-primary); color: #fff !important; }
.c-btn-primary:hover { background: var(--c-primary-hover); color: #fff !important; }
.c-btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.c-btn-outline { background: transparent; color: var(--c-text); border: 1px solid var(--c-border-dark); }
.c-btn-outline:hover { background: var(--c-primary-light); border-color: var(--c-primary); color: var(--c-primary); }
.c-btn-danger { background: var(--c-danger); color: #fff; }
.c-btn-danger:hover { background: #b91c1c; }
.c-btn-ghost { background: transparent; color: var(--c-text-secondary); }
.c-btn-ghost:hover { background: var(--c-primary-light); }
.c-btn-sm { padding: 6px 14px; font-size: .82rem; }
.c-btn-block { width: 100%; }

/* ══════════════════════════════════════════════
   FORMS & INPUTS
   ══════════════════════════════════════════════ */
.c-form-group { margin-bottom: 16px; }
.c-form-group label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.c-form-group small { font-size: .78rem; color: var(--c-text-muted); margin-top: 4px; display: block; }
.c-input {
    width: 100%; height: 44px; border: 1px solid var(--c-border-dark); border-radius: var(--c-radius-sm);
    padding: 0 14px; font-size: .92rem; font-family: var(--c-font); color: var(--c-text);
    background: var(--c-bg); outline: none; transition: all var(--c-transition); box-sizing: border-box;
}
.c-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-light); background: var(--c-surface); }
.c-input.error { border-color: var(--c-danger); }
textarea.c-input { height: auto; padding: 10px 14px; resize: vertical; min-height: 80px; }

/* Icon prefix inputs */
.c-input-icon-wrap { position: relative; }
.c-input-icon-wrap > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--c-text-muted); font-size: .85rem; z-index: 1; }
.c-input-icon { padding-left: 40px !important; }

/* ══════════════════════════════════════════════
   AUTH PAGES — Split layout with teal left panel
   ══════════════════════════════════════════════ */
.c-auth-page {
    display: flex; min-height: 100vh; font-family: var(--c-font);
    background: var(--c-bg);
}
.c-auth-page *, .c-auth-page *::before, .c-auth-page *::after { box-sizing: border-box; }

/* Left decorative panel — Original teal gradient + geometric pattern */
.c-auth-left {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #004d4f 0%, #006366 40%, #007a7d 100%);
    position: relative; overflow: hidden; padding: 40px;
}
.c-auth-left::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='none' stroke='%23fff' stroke-width='.7' opacity='.1'%3E%3Cpath d='M30 0v60M0 30h60'/%3E%3Crect x='10' y='10' width='40' height='40' rx='1' transform='rotate(45 30 30)'/%3E%3Crect x='18' y='18' width='24' height='24' rx='1'/%3E%3C/g%3E%3Ccircle cx='30' cy='30' r='3' fill='%23fff' opacity='.06'/%3E%3Ccircle cx='0' cy='0' r='1.5' fill='%23fff' opacity='.04'/%3E%3Ccircle cx='60' cy='0' r='1.5' fill='%23fff' opacity='.04'/%3E%3Ccircle cx='0' cy='60' r='1.5' fill='%23fff' opacity='.04'/%3E%3Ccircle cx='60' cy='60' r='1.5' fill='%23fff' opacity='.04'/%3E%3C/svg%3E") repeat;
}
.c-auth-left-content { position: relative; z-index: 1; text-align: center; max-width: 380px; }
.c-auth-left-icon { font-size: 3.5rem; color: rgba(255,255,255,.9); margin-bottom: 24px; }
.c-auth-left h2 { font-size: 1.8rem; font-weight: 800; color: #fff; margin-bottom: 12px; letter-spacing: -.3px; line-height: 1.3; }
.c-auth-left p { font-size: .95rem; color: rgba(255,255,255,.7); line-height: 1.6; }
.c-auth-left-features { margin-top: 32px; display: flex; flex-direction: column; gap: 14px; }
.c-auth-left-feature {
    display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.85);
    font-size: .88rem; font-weight: 500;
}
.c-auth-left-feature i {
    width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center;
    justify-content: center; background: rgba(255,255,255,.12); font-size: .85rem; flex-shrink: 0;
}
.c-auth-decoration {
    position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.06);
}
.c-auth-decoration:nth-child(1) { width: 300px; height: 300px; top: -80px; right: -60px; }
.c-auth-decoration:nth-child(2) { width: 200px; height: 200px; bottom: -40px; left: -40px; }
.c-auth-decoration:nth-child(3) { width: 100px; height: 100px; bottom: 80px; right: 40px; background: rgba(255,255,255,.03); }

/* Right form panel */
.c-auth-right {
    flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px;
    background: var(--c-surface); min-height: 100vh;
}
.c-auth-card { width: 100%; max-width: 420px; }
/* When c-auth-card is direct child of c-auth-page (e.g. dogrula.php — no left/right) */
.c-auth-page > .c-auth-card { max-width: 440px; margin: auto; padding: 40px 24px; }
.c-auth-logo { text-align: center; margin-bottom: 32px; }
.c-auth-logo img { max-width: 160px; max-height: 48px; object-fit: contain; margin: 0 auto 8px; display: block; }
.c-auth-logo .logo-text { font-size: 1.6rem; font-weight: 800; color: var(--c-primary); letter-spacing: -.3px; }
.c-auth-logo .logo-sub { font-size: .82rem; color: var(--c-text-muted); margin-top: 6px; }
.c-auth-title { font-size: 1.4rem; font-weight: 800; text-align: center; margin-bottom: 6px; letter-spacing: -.2px; }
.c-auth-subtitle { font-size: .88rem; color: var(--c-text-secondary); text-align: center; margin-bottom: 28px; line-height: 1.5; }
.c-auth-divider {
    display: flex; align-items: center; gap: 12px; margin: 20px 0;
    font-size: .78rem; color: var(--c-text-muted); font-weight: 500;
}
.c-auth-divider::before, .c-auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--c-border-dark); }
.c-auth-footer { text-align: center; margin-top: 24px; font-size: .88rem; color: var(--c-text-secondary); }
.c-auth-footer a { color: var(--c-primary); font-weight: 700; }
.c-auth-footer a:hover { text-decoration: underline; }
.c-auth-back { text-align: center; margin-top: 16px; }
.c-auth-back a { font-size: .82rem; color: var(--c-text-muted); display: inline-flex; align-items: center; gap: 5px; }
.c-auth-back a:hover { color: var(--c-primary); }

/* ══════════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════════ */
.c-alert { padding: 12px 16px; border-radius: var(--c-radius-sm); margin-bottom: 16px; font-size: .85rem; font-weight: 500; }
.c-alert-error { background: var(--c-danger-light); color: var(--c-danger); }
.c-alert-success { background: var(--c-success-light); color: var(--c-success); }
.c-alert-warning { background: var(--c-warning-light); color: #92400e; }

/* ══════════════════════════════════════════════
   PROFILE
   ══════════════════════════════════════════════ */
.c-profile-header {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--c-radius);
    padding: 24px 20px; margin-bottom: 10px;
}
.c-profile-top { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.c-profile-avatar {
    width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    border: 3px solid var(--c-primary-light);
}
.c-profile-info { flex: 1; }
.c-profile-name { font-size: 1.15rem; font-weight: 800; letter-spacing: -.2px; }
.c-profile-display { font-size: 1.15rem; font-weight: 800; letter-spacing: -.2px; }
.c-profile-username { font-size: .85rem; color: var(--c-text-muted); }
.c-profile-handle { font-size: .85rem; color: var(--c-text-muted); }
.c-profile-bio { font-size: .88rem; color: var(--c-text-secondary); line-height: 1.5; margin-top: 8px; }
.c-profile-joined { font-size: .82rem; color: var(--c-text-muted); margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.c-profile-stats { display: flex; gap: 16px; margin-top: 10px; }
.c-profile-stat { font-size: .88rem; color: var(--c-text-muted); cursor: pointer; }
.c-profile-stat:hover { text-decoration: underline; }
.c-profile-stat strong { color: var(--c-text); font-weight: 700; }
.c-profile-actions { margin-top: 10px; display: flex; gap: 8px; }

/* ══════════════════════════════════════════════
   TABS
   ══════════════════════════════════════════════ */
.c-tabs {
    display: flex; background: var(--c-surface); overflow-x: auto;
    border: 1px solid var(--c-border); border-radius: var(--c-radius);
    margin-bottom: 10px;
}
.c-tab {
    flex: 1; padding: 12px 16px; text-align: center; font-size: .85rem;
    font-weight: 600; color: var(--c-text-muted); background: none;
    border: none; cursor: pointer; position: relative; transition: all .15s;
    white-space: nowrap;
}
.c-tab:hover { background: var(--c-primary-pale); color: var(--c-text); }
.c-tab.active { color: var(--c-primary); font-weight: 700; }
.c-tab.active::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 40px; height: 2px; background: var(--c-primary); border-radius: 2px;
}
.c-tab-count { margin-left: 4px; font-size: .72rem; background: var(--c-border-dark); padding: 1px 6px; border-radius: var(--c-radius-full); font-weight: 700; }

/* ══════════════════════════════════════════════
   EXPLORE / SEARCH
   ══════════════════════════════════════════════ */
.c-explore-search {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--c-radius); padding: 16px 20px;
    margin-bottom: 10px;
}
.c-search-input-wrap { position: relative; }
.c-search-input-wrap input {
    width: 100%; height: 42px; border: 1px solid var(--c-border-dark); border-radius: var(--c-radius-full);
    padding: 0 40px 0 40px; font-size: .88rem; outline: none; font-family: var(--c-font);
    background: var(--c-bg); color: var(--c-text); transition: all var(--c-transition); box-sizing: border-box;
}
.c-search-input-wrap input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-light); background: var(--c-surface); }
.c-search-input-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--c-text-muted); }
.c-search-clear {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    color: var(--c-text-muted); background: none; border: none; cursor: pointer;
    font-size: .85rem; padding: 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: color .15s;
}
.c-search-clear:hover { color: var(--c-text); }

/* ══════════════════════════════════════════════
   BOOK LIST (Explore)
   ══════════════════════════════════════════════ */
.c-book-list-item {
    display: flex; align-items: center; gap: 14px; padding: 12px 16px;
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--c-radius-sm); margin-bottom: 6px;
    transition: all var(--c-transition); cursor: pointer;
}
.c-book-list-item:hover { background: var(--c-surface); border-color: var(--c-primary); box-shadow: 0 0 0 1px var(--c-primary), 0 2px 8px rgba(15,118,110,.10); }
.c-book-list-item:hover .c-book-list-title { color: var(--c-primary); }
.c-book-list-item:hover .c-book-list-arrow { color: var(--c-primary); transform: translateX(2px); }
.c-book-list-arrow { transition: all .2s; }
.c-book-list-cover { width: 48px; height: 68px; border-radius: 4px; object-fit: cover; flex-shrink: 0; box-shadow: var(--c-shadow); }
.c-book-list-cover-placeholder { width: 48px; height: 68px; border-radius: 4px; background: var(--c-primary-light); display: flex; align-items: center; justify-content: center; color: var(--c-primary); flex-shrink: 0; }
.c-book-list-info { flex: 1; min-width: 0; }
.c-book-list-title { font-weight: 700; font-size: .9rem; margin-bottom: 2px; }
.c-book-list-author { font-size: .82rem; color: var(--c-text-muted); }
.c-book-list-stats { display: flex; gap: 12px; margin-top: 4px; font-size: .75rem; color: var(--c-text-muted); }
.c-book-list-stats span { display: flex; align-items: center; gap: 3px; }
.c-book-list-arrow { color: var(--c-text-muted); font-size: .75rem; flex-shrink: 0; }

/* ══════════════════════════════════════════════
   MEMBER LIST
   ══════════════════════════════════════════════ */
.c-member-list {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--c-radius); overflow: hidden; margin-bottom: 10px;
}
.c-member-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--c-border); transition: background var(--c-transition); }
.c-member-card:last-child { border-bottom: none; }
.c-member-card:hover { background: var(--c-primary-pale); }
.c-member-card:hover .c-member-name { color: var(--c-primary); }
.c-member-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.c-member-info { flex: 1; min-width: 0; }
.c-member-name { font-weight: 700; font-size: .88rem; }
.c-member-username { font-size: .82rem; color: var(--c-text-muted); }
.c-member-stat { font-size: .82rem; color: var(--c-text-muted); flex-shrink: 0; }

/* ══════════════════════════════════════════════
   COMMENTS
   ══════════════════════════════════════════════ */
.c-comments { padding: 0; border-top: 1px solid var(--c-border); background: var(--c-bg); border-radius: 0 0 var(--c-radius) var(--c-radius); }
.c-comment { display: flex; gap: 10px; padding: 10px 20px; border-top: 1px solid var(--c-border); }
.c-comment:first-child { border-top: none; }
.c-comment-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; margin-top: 2px; }
.c-comment-body { flex: 1; }
.c-comment-name { font-weight: 700; font-size: .82rem; display: inline-block; margin-bottom: 2px; }
.c-comment-handle { font-size: .78rem; color: var(--c-text-muted); margin-left: 4px; }
.c-comment-text { font-size: .85rem; line-height: 1.4; margin-top: 2px; display: block; }
.c-comment-meta { display: flex; gap: 10px; align-items: center; margin-top: 3px; }
.c-comment-time { font-size: .72rem; color: var(--c-text-muted); }
.c-comment-delete { background: none; border: none; color: var(--c-text-muted); font-size: .72rem; cursor: pointer; padding: 0; }
.c-comment-delete:hover { color: var(--c-danger); }
.c-comment-form { display: flex; gap: 8px; padding: 10px 20px; align-items: center; border-top: 1px solid var(--c-border); }
.c-comment-input { flex: 1; height: 36px; border: 1px solid var(--c-border-dark); border-radius: var(--c-radius-full); padding: 0 14px; font-size: .82rem; outline: none; font-family: var(--c-font); box-sizing: border-box; background: var(--c-bg); }
.c-comment-input:focus { border-color: var(--c-primary); background: var(--c-surface); }
.c-comment-send { background: none; border: none; color: var(--c-primary); cursor: pointer; font-size: .9rem; padding: 6px 8px; border-radius: 50%; }
.c-comment-send:hover { background: var(--c-primary-light); }

/* Inline comment preview (feed mode - temporary until refresh) */
.c-inline-comment-preview { padding: 0 4px; }
.c-inline-comment-preview .c-comment { display: flex; gap: 8px; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.c-load-more-comments { display: block; font-size: .82rem; color: var(--c-primary); padding: 10px 20px; font-weight: 600; }

/* ══════════════════════════════════════════════
   BOOK DETAIL
   ══════════════════════════════════════════════ */
.c-book-detail {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--c-radius); padding: 24px 20px;
    margin-bottom: 12px;
}
.c-book-detail-inner { display: flex; gap: 20px; }
.c-book-detail-cover { flex-shrink: 0; }
.c-book-detail-cover img { width: 120px; height: 175px; border-radius: var(--c-radius-sm); object-fit: cover; box-shadow: var(--c-shadow-md); }
.c-book-detail-info { flex: 1; }
.c-book-detail-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 2px; letter-spacing: -.2px; }
.c-book-detail-author { font-size: .88rem; color: var(--c-text-muted); margin-bottom: 8px; }
.c-book-detail-desc { font-size: .88rem; color: var(--c-text-secondary); line-height: 1.5; margin-bottom: 10px; }
.c-book-detail-stats { display: flex; gap: 16px; font-size: .85rem; color: var(--c-text-muted); }
.c-book-detail-stats span { display: flex; align-items: center; gap: 5px; }
.c-book-read-toggle { margin-top: 12px; }

/* ══════════════════════════════════════════════
   SECTION TITLE
   ══════════════════════════════════════════════ */
.c-section-title {
    font-size: .78rem; font-weight: 700; color: var(--c-text-muted);
    padding: 10px 16px;
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-left: 3px solid var(--c-accent);
    border-radius: var(--c-radius-sm);
    margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px;
    text-transform: uppercase; letter-spacing: .5px;
}
.c-section-title i { color: var(--c-accent); font-size: .75rem; }

/* ══════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════ */
.c-empty {
    text-align: center; padding: 48px 20px;
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--c-radius); margin-bottom: 10px;
}
.c-empty i { font-size: 2.5rem; color: var(--c-border-dark); margin-bottom: 12px; display: block; }
.c-empty p { font-size: .88rem; color: var(--c-text-muted); line-height: 1.4; }
.c-empty small { font-size: .82rem; color: var(--c-text-muted); }

/* Feed infinite scroll sentinel */
.c-feed-sentinel { text-align: center; padding: 20px; }
.c-loading-spinner { font-size: .85rem; color: var(--c-text-muted); }
.c-loading-spinner i { margin-right: 6px; }

/* ══════════════════════════════════════════════
   SPINNER
   ══════════════════════════════════════════════ */
.c-spinner { width: 24px; height: 24px; border: 3px solid var(--c-border-dark); border-top-color: var(--c-primary); border-radius: 50%; animation: c-spin .7s linear infinite; margin: 20px auto; }
@keyframes c-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════ */
.c-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 500;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    opacity: 0; visibility: hidden; transition: all .25s;
}
.c-modal-overlay.active { opacity: 1; visibility: visible; }
.c-modal {
    width: 100%; max-width: 480px; background: var(--c-surface);
    border-radius: var(--c-radius); text-align: left;
    transform: scale(0.95); transition: transform .25s;
    overflow: hidden;
}
.c-modal-overlay.active .c-modal { transform: scale(1); }
.c-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--c-border); }
.c-modal-header h3 { font-size: .95rem; font-weight: 700; margin: 0; }
.c-modal-close { background: none; border: none; color: var(--c-text-muted); font-size: 1rem; cursor: pointer; padding: 4px; border-radius: 50%; }
.c-modal-close:hover { color: var(--c-text); background: var(--c-bg); }
.c-modal-body { padding: 16px 20px; }
.c-modal-body textarea { width: 100%; border: 1px solid var(--c-border-dark); border-radius: var(--c-radius-sm); padding: 10px 14px; font-family: var(--c-font); font-size: .88rem; line-height: 1.5; resize: vertical; outline: none; }
.c-modal-body textarea:focus { border-color: var(--c-primary); }
.c-modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--c-border); }

/* ══════════════════════════════════════════════
   NOTIFICATIONS
   ══════════════════════════════════════════════ */
.c-notif-list {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--c-radius); overflow: hidden;
    margin-bottom: 10px;
}
.c-notif { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--c-border); transition: background .15s; color: inherit; }
.c-notif:last-child { border-bottom: none; }
.c-notif:hover { background: var(--c-primary-pale); }
.c-notif.unread { background: var(--c-primary-light); }
.c-notif-icon { font-size: 1rem; flex-shrink: 0; }
.c-notif-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.c-notif-body { flex: 1; }
.c-notif-text { font-size: .88rem; color: var(--c-text-secondary); line-height: 1.4; }
.c-notif-text strong { color: var(--c-text); font-weight: 700; }
.c-notif-time { font-size: .72rem; color: var(--c-text-muted); margin-top: 2px; }

/* ══════════════════════════════════════════════
   BOOK GRID (Profile > Books tab)
   ══════════════════════════════════════════════ */
.c-book-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px; padding: 16px; background: var(--c-surface);
    border: 1px solid var(--c-border); border-radius: var(--c-radius);
    margin-bottom: 10px;
}
.c-book-card { text-align: center; text-decoration: none; color: var(--c-text); transition: all .2s ease; }
.c-book-card:hover { transform: scale(1.03); }
.c-book-card:hover .c-book-cover img { box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.c-book-card:hover .c-book-title { color: var(--c-primary); }
.c-book-cover img { width: 100%; aspect-ratio: 2/3; border-radius: var(--c-radius-xs); object-fit: cover; box-shadow: var(--c-shadow-md); transition: box-shadow .2s ease; }
.c-book-cover-placeholder { width: 100%; aspect-ratio: 2/3; border-radius: var(--c-radius-xs); background: var(--c-primary-light); display: flex; align-items: center; justify-content: center; color: var(--c-primary); font-size: 1.5rem; }
.c-book-info { margin-top: 6px; }
.c-book-title { font-weight: 700; font-size: .78rem; }
.c-book-author { font-size: .72rem; color: var(--c-text-muted); }

/* ══════════════════════════════════════════════
   DROPDOWN
   ══════════════════════════════════════════════ */
.c-dropdown { position: relative; }
.c-dropdown-menu {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--c-surface);
    border: 1px solid var(--c-border); border-radius: var(--c-radius);
    box-shadow: var(--c-shadow-lg); z-index: 50; display: none; overflow: hidden;
}
.c-dropdown-menu.show { display: block; }
/* Upward dropdown (for sidebar profile at bottom) */
.c-dropdown-up { bottom: calc(100% + 6px); top: auto; left: 0; right: auto; }
.c-dropdown-menu button, .c-dropdown-menu a {
    display: flex; align-items: center; gap: 10px; padding: 11px 16px;
    font-size: .85rem; color: var(--c-text); background: none; border: none;
    width: 100%; cursor: pointer; text-align: left; font-family: var(--c-font);
    font-weight: 500; text-decoration: none;
}
.c-dropdown-menu button:hover, .c-dropdown-menu a:hover { background: var(--c-primary-pale); }
.c-dropdown-header { padding: 10px 16px; font-size: .78rem; color: var(--c-text-muted); border-bottom: 1px solid var(--c-border); }
.c-dropdown-divider { height: 1px; background: var(--c-border); margin: 4px 0; }
.c-dropdown-trigger { background: none; border: none; color: var(--c-text-muted); cursor: pointer; padding: 4px 8px; border-radius: 50%; }
.c-dropdown-trigger:hover { background: var(--c-primary-light); }
.c-text-danger { color: var(--c-danger) !important; }
.c-text-danger:hover { background: var(--c-danger-light) !important; }

/* ══════════════════════════════════════════════
   PASSWORD / VERIFICATION
   ══════════════════════════════════════════════ */
.c-password-wrap { position: relative; }
.c-password-wrap .c-input { padding-right: 42px; }
.c-password-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--c-text-muted); cursor: pointer; font-size: .9rem; }
.c-code-inputs { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.c-code-input {
    width: 48px; height: 56px; text-align: center; font-size: 1.4rem; font-weight: 700;
    border: 1.5px solid var(--c-border-dark); border-radius: var(--c-radius-sm); outline: none;
    font-family: var(--c-font); color: var(--c-text); transition: all .2s; background: var(--c-bg);
}
.c-code-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-light); background: var(--c-surface); }

/* ══════════════════════════════════════════════
   MOBILE BOTTOM NAV
   ══════════════════════════════════════════════ */
.c-mobile-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--c-mobile-nav-h); background: var(--c-surface);
    border-top: 1px solid var(--c-border); z-index: 100;
    padding: 0 8px; align-items: center; justify-content: space-around;
    box-shadow: 0 -2px 8px rgba(0,0,0,.04);
}
.c-mobile-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: .6rem; color: var(--c-text-muted); padding: 6px 10px; font-weight: 600;
    border-radius: var(--c-radius-sm); transition: color .15s; position: relative;
}
.c-mobile-nav a i { font-size: 1.15rem; opacity: .5; transition: opacity .15s; }
.c-mobile-nav a.active i { opacity: 1; }
.c-mobile-nav a.active { color: var(--c-primary); }
.c-mobile-nav a .badge {
    position: absolute; top: 0; right: 2px; min-width: 14px; height: 14px;
    background: var(--c-like); color: #fff; font-size: .55rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: 700; padding: 0 3px;
}

/* ══════════════════════════════════════════════
   SCROLLBAR
   ══════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-border-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-text-muted); }

/* ══════════════════════════════════════════════
   HELPERS
   ══════════════════════════════════════════════ */
.c-link { color: var(--c-primary); font-size: .85rem; }
.c-link:hover { text-decoration: underline; }
.c-label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.c-hint { font-size: .78rem; color: var(--c-text-muted); margin-top: 4px; display: block; }
.c-input-wrap { position: relative; }
.c-input-wrap .c-input { padding-right: 42px; }
.c-card-plain {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--c-radius); padding: 16px 20px;
    margin-bottom: 10px;
}
.c-card {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--c-radius); padding: 24px 20px;
    margin-bottom: 10px;
}

/* ══════════════════════════════════════════════
   INLINE COMMENT (Feed cards)
   ══════════════════════════════════════════════ */
.c-inline-comment {
    margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c-border);
}
.c-inline-comment .c-comment-form { padding: 0; border-top: none; }

/* ══════════════════════════════════════════════
   READ MORE
   ══════════════════════════════════════════════ */
.c-read-more-btn {
    background: none; border: none; color: var(--c-primary);
    font-size: .88rem; font-weight: 600; cursor: pointer;
    padding: 0; font-family: var(--c-font);
}
.c-read-more-btn:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════
   NESTED COMMENTS (tahlil.php)
   ══════════════════════════════════════════════ */
.c-comments-section {
    background: var(--c-surface); border: 1px solid var(--c-border-dark);
    border-radius: var(--c-radius); margin-top: 12px; overflow: hidden;
}
.c-comments-section .c-section-title { margin-bottom: 0; border-radius: 0; }
.c-comment-thread { border-top: 1px solid var(--c-border); }
.c-comment-thread:first-child { border-top: none; }
.c-comment-reply { border-left: 2px solid var(--c-accent-light); }
.c-comment-reply-btn {
    background: none; border: none; color: var(--c-text-muted);
    font-size: .72rem; font-weight: 600; cursor: pointer; padding: 0;
    font-family: var(--c-font); transition: color .15s;
}
.c-comment-reply-btn:hover { color: var(--c-primary); }
.c-reply-form-container { padding: 0 20px 0 38px; }

/* ══════════════════════════════════════════════
   MOBILE TOP HEADER
   ══════════════════════════════════════════════ */
.c-mobile-header {
    display: none; position: sticky; top: 0; z-index: 99;
    height: 50px; background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    padding: 0 16px;
    align-items: center; justify-content: space-between;
}
.c-mobile-header-logo {
    display: flex; align-items: center; gap: 6px;
    font-size: 1.1rem; font-weight: 800; color: var(--c-primary) !important;
}
.c-mobile-header-logo img { height: 26px; width: auto; }
.c-mobile-header-sub {
    font-size: .7rem; font-weight: 600; color: var(--c-text-muted);
    letter-spacing: .3px; margin-left: 2px;
}
.c-mobile-header-menu-btn {
    width: 36px; height: 36px; border-radius: 50%;
    border: none; background: var(--c-bg); color: var(--c-text);
    font-size: 1rem; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: all .15s;
}
.c-mobile-header-menu-btn:hover { background: var(--c-border); }

/* ══════════════════════════════════════════════
   MOBILE SLIDE MENU
   ══════════════════════════════════════════════ */
.c-mobile-menu-overlay {
    display: none; position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,.4); opacity: 0; transition: opacity .25s;
}
.c-mobile-menu-overlay.open { display: block; opacity: 1; }
.c-mobile-menu {
    position: fixed; top: 0; right: -280px; z-index: 201;
    width: 280px; height: 100vh; background: var(--c-surface);
    box-shadow: var(--c-shadow-lg);
    transition: right .25s ease;
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.c-mobile-menu.open { right: 0; }
.c-mobile-menu-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--c-border);
    font-weight: 700; font-size: .95rem;
}
.c-mobile-menu-header button {
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: var(--c-bg); color: var(--c-text);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
}
.c-mobile-menu-user {
    display: flex; align-items: center; gap: 12px;
    padding: 16px; border-bottom: 1px solid var(--c-border);
}
.c-mobile-menu-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.c-mobile-menu-name { font-weight: 700; font-size: .88rem; }
.c-mobile-menu-handle { font-size: .78rem; color: var(--c-text-muted); }
.c-mobile-menu-nav {
    display: flex; flex-direction: column; padding: 8px 0;
}
.c-mobile-menu-nav a,
.c-mobile-menu-nav button {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px; font-size: .88rem; font-weight: 500;
    color: var(--c-text); text-decoration: none;
    border: none; background: none; cursor: pointer;
    font-family: var(--c-font); width: 100%; text-align: left;
    transition: background .15s;
}
.c-mobile-menu-nav a:hover,
.c-mobile-menu-nav button:hover { background: var(--c-bg); }
.c-mobile-menu-nav i { width: 20px; text-align: center; color: var(--c-text-muted); font-size: .95rem; }
.c-mobile-menu-divider { height: 1px; background: var(--c-border); margin: 4px 16px; }

/* ══════════════════════════════════════════════
   TOGGLE SWITCH
   ══════════════════════════════════════════════ */
.c-toggle { display: inline-flex; cursor: pointer; }
.c-toggle-track {
    width: 44px; height: 24px; border-radius: 12px;
    background: var(--c-border-dark); position: relative;
    transition: background .25s;
}
.c-toggle-thumb {
    position: absolute; top: 2px; left: 2px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15);
    transition: transform .25s;
}
.c-toggle.active .c-toggle-track { background: var(--c-primary); }
.c-toggle.active .c-toggle-thumb { transform: translateX(20px); }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

/* Tablet — Sidebar collapses to icon-only */
@media (max-width: 1080px) {
    :root { --c-sidebar-w: 72px; }
    .c-sidebar { padding: 0 8px; align-items: center; }
    .c-sidebar-header { padding: 16px 0 12px; text-align: center; width: 100%; }
    .c-sidebar-logo-sub { display: none; }
    .c-sidebar-logo { justify-content: center; }
    .c-sidebar-logo-img { max-width: 32px; }
    .c-sidebar-logo-text { font-size: 1.1rem; }
    .c-sidebar-nav { align-items: center; width: 100%; }
    .c-sidebar-link {
        justify-content: center; padding: 12px;
        border-radius: 50%; width: 48px; height: 48px;
    }
    .c-sidebar-link span { display: none; }
    .c-sidebar-link i { font-size: 1.2rem; }
    .c-sidebar-badge {
        position: absolute; top: 2px; right: 2px; margin-left: 0;
        min-width: 16px; height: 16px; font-size: .55rem;
    }
    .c-sidebar-footer { width: 100%; }
    .c-sidebar-profile-btn { justify-content: center; padding: 8px; }
    .c-sidebar-user-info { display: none; }
    .c-sidebar-profile-btn > .fa-ellipsis { display: none; }
    .c-sidebar-auth { align-items: center; }
    .c-sidebar-auth .c-btn { padding: 8px; font-size: 0; width: 40px; height: 40px; border-radius: 50%; }
}

/* Mobile — Sidebar hidden, bottom nav visible */
@media (max-width: 768px) {
    .c-sidebar { display: none; }
    .c-content-area { margin-left: 0; }
    .c-mobile-header { display: flex; }
    .c-mobile-nav { display: flex; }
    .c-main { padding: 12px 12px calc(var(--c-mobile-nav-h) + 16px); }

    .c-auth-left { display: none; }
    .c-auth-right { padding: 24px 16px; }

    /* Page titles — accent styled on mobile */
    .c-page-title {
        border-radius: 0; margin-left: -12px; margin-right: -12px;
        border-left: none; border-right: none;
        border-top: none;
        background: linear-gradient(135deg, var(--c-primary-light), var(--c-surface));
        border-bottom: 2px solid var(--c-accent);
        padding: 14px 16px;
        font-size: 1rem;
        color: var(--c-text);
    }
    .c-feed-tabs {
        border-radius: 0; margin-left: -12px; margin-right: -12px;
        border-left: none; border-right: none; border-top: none;
    }

    /* Cards breathing room */
    .c-review { border-radius: var(--c-radius-sm); margin-bottom: 8px; padding: 14px 16px; }
    .c-compose { border-radius: var(--c-radius-sm); }
    .c-card { border-radius: var(--c-radius-sm); }
    .c-card-plain { border-radius: var(--c-radius-sm); }
    .c-featured-book { border-radius: var(--c-radius-sm); }

    .c-profile-top { flex-direction: column; align-items: center; text-align: center; }
    .c-profile-stats { justify-content: center; }
    .c-profile-actions { justify-content: center; }
    .c-featured-inner { flex-direction: column; align-items: center; text-align: center; }
    .c-book-detail-inner { flex-direction: column; align-items: center; text-align: center; }
    .c-book-detail-stats { justify-content: center; }
}

@media (max-width: 900px) {
    .c-auth-left { display: none; }
}
