/* FriSay Portal — Documentation Style (Light Theme) */
:root {
    --bg: #ffffff;
    --bg-sidebar: #f8f9fb;
    --bg-hover: #fff5ef;
    --bg-active: #fff0e6;
    --border: #e5e7eb;
    --border-light: #f0f1f3;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --orange-light: #ffedd5;
    --navy: #1e3a5f;
    --blue: #3b82f6;
    --blue-light: #eff6ff;
    --green: #22c55e;
    --green-light: #f0fdf4;
    --red: #ef4444;
    --red-light: #fef2f2;
    --purple: #8b5cf6;
    --radius: 8px;
    --sidebar-width: 280px;
    --topbar-height: 64px;
    --padding-top: 84px;
    --transition: 0.15s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 15px;
}

a { color: var(--orange); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--orange-dark); }

/* ── Topbar ── */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
    z-index: 200;
}

.topbar-left { display: flex; align-items: center; gap: 12px; min-width: var(--sidebar-width); }

.sidebar-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.brand:hover { color: inherit; }

.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--orange);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.brand-text strong {
    color: var(--orange);
    font-size: 0.95rem;
    font-weight: 700;
}

.brand-text small {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 400;
}

.topbar-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.topbar-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.topbar-search input {
    width: 100%;
    padding: 9px 14px 9px 40px;
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 0.875rem;
    font-family: inherit;
    background: #fafafa;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
    background: white;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.topbar-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.topbar-link:hover { color: var(--orange); }

.lang-switch {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.lang-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition);
}

.lang-btn.active {
    background: var(--orange);
    color: white;
}

.lang-btn:hover:not(.active) { background: var(--bg-hover); color: var(--text); }

/* ── Doc Layout ── */
.doc-layout {
    display: flex;
    padding-top: var(--topbar-height);
    min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 16px 0;
    z-index: 100;
}

.sidebar-search {
    padding: 0 16px 12px;
}

.sidebar-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-family: inherit;
    background: white;
    color: var(--text);
}

.sidebar-search input:focus {
    outline: none;
    border-color: var(--orange);
}

.sidebar-section { margin-bottom: 8px; }

.sidebar-section-title {
    padding: 8px 20px 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 400;
    border-left: 3px solid transparent;
    transition: all var(--transition);
}

.sidebar-link:hover {
    background: var(--bg-hover);
    color: var(--orange);
}

