/* ==========================================================================
   Reply Hub — YouTube Comment Auto-Reply Dashboard
   Design system matching PFT Blog Hub & Content Hub
   ========================================================================== */

:root {
    --bg: #0d1117;
    --bg-secondary: #161b22;
    --card: #1c2333;
    --card-hover: #222d3f;
    --primary: #E85D75;
    --primary-hover: #d4495f;
    --primary-light: rgba(232,93,117,0.15);
    --text: #e6edf3;
    --text-secondary: #8b949e;
    --border: #30363d;
    --success: #3fb950;
    --warning: #d29922;
    --error: #f85149;
    --success-bg: rgba(63,185,80,0.15);
    --warning-bg: rgba(210,153,34,0.15);
    --error-bg: rgba(248,81,73,0.15);
    --radius: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
    --glow-primary: 0 0 20px rgba(232,93,117,0.25);
    --accent-cyan: #38bdf8;
    --accent-blue: #818cf8;
    --accent-purple: #a78bfa;
    --accent-green: #34d399;
    --accent-amber: #fbbf24;
}

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

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

body.login-page {
    display: block;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
    width: 260px;
    min-width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, #0d1117 0%, #111827 100%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.sidebar-logo img {
    height: 48px;
    opacity: 0.85;
    transition: all 0.3s;
    filter: drop-shadow(0 0 8px rgba(232,93,117,0.25));
}

.sidebar-logo img:hover {
    opacity: 1;
    filter: drop-shadow(0 0 14px rgba(232,93,117,0.45));
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

.nav-item.active {
    color: var(--primary);
    background: rgba(232,93,117,0.08);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(232,93,117,0.1);
    font-size: 15px;
    flex-shrink: 0;
}

.nav-item.active .nav-icon {
    background: var(--primary-light);
}

.nav-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.nav-badge {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    background: var(--warning-bg);
    color: var(--warning);
}

/* Sidebar Footer */
.sidebar-footer {
    border-top: 1px solid var(--border);
}

.nav-logout {
    margin: 8px 12px;
    font-size: 13px;
    opacity: 0.7;
}

.nav-logout:hover {
    opacity: 1;
    background: var(--error-bg);
    color: var(--error);
}

.nav-logout .nav-icon {
    background: transparent;
    font-size: 14px;
}

/* Switcher */
.sidebar-switcher {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 4px;
}

.sidebar-switcher a {
    flex: 1;
    padding: 8px 0;
    text-align: center;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    color: var(--text-secondary);
    background: transparent;
}

.sidebar-switcher a.active {
    background: var(--primary);
    color: white;
}

.sidebar-switcher a:not(.active):hover {
    background: var(--bg-secondary);
    color: var(--text);
}

/* ==========================================================================
   Content Area
   ========================================================================== */

.content-area {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Content Header */
.content-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13,17,23,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h1 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #E85D75 0%, #ff8a9e 40%, #ffffff 60%, #E85D75 100%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: headerShine 4s linear infinite;
    margin-bottom: 0;
}

.content-header p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Main Content */
.main {
    flex: 1;
    padding: 24px 32px;
    width: 100%;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    opacity: 0;
    animation: slideUp 0.5s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }

.card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-video {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.card-result {
    border-left: 3px solid var(--accent-cyan);
}

.card-approved {
    border-left: 3px solid var(--success);
    background: rgba(63,185,80,0.04);
}

.card-pending {
    border-left: 3px solid var(--warning);
}

/* Step number badge inside card h2 */
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(232,93,117,0.3);
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-green, .badge-success { background: var(--success-bg); color: var(--success); }
.badge-yellow, .badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-red, .badge-danger { background: var(--error-bg); color: var(--error); }
.badge-gray { background: rgba(139,148,158,0.15); color: var(--text-secondary); }
.badge-blue { background: rgba(56,189,248,0.15); color: var(--accent-cyan); }
.badge-purple { background: rgba(167,139,250,0.15); color: var(--accent-purple); }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.input-wide {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    background: var(--bg-secondary);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wide:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232,93,117,0.15);
}

.input-wide::placeholder {
    color: rgba(139,148,158,0.6);
}

.input-medium {
    width: 260px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    background: var(--bg-secondary);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-medium:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232,93,117,0.15);
}

textarea.input-wide {
    resize: vertical;
    min-height: 70px;
    line-height: 1.5;
}

.reply-textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    text-decoration: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary,
.btn-blue {
    background: var(--primary);
}

.btn-primary:hover,
.btn-blue:hover {
    background: var(--primary-hover);
    box-shadow: var(--glow-primary);
}

.btn-green {
    background: var(--success);
}

.btn-green:hover {
    background: #2ea043;
    box-shadow: 0 0 16px rgba(63,185,80,0.3);
}