.sidebar-link.active {
    background: var(--bg-active);
    color: var(--orange);
    border-left-color: var(--orange);
    font-weight: 500;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Method badges (like API docs) */
.method-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.badge-get { background: #dbeafe; color: #2563eb; }
.badge-post { background: #dcfce7; color: #16a34a; }
.badge-patch { background: #f3e8ff; color: #9333ea; }
.badge-delete { background: #fee2e2; color: #dc2626; }
.badge-cat { background: #f1f5f9; color: var(--text-secondary); min-width: 24px; }

/* ── Main Content ── */
.doc-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px 48px 60px;
    max-width: calc(100% - var(--sidebar-width));
}

.doc-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
    line-height: 1.3;
}

.doc-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    margin: 32px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.doc-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin: 20px 0 8px;
}

.doc-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.doc-content ol, .doc-content ul {
    margin: 0 0 16px 24px;
    color: var(--text-secondary);
}

.doc-content li { margin-bottom: 8px; }

.doc-content strong { color: var(--text); font-weight: 600; }

.doc-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875em;
    color: #be185d;
    font-family: 'Courier New', monospace;
}

/* Callout box */
.callout {
    background: var(--blue-light);
    border-left: 4px solid var(--blue);
    padding: 16px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.callout strong { color: var(--navy); }

.callout-warning {
    background: var(--orange-light);
    border-left-color: var(--orange);
}

.callout-success {
    background: var(--green-light);
    border-left-color: var(--green);
}

/* ── Page sections (legacy compat) ── */
.page-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
	margin-top:16px
}

.page-header h1 { font-size: 1.75rem; color: var(--navy); margin-bottom: 8px; }
.page-header p { color: var(--text-secondary); }

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.back-link {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.back-link:hover { color: var(--orange); }

.section { padding: 0; margin-bottom: 32px; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.25rem;
    color: var(--navy);
    border: none;
    margin: 0;
    padding: 0;
}

.container { max-width: 100%; padding: 0; }
.container-narrow { max-width: 800px; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary { background: var(--orange); color: white; }
.btn-primary:hover { background: var(--orange-dark); color: white; }

.btn-outline { background: white; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--orange); }

.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { opacity: 0.9; color: white; }

.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ── Cards & Lists ── */
.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.update-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.update-card:hover {
    border-color: var(--orange);
    box-shadow: 0 2px 12px rgba(249, 115, 22, 0.08);
}

.update-card h3 { font-size: 1rem; margin: 10px 0 6px; }
.update-card h3 a { color: var(--navy); font-weight: 600; }
.update-card h3 a:hover { color: var(--orange); }
.update-card p { font-size: 0.875rem; color: var(--text-secondary); }

.updates-list { display: flex; flex-direction: column; gap: 12px; }

.update-row {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color var(--transition);
}

.update-row:hover { border-color: var(--orange); }
.update-version { min-width: 70px; text-align: center; }
.update-body { flex: 1; }
.update-body h3 { margin-bottom: 4px; }
.update-body h3 a { color: var(--navy); font-weight: 600; }

.version-tag {
    display: inline-block;
    background: var(--orange-light);
    color: var(--orange);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.version-tag.lg { font-size: 0.85rem; padding: 5px 14px; }

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
}

.read-more { color: var(--orange); font-weight: 600; margin-left: auto; }

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-featured { background: var(--orange-light); color: var(--orange); }
.badge-pin { background: var(--blue-light); color: var(--blue); }
.badge-lock { background: var(--red-light); color: var(--red); }
.badge-cat { background: #f1f5f9; color: var(--text-secondary); }
.badge-admin { background: var(--orange-light); color: var(--orange); }

/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 24px 0 32px;
}

.stat-box {
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.stat-box .stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--orange);
}

.stat-box .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Topics */
.topic-list { display: flex; flex-direction: column; gap: 2px; }

.topic-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    color: inherit;
    margin-bottom: 4px;
}

.topic-item:hover {
    border-color: var(--orange);
    background: var(--bg-hover);
    color: inherit;
}

.topic-info { flex: 1; }
.topic-info h4 { font-size: 0.9rem; color: var(--navy); margin-bottom: 2px; }
.topic-meta { font-size: 0.78rem; color: var(--text-muted); }
.topic-stats { display: flex; gap: 12px; font-size: 0.78rem; color: var(--text-muted); }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--orange);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.user-avatar.sm { width: 26px; height: 26px; font-size: 0.6rem; }

/* Forum */
.forum-layout { display: block; }
.forum-sidebar { display: none; }

.forum-table {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.forum-table-header, .forum-table-row {
    display: grid;
    grid-template-columns: 1fr 70px 70px 110px;
    align-items: center;
    padding: 12px 16px;
}

.forum-table-header {
    background: var(--bg-sidebar);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.forum-table-row {
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}

.forum-table-row:last-child { border-bottom: none; }
.forum-table-row:hover { background: var(--bg-hover); }

.forum-topic-cell { display: flex; align-items: center; gap: 10px; }
.forum-topic-cell h4 { font-size: 0.875rem; margin-bottom: 2px; }
.forum-topic-cell h4 a { color: var(--navy); font-weight: 500; }
.forum-topic-cell h4 a:hover { color: var(--orange); }
.forum-stat { text-align: center; font-size: 0.82rem; color: var(--text-secondary); }
.forum-stat.time { font-size: 0.78rem; color: var(--text-muted); }

/* Posts */
.post-card {
    display: flex;
    gap: 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 10px;
    position: relative;
}

.post-card.original { border-left: 3px solid var(--orange); }
.post-card.solution { border-left: 3px solid var(--green); }

.solution-badge {
    position: absolute;
    top: 0;
    right: 16px;
    background: var(--green);
    color: white;
    padding: 3px 10px;
    border-radius: 0 0 6px 6px;
    font-size: 0.72rem;
    font-weight: 600;
}

.post-sidebar { min-width: 70px; text-align: center; }
.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--orange);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    margin: 0 auto 6px;
}