.btn-yellow {
    background: var(--warning);
    color: #1a1a1a;
}

.btn-yellow:hover {
    background: #c08a1e;
}

.btn-red {
    background: var(--error);
}

.btn-red:hover {
    background: #da3633;
    box-shadow: 0 0 16px rgba(248,81,73,0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--card-hover);
    border-color: #484f58;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-small:hover {
    background: var(--card-hover);
}

.button-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* ==========================================================================
   Comment & Reply Boxes
   ========================================================================== */

.comment-box,
.reply-box {
    margin: 16px 0;
}

.comment-box label,
.reply-box label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.comment-text {
    background: var(--bg);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

/* Result meta */
.result-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.confidence {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.model-tag {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    opacity: 0.7;
}

.reasoning {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(139,148,158,0.06);
    border-radius: 6px;
    border-left: 2px solid var(--border);
}

/* Video info */
.video-info {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

/* Approved reply */
.approved-text {
    padding: 12px 16px;
    background: rgba(63,185,80,0.06);
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid rgba(63,185,80,0.15);
    color: var(--text);
    line-height: 1.6;
}

.approved-note {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    font-style: italic;
}

.approved-section {
    margin-bottom: 16px;
}

.approved-section label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

/* ==========================================================================
   Language Support
   ========================================================================== */

.translation-box {
    border-left: 3px solid var(--accent-cyan);
    padding-left: 12px;
}

.comment-translation {
    background: rgba(56,189,248,0.04);
    font-style: italic;
}

.language-note {
    font-size: 12px;
    color: var(--accent-cyan);
    background: rgba(56,189,248,0.06);
    padding: 10px 14px;
    border-radius: 8px;
    margin: 12px 0;
    border: 1px solid rgba(56,189,248,0.12);
}

/* ==========================================================================
   Table
   ========================================================================== */

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.table th {
    background: var(--bg-secondary);
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    color: var(--text);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: rgba(232,93,117,0.03);
}

.td-date {
    white-space: nowrap;
    width: 90px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.td-video { max-width: 120px; }
.td-video-title { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text-secondary); }
.td-comment { max-width: 200px; }
.td-reply { max-width: 200px; }
.btn-sm { padding: 3px 10px; font-size: 11px; border-radius: 4px; white-space: nowrap; }

/* Expandable rows */
.expandable-row { cursor: pointer; transition: background 0.2s; }
.expandable-row .full-text { display: none; }
.expandable-row.expanded .truncated { display: none; }
.expandable-row.expanded .full-text { display: inline; }
.expandable-row.expanded td { background: var(--bg-secondary); }

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.page-info {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid;
    opacity: 0;
    animation: slideUp 0.3s ease forwards;
}

.alert-success { background: var(--success-bg); color: var(--success); border-color: rgba(63,185,80,0.2); }
.alert-error { background: var(--error-bg); color: var(--error); border-color: rgba(248,81,73,0.2); }
.alert-info { background: rgba(56,189,248,0.08); color: var(--accent-cyan); border-color: rgba(56,189,248,0.15); }

/* ==========================================================================
   Misc
   ========================================================================== */

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
    font-size: 14px;
}

/* ==========================================================================
   Login Page
   ========================================================================== */

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
}

.login-card {
    width: 380px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 40px 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    animation: slideUp 0.5s ease forwards;
}

.login-card h2 {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #E85D75, #ff8a9e, #ffffff, #E85D75);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: headerShine 4s linear infinite;
    margin-bottom: 32px;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-alerts {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 380px;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes headerShine {
    to { background-position: 200% center; }
}

@keyframes beaconPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ==========================================================================
   Comment Date
   ========================================================================== */

.comment-date {
    display: inline-block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-left: 4px;
    font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   Restricted Words
   ========================================================================== */

.restricted-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.restricted-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: background 0.2s;
}

.restricted-item:hover {
    background: var(--card-hover);
}

.restricted-word {
    font-size: 14px;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
}

.restricted-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.restricted-date {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.btn-delete {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-delete:hover {
    background: var(--error-bg);
    color: var(--error);
    border-color: rgba(248,81,73,0.3);
}

.inline-form {
    display: inline;
}

.form-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.help-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   Reply Now Page
   ========================================================================== */

.reply-now-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.reply-now-input {
    width: 120px;
    text-align: center;
    font-size: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.result-summary {
    display: flex;
    gap: 16px;
    margin: 16px 0 0;
    flex-wrap: wrap;
}

.result-stat {
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    min-width: 100px;
}

.result-stat-num {
    font-size: 24px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.result-stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.result-stat-replied {
    background: var(--success-bg);
    color: var(--success);
}

.result-stat-pending {
    background: var(--warning-bg);
    color: var(--warning);
}

.result-stat-skipped {
    background: rgba(139,148,158,0.1);
    color: var(--text-secondary);
}

/* ==========================================================================
   Community Post Display
   ========================================================================== */

.post-context {
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    font-size: 14px;
    line-height: 1.5;
}

.post-context-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 6px;
}

.poll-options {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.poll-option {
    padding: 6px 10px;
    background: var(--bg);
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid var(--border);
    color: var(--text);
}

.badge-purple {
    background: rgba(167,139,250,0.15);
    color: var(--accent-purple);
}

/* ==========================================================================
   Scrollbar
   ========================================================================== */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #484f58; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
    .sidebar { width: 220px; min-width: 220px; }
    .content-area { margin-left: 220px; }
}

@media (max-width: 768px) {
    body:not(.login-page) {
        flex-direction: column;
        overflow-x: hidden;
    }

    /* Sidebar → horizontal top bar */
    .sidebar {
        position: relative;
        width: 100%;
        min-width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-logo {
        padding: 10px 14px;
        border-bottom: none;
        border-right: 1px solid var(--border);
    }

    .sidebar-logo img { height: 32px; }

    .sidebar-nav {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 8px 12px;
        gap: 4px;
        flex: 1;
    }

    .sidebar-nav::-webkit-scrollbar { height: 3px; }

    .nav-item {
        padding: 8px 14px;
        white-space: nowrap;
        margin-bottom: 0;
        border-radius: 6px;
    }

    .nav-item.active::after { display: none; }

    .nav-badge { display: none; }

    .sidebar-footer {
        display: flex;
        align-items: center;
        padding: 0 8px;
        border-top: none;
        border-left: 1px solid var(--border);
    }

    .nav-logout {
        margin: 4px;
        padding: 8px;
    }

    .nav-logout .nav-label { display: none; }

    .sidebar-switcher {
        flex-direction: row;
        order: 99;
        width: 100%;
        border-top: 1px solid var(--border);
        border-left: none;
        padding: 6px 12px;
        justify-content: center;
        gap: 6px;
    }

    .sidebar-switcher a {
        font-size: 11px;
        padding: 6px 12px;
    }

    /* Content area */
    .content-area { margin-left: 0; }
    .content-header {
        position: relative;
        padding: 12px 16px;
    }
    .content-header h1 { font-size: 16px; letter-spacing: 2px; }
    .content-header p { display: none; }
    .main { padding: 16px; }

    /* Cards */
    .card { padding: 18px 16px; }
    .card h2 { font-size: 14px; }

    /* Forms */
    .form-row { flex-direction: column; align-items: stretch; }
    .input-medium { width: 100%; }

    /* Buttons */
    .button-row { flex-wrap: wrap; }
    .btn { padding: 10px 16px; font-size: 13px; min-height: 44px; }

    /* Tables — horizontal scroll */
    .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table thead, .table tbody, .table tr { min-width: 600px; }
    .td-date { font-size: 11px; }

    /* Video info */
    .video-info { flex-wrap: wrap; font-size: 13px; }

    /* Restricted words */
    .restricted-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .restricted-meta {
        width: 100%;
        justify-content: space-between;
    }

    .restricted-word {
        font-size: 13px;
        word-break: break-word;
    }

    /* Reply Now */
    .reply-now-form { flex-direction: column; align-items: stretch; }
    .reply-now-input { width: 100%; }
    .result-summary { flex-direction: column; gap: 8px; }
    .result-stat { min-width: auto; }

    /* Community posts */
    .post-context { font-size: 13px; }
    .poll-option { font-size: 12px; }

    /* Login */
    .login-card { width: 90%; max-width: 380px; padding: 32px 24px; }
    .login-alerts { width: 90%; max-width: 380px; }

    /* Pagination */
    .pagination { gap: 8px; }
    .page-info { font-size: 12px; }
}

@media (max-width: 480px) {
    /* Very small screens */
    .main { padding: 12px; }
    .card { padding: 16px 14px; margin-bottom: 14px; }
    .card h2 { font-size: 13px; gap: 8px; }

    .content-header h1 { font-size: 14px; letter-spacing: 1.5px; }

    .step-num { width: 22px; height: 22px; font-size: 10px; }

    .btn { padding: 10px 14px; font-size: 12px; }
    .button-row { gap: 6px; }

    .comment-text { padding: 10px 12px; font-size: 13px; }

    .badge { font-size: 9px; padding: 2px 8px; }

    .restricted-word { font-size: 12px; }
    .restricted-date { font-size: 10px; }
    .form-hint { font-size: 11px; }
    .help-text { font-size: 12px; }

    .login-card { padding: 28px 20px; }
    .login-card h2 { font-size: 16px; letter-spacing: 2px; margin-bottom: 24px; }
}