.post-author { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); display: block; }
.post-body { flex: 1; }
.post-content { line-height: 1.7; color: var(--text-secondary); margin-bottom: 10px; }
.post-content code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 0.85em; color: #be185d; }
.post-time { font-size: 0.78rem; color: var(--text-muted); }
.post-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }

.reply-form-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 12px;
}

.reply-form-card h3 { font-size: 0.95rem; margin-bottom: 12px; color: var(--navy); }

.content-body { line-height: 1.8; color: var(--text-secondary); }
.content-body code { background: #f1f5f9; padding: 2px 8px; border-radius: 4px; font-size: 0.9em; color: #be185d; }

.update-header, .topic-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.admin-actions { display: flex; gap: 6px; margin-top: 10px; }

/* Forms */
.form-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 400; }
.form-check input[type="checkbox"] { width: auto; accent-color: var(--orange); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* Auth layout */
.layout-auth .topbar-search { display: none; }

.auth-main {
    padding-top: calc(var(--topbar-height) + 40px);
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 40px;
}

.auth-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header .brand-icon { display: flex; margin: 0 auto 8px; }
.auth-header h1 { font-size: 1.35rem; color: var(--navy); margin: 14px 0 6px; }
.auth-header p { color: var(--text-muted); font-size: 0.875rem; }
.auth-form { margin-bottom: 20px; }
.auth-footer { text-align: center; font-size: 0.85rem; color: var(--text-muted); }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-success { background: var(--green-light); color: #15803d; border: 1px solid #bbf7d0; }
.alert-error { background: var(--red-light); color: #b91c1c; border: 1px solid #fecaca; }
.alert-info { background: var(--blue-light); color: #1d4ed8; border: 1px solid #bfdbfe; }

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
    background: var(--bg-sidebar);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.empty-state p { margin-bottom: 14px; }

/* Pagination */
.pagination-nav { display: flex; justify-content: center; margin-top: 28px; }
.pagination { display: flex; gap: 4px; list-style: none; }

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.page-link:hover, .page-link.active {
    background: var(--orange);
    color: white;
    border-color: var(--orange);
}

/* Admin */
.admin-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
    overflow-x: auto;
}

.admin-nav-item {
    padding: 8px 16px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all var(--transition);
}

.admin-nav-item:hover, .admin-nav-item.active {
    background: var(--bg-active);
    color: var(--orange);
}

.admin-stats { margin-bottom: 24px; }

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-sidebar);
}

.panel-header h2, .panel-header h3 { font-size: 0.95rem; color: var(--navy); margin: 0; border: none; padding: 0; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--bg-sidebar);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-table td {
    padding: 10px 14px;
    border-top: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.admin-table.full {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 12px;
}

.actions-cell { display: flex; gap: 4px; flex-wrap: wrap; }
.user-cell { display: flex; align-items: center; gap: 8px; }
.admin-form h2 { margin-bottom: 20px; color: var(--navy); }

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

/* Footer */
.footer-minimal {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-sidebar);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Hide legacy elements */
.navbar, .footer, .mobile-toggle, .footer-minimal { display: none !important; }

/* Responsive */
@media (max-width: 900px) {
    .sidebar-toggle { display: block; }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .sidebar.open { transform: translateX(0); }

    .doc-content {
        margin-left: 0;
        max-width: 100%;
        padding: 24px 20px 48px;
    }

    .topbar-left { min-width: auto; }
    .topbar-search { display: none; }

    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .admin-grid { grid-template-columns: 1fr; }
    .update-row { flex-direction: column; align-items: flex-start; }

    .forum-table-header { display: none; }
    .forum-table-row { grid-template-columns: 1fr; gap: 6px; }

    .post-card { flex-direction: column; }
    .post-sidebar { display: flex; align-items: center; gap: 10px; min-width: auto; }
    .post-avatar { margin: 0; width: 34px; height: 34px; font-size: 0.7rem; }
}

/* ── Rich Text Editor (EasyMDE) ── */
.editor-wrap { margin-top: 4px; }

.editor-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.editor-wrap .EasyMDEContainer .CodeMirror {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    min-height: 180px;
}

.editor-wrap .EasyMDEContainer .CodeMirror-focused {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.editor-wrap .editor-toolbar {
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--bg-sidebar);
    opacity: 1;
}

.editor-wrap .editor-toolbar button {
    color: var(--text-secondary) !important;
    border-color: transparent !important;
}

.editor-wrap .editor-toolbar button:hover,
.editor-wrap .editor-toolbar button.active {
    background: var(--bg-active) !important;
    border-color: var(--orange) !important;
    color: var(--orange) !important;
}

.editor-wrap .editor-statusbar {
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ── Rendered Content ── */
.rich-content .inline-code,
.post-content code,
.content-body code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875em;
    color: #be185d;
    font-family: 'Courier New', Consolas, monospace;
}

.rich-content pre.code-block,
.content-body pre.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 16px 0;
    font-size: 0.85rem;
    line-height: 1.6;
    border-left: 4px solid var(--orange);
}

.rich-content pre.code-block code,
.content-body pre.code-block code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

.rich-content strong { color: var(--text); font-weight: 600; }
.rich-content em { font-style: italic; }
.rich-content a { color: var(--orange); word-break: break-all; }

.inline-form {
    display: inline-block;
    margin: 0;
}

.admin-actions .inline-form,
.actions-cell .inline-form {
    display: inline-block;
}
.module-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:24px;
    margin-top:30px;
}

/* Tablet */
@media (max-width:992px){
    .module-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

/* Mobil */
@media (max-width:576px){
    .module-grid{
        grid-template-columns:1fr;
    }
}

.module-card{
    background:#fff;
    border:1px solid #e9ecef;
    border-radius:8px;
    padding:8px;
    transition:.25s;
	font-size: 13px;
	color: #333
}

.module-card:hover{
    box-shadow:0 12px 30px rgba(0,0,0,.08);
}

.module-card-header{
    display:flex;
    gap:8px;
    align-items:flex-start;
}

.module-logo{
    width:60px;
    height:60px;
    flex-shrink:0;
    border-radius:8px;
    overflow:hidden;
    background:#f5f5f5;
    border:1px solid #eee;
    display:flex;
    justify-content:center;
    align-items:center;
}

.module-logo img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.module-logo-fallback{
    font-size:32px;
    color:#ff6b00;
    display:flex;
    justify-content:center;
    align-items:center;
    width:100%;
    height:100%;
}

.module-info{
    flex:1;
}

.module-title-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
}

.module-title-row h3{
    margin:0;
    font-size:16px;
}

.module-featured{
    background:#fff4e5;
    color:#ff8c00;
    padding:4px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:600;
}

.module-info p{
    margin:10px 0 0;
    color:#666;
    line-height:18px;
	height:40px;
}

.module-footer{
    margin-top:20px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.module-meta{
    display:flex;
    gap:18px;
    color:#666;
    font-size:14px;
}

.module-meta i{
    margin-right:4px;
}

.module-price{
    display:flex;
    align-items:center;
    gap:12px;
}

.price.free{
    color:#16a34a;
    font-weight:700;
}

.price.paid{
    color:#ef4444;
    font-weight:700;
}

.btn-module{
    background:#ff6b00;
    color:#fff;
    padding:9px 18px;
    border-radius:10px;
    text-decoration:none;
    font-weight:600;
}

.btn-module:hover{
    background:#e85d00;
    color:#fff;
}