:root {
    --font-body: 'Google Sans', 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-heading: 'Fira Sans', sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    --primary: #2563eb; --primary-dark: #1d4ed8;
    --wa-purple: #7c3aed; --wa-purple-dark: #6d28d9;
    --price-bg: #f0fdf4; --price-text: #16a34a; --price-border: #bbf7d0;
    --warn-bg: #fef3c7; --warn-text: #92400e; --warn-border: #fde68a;
    --bg-body: #f8fafc; --bg-card: #fff; --bg-subtle: #f8fafc;
    --text-main: #0f172a; --text-muted: #64748b; --border: #e2e8f0;
    --footer-bg: #0f172a; --footer-text: #cbd5e1;
    --shadow-sm: 0 1px 2px rgb(0 0 0/.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0/.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0/.1);
    --radius: 12px; --radius-sm: 6px; --radius-md: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--bg-body); color: var(--text-main); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); line-height: 1.2; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-muted { color: var(--text-muted); }

/* HEADER & BRAND */
.index-header { background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.header-actions { display: flex; align-items: center; gap: 15px; }
.index-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.25rem; color: var(--text-main); text-decoration: none; }
.index-brand img { height: 36px; width: auto; }

/* MAIN & SECTION */
main { flex: 1; padding: 3rem 0 4rem; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2rem; font-weight: 800; margin: 2.7rem 0 .5rem; }
.section-title p { color: var(--text-muted); font-size: 1.1rem; }

/* CATEGORY HEADER */
.category-header { text-align: center; margin: 1rem 0 3rem; padding: 2rem; background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); }
.category-title { font-size: 2rem; margin-bottom: .5rem; }
.category-desc { color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.category-actions { margin-top: 1rem; }
.btn-back-home { display: inline-flex; align-items: center; gap: 6px; }

/* CARD GRID */
.card-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
@media (max-width:1024px) { .card-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width:640px) { .card-grid { grid-template-columns: 1fr; } }
.empty-state { grid-column: 1/-1; text-align: center; padding: 4rem; color: var(--text-muted); font-size: 1.1rem; background: var(--bg-card); border-radius: var(--radius); border: 1px dashed var(--border); }
.card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: all .3s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-image-wrapper { position: relative; padding-top: 56.25%; overflow: hidden; background: #f1f5f9; }
.card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img { transform: scale(1.05); }
.card-body { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: .75rem; line-height: 1.3; }

/* CARD DESCRIPTION HTML */
.card-desc { color: var(--text-muted); font-size: .95rem; line-height: 1.6; flex-grow: 1; margin-bottom: 1.5rem; }
.card-desc p { margin-bottom: .75rem; }
.card-desc p:last-child { margin-bottom: 0; }
.card-desc strong, .card-desc b { color: var(--text-main); font-weight: 700; }
.card-desc em, .card-desc i { font-style: italic; }
.card-desc u { text-decoration: underline; text-decoration-color: var(--primary); }
.card-desc a { color: var(--primary); text-decoration: underline; font-weight: 500; }
.card-desc a:hover { color: var(--primary-dark); }
.card-desc ul, .card-desc ol { margin-left: 1.2rem; margin-bottom: .75rem; }
.card-desc li { margin-bottom: .25rem; }
.card-desc h3, .card-desc h4 { margin: 1rem 0 .5rem; }
.card-desc h3 { font-size: 1.15rem; }
.card-desc h4 { font-size: 1.05rem; }
.card-desc blockquote { border-left: 3px solid var(--primary); padding: .75rem 1rem; margin: .75rem 0; font-style: italic; background: rgba(37,99,235,.05); border-radius: 0 6px 6px 0; }
.card-desc code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: .85rem; color: #dc2626; }

/* CARD PRICE & BUTTONS */
.card-price-wrapper { display: flex; gap: 10px; margin-bottom: 1.25rem; width: 100%; }
.card-price, .btn-detail { flex: 1 1 0%; display: flex; align-items: center; justify-content: center; gap: 6px; padding: .65rem 1rem; border-radius: var(--radius-md); font-weight: 600; font-size: .95rem; text-align: center; min-height: 44px; }
.card-price { background: var(--price-bg); color: var(--price-text); border: 1px solid var(--price-border); cursor: default; pointer-events: none; user-select: none; }
.btn-detail { background: var(--primary); color: #fff; border: 1.5px solid var(--primary); text-decoration: none; transition: all .2s; }
.btn-detail:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-2px); }
.btn-detail svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.card-actions { display: flex; gap: .75rem; margin-top: auto; }
.btn-outline, .btn-wa-card { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: .65rem 1rem; border-radius: var(--radius-md); font-weight: 600; font-size: .9rem; text-decoration: none; transition: all .2s; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: #eff6ff; }
.btn-wa-card { background: var(--wa-purple); color: #fff; border: 1.5px solid var(--wa-purple); }
.btn-wa-card:hover { background: var(--wa-purple-dark); border-color: var(--wa-purple-dark); transform: translateY(-2px); }
.btn-wa-card svg { width: 18px; height: 18px; fill: currentColor; }

/* HEADER BUTTON */
.wa-btn-header { display: inline-flex; align-items: center; gap: 8px; background: var(--wa-purple); color: #fff; text-decoration: none; padding: .6rem; border-radius: var(--radius-md); font-weight: 600; font-size: .8rem; transition: all .2s; box-shadow: 0 4px 6px -1px rgba(124,58,237,.3); }
.wa-btn-header:hover { background: var(--wa-purple-dark); transform: translateY(-2px); box-shadow: 0 6px 10px -1px rgba(124,58,237,.4); }

/* FOOTER */
.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem; padding: 4rem 0; border-bottom: 1px solid rgba(255,255,255,.1); }
@media (max-width:768px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0; } }
.footer-col { padding-left: 1.5rem; }
.footer-col h4 { color: #fff; font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; position: relative; padding-bottom: .75rem; }
.footer-col h4::after { content:''; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background: var(--primary); border-radius: 2px; }
.footer-col p { font-size: .95rem; line-height: 1.7; margin-bottom: 1rem; }
.footer-links-html { display: flex; flex-direction: column; gap: .75rem; }
.footer-links-html a { color: var(--footer-text); text-decoration: none; font-size: .95rem; display: inline-flex; align-items: center; width: fit-content; transition: all .2s; }
.footer-links-html a::before { content:'›'; color: var(--primary); font-size: 1.2rem; font-weight: bold; margin-right: 8px; transition: transform .2s; }
.footer-links-html a:hover { color: #fff; padding-left: 5px; }
.footer-links-html a:hover::before { transform: translateX(3px); }
.footer-contact { white-space: pre-line; }
.footer-bottom { padding: 1.5rem 0; text-align: center; font-size: .9rem; color: #64748b; }

/* DETAIL PAGE */
.detail-container { padding: 3rem 0 4rem; }
.detail-card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-md); }
.detail-image-wrapper { width: 100%; max-height: 400px; overflow: hidden; background: #f1f5f9; }
.detail-image { width: 100%; height: 100%; object-fit: cover; }
.detail-content { padding: 2.5rem; }
.detail-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.detail-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; }
.detail-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.detail-price { background: var(--price-bg); color: var(--price-text); padding: .4rem 1rem; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.9rem; border: 1px solid var(--price-border); text-decoration: none;}
.detail-date { color: var(--text-muted); font-size: .9rem; }

/* CATEGORY BADGE (WARNING) */
.category-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--warn-bg); color: var(--warn-text); border: 1.5px solid var(--warn-border); padding: .4rem 1rem; border-radius: var(--radius-sm); text-decoration: none; font-weight: 700; font-size: .85rem; transition: all .2s; white-space: nowrap; }
.category-badge:hover { background: #fde68a; color: #78350f; border-color: #fbbf24; transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(251,191,36,.2); }
.category-badge::before { content:'📁'; font-size: .9rem; }

.detail-full-description { margin-bottom: 2.5rem; }
.detail-full-description h3 { font-size: 1.25rem; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--primary); display: inline-block; }
.detail-full-description p { margin-bottom: .75rem; color: var(--text-main); line-height: 1.7; }
.detail-full-description strong { color: var(--text-main); font-weight: 700; }
.detail-full-description ul { margin-left: 1.2rem; margin-bottom: .75rem; color: var(--text-main); }
.detail-full-description li { margin-bottom: .25rem; }
.detail-full-description blockquote { border-left: 3px solid var(--primary); padding: .75rem 1rem; margin: .75rem 0; font-style: italic; background: rgba(37,99,235,.05); border-radius: 0 6px 6px 0; }
.detail-full-description code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: .85rem; color: #dc2626; }
.detail-actions { display: flex; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.btn-primary-lg, .btn-wa-lg { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 1rem 1.5rem; border-radius: var(--radius-md); font-weight: 700; font-size: 1rem; text-decoration: none; transition: all .2s; min-width: 200px; }
.btn-primary-lg { background: var(--primary); color: #fff; border: 1.5px solid var(--primary); }
.btn-primary-lg:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-2px); }
.btn-wa-lg { background: var(--wa-purple); color: #fff; border: 1.5px solid var(--wa-purple); }
.btn-wa-lg:hover { background: var(--wa-purple-dark); border-color: var(--wa-purple-dark); transform: translateY(-2px); }
.btn-primary-lg svg, .btn-wa-lg svg { width: 20px; height: 20px; }
.btn-back { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--text-muted); border: 1.5px solid var(--border); padding: .5rem 1rem; border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem; text-decoration: none; transition: all .2s; width: fit-content; margin-bottom: 1.5rem; }
.btn-back:hover { background: var(--bg-body); color: var(--primary); border-color: var(--primary); transform: translateX(-4px); }
.btn-back svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* PAGINATION */
.pagination-wrapper { display: flex; justify-content: center; padding: 2rem 0; margin-top: 1rem; }
.pagination { display: flex; align-items: center; gap: 1.25rem; background: var(--bg-card); padding: .75rem 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.pagination-btn { display: inline-flex; align-items: center; gap: 6px; padding: .55rem 1.1rem; background: var(--primary); color: #fff; border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; font-size: .9rem; transition: all .2s; }
.pagination-btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pagination-info { color: var(--text-muted); font-size: .9rem; font-weight: 500; white-space: nowrap; user-select: none; }

/* ADMIN LAYOUT */
.admin-layout { display: flex; min-height: 100vh; background: var(--bg-body); position: relative; }
.sidebar-toggle-btn { background: transparent; border: 1px solid var(--border); color: var(--text-main); width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .2s; flex-shrink: 0; }
.sidebar-toggle-btn:hover { background: var(--bg-body); border-color: var(--primary); color: var(--primary); }
.sidebar-toggle-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.admin-sidebar { width: 260px; background: var(--bg-card); border-right: 1px solid var(--border); padding: 1.5rem; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; transition: width .3s, padding .3s; }
.sidebar-brand { font-size: 1.25rem; font-weight: 800; color: var(--primary); padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; display: flex; align-items: center; gap: 8px; }
.sidebar-menu { list-style: none; flex-grow: 1; }
.sidebar-menu li { margin-bottom: .5rem; }
.sidebar-menu a { display: flex; align-items: center; gap: 12px; padding: .75rem 1rem; color: var(--text-muted); text-decoration: none; border-radius: var(--radius-md); transition: all .2s; font-weight: 500; font-size: .95rem; white-space: nowrap; overflow: hidden; }
.sidebar-menu a:hover { background: #eff6ff; color: var(--primary); }
.sidebar-menu a.active { background: var(--primary); color: #fff; box-shadow: 0 4px 6px -1px rgba(37,99,235,.3); }
.nav-icon { font-size: 1.2rem; min-width: 24px; text-align: center; display: flex; justify-content: center; align-items: center; }
.nav-text { transition: opacity .2s, transform .2s; }
.sidebar-footer { margin-top: auto; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .75rem; }
.sidebar-btn { text-align: center; display: block; width: 100%; margin-bottom: .5rem; }

/* COLLAPSED SIDEBAR */
.admin-sidebar.collapsed { width: 70px; padding: 1.5rem 0; }
.admin-sidebar.collapsed .sidebar-brand .nav-text,
.admin-sidebar.collapsed .nav-text,
.admin-sidebar.collapsed .sidebar-footer .nav-text { display: none; opacity: 0; width: 0; }
.admin-sidebar.collapsed .sidebar-brand,
.admin-sidebar.collapsed .sidebar-menu a,
.admin-sidebar.collapsed .sidebar-footer a { justify-content: center; padding: .75rem 0; gap: 0; }
.admin-sidebar.collapsed .nav-icon { margin: 0; font-size: 1.5rem; min-width: auto; width: 100%; }

/* MOBILE SIDEBAR */
@media (max-width:768px) {
    .admin-layout { position: relative; }
    .admin-sidebar { position: fixed; left: -280px; top: 0; height: 100vh; z-index: 1000; width: 260px; transition: left .3s; box-shadow: 4px 0 15px rgba(0,0,0,.1); padding: 1.5rem; }
    .admin-sidebar.mobile-open { left: 0; }
    .admin-main { width: 100%; padding: 1rem; }
    .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; opacity: 0; transition: opacity .3s; }
    .sidebar-overlay.active { display: block; opacity: 1; }
}
.admin-main { flex: 1; padding: 2rem; overflow-y: auto; }
.admin-top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.admin-top-actions { display: flex; align-items: center; gap: 15px; }
.admin-top-bar h2 { font-size: 1.5rem; font-weight: 700; }

/* ADMIN STATS */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: var(--bg-card); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 1.5rem; transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon { width: 50px; height: 50px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.stat-icon.blue { background: #eff6ff; color: #2563eb; }
.stat-icon.green { background: #f0fdf4; color: #16a34a; }
.stat-icon.purple { background: #faf5ff; color: #9333ea; }
.stat-info h3 { font-size: .85rem; color: var(--text-muted); margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat-info .value { font-size: 1.75rem; font-weight: 800; }
.stat-value-status { font-size: 1.2rem; margin-top: 8px; color: #16a34a; }
.dashboard-welcome-text { color: var(--text-muted); line-height: 1.6; }

/* SERVER INFO */
.server-info-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.server-badge { display: inline-block; font-weight: 700; font-family: var(--font-mono); font-size: .9rem; background: #f1f5f9; padding: 6px 12px; border-radius: var(--radius-sm); white-space: nowrap; border: 1px solid var(--border); text-align: center; }

/* ADMIN FORMS */
.settings-box { background: var(--bg-subtle); padding: 1.5rem; border-radius: var(--radius-md); margin-bottom: 2rem; border: 1px solid var(--border); }
.settings-form-vertical { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width:768px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; margin-bottom: .5rem; font-weight: 600; font-size: .9rem; }
.form-input, .form-textarea { width: 100%; padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: .95rem; transition: border .2s; }
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-textarea { height: 120px; resize: vertical; }
.settings-divider { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.settings-subtitle { margin-bottom: 1rem; color: var(--primary); font-size: 1.1rem; font-weight: 700; }
.settings-subtitle-secondary { margin-bottom: 1rem; font-size: 1.1rem; font-weight: 700; }
.form-hint { color: var(--text-muted); font-size: .85rem; display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.form-hint img { border: 1px solid var(--border); border-radius: 4px; }
.form-hint-block { color: var(--text-muted); display: block; margin-top: 6px; font-size: .85rem; }
.form-submit-wrapper { margin-top: 20px; }

/* ADMIN BUTTONS */
.btn { background: var(--primary); color: #fff; border: none; padding: .75rem 1.5rem; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; transition: background .2s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn:hover { background: var(--primary-dark); }
.btn-danger { background: #ef4444; color: #fff; text-decoration: none; }
.btn-danger:hover { background: #dc2626; }
.btn-secondary { background: var(--text-muted); text-decoration: none; color: #fff; padding: .75rem 1.5rem; border-radius: var(--radius-sm); display: inline-block; transition: background .2s; }
.btn-secondary:hover { background: #475569; }
.form-actions { display: flex; gap: 1rem; margin-top: 1rem; }
.alert { padding: 1rem; background: #dcfce7; color: #166534; border-radius: var(--radius-sm); margin-bottom: 1.5rem; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* ADMIN TABLES */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); }
.admin-table { width: 100%; min-width: 600px; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table th { background: var(--bg-subtle); font-weight: 600; color: var(--text-muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.thumb { width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.post-title-cell { font-weight: 600; }
.post-price-cell { color: #059669; font-weight: 700; }
.action-cell { text-align: right; white-space: nowrap; }
.post-link { color: var(--primary); text-decoration: none; font-weight: 500; }
.post-link:hover { text-decoration: underline; }
.btn-sm { padding: .35rem .75rem; font-size: .8rem; font-weight: 600; text-decoration: none; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; transition: all .2s; white-space: nowrap; }
.btn-secondary.btn-sm { background: #64748b; color: #fff; }
.btn-secondary.btn-sm:hover { background: #475569; }
.btn-danger.btn-sm { background: #ef4444; color: #fff; }
.btn-danger.btn-sm:hover { background: #dc2626; }
.user-badge-self { background: #dbeafe; color: #1e40af; padding: 2px 8px; border-radius: 12px; font-size: .75rem; margin-left: 8px; font-weight: 600; }
.action-disabled { color: var(--text-muted); font-size: .85rem; }
.badge { display: inline-block; background: #eff6ff; color: #2563eb; padding: .25rem .75rem; border-radius: 12px; font-size: .85rem; font-weight: 600; }
@media (max-width:768px) {
    .admin-table th, .admin-table td { padding: .75rem .5rem; font-size: .85rem; }
    .thumb { width: 40px; height: 40px; }
    .hide-on-mobile { display: none; }
}

/* ADMIN UTILITIES */
.image-preview-wrapper { margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.image-preview-wrapper small { color: var(--text-muted); }
.image-preview-large { width: 100px; height: 100px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--border); }
.html-btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-main); padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: .85rem; font-weight: 600; transition: all .2s; display: flex; align-items: center; justify-content: center; min-width: 32px; }
.html-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* FILE UPLOAD */
.file-upload-wrapper { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file-upload-wrapper input[type="file"] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.file-upload-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-card); color: var(--text-main); border: 1.5px solid var(--border); padding: .65rem 1.2rem; border-radius: var(--radius-md); font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .2s; user-select: none; }
.file-upload-btn:hover { border-color: var(--primary); color: var(--primary); background: #eff6ff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.file-upload-btn:active { transform: translateY(0); }
.file-upload-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.file-name { color: var(--text-muted); font-size: .875rem; font-style: italic; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name.has-file { color: var(--primary); font-weight: 500; font-style: normal; }

/* LOGIN PAGE */
.login-wrapper { display: flex; justify-content: center; align-items: center; height: 100vh; background: var(--bg-body); }
.login-box { background: var(--bg-card); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; max-width: 350px; border: 1px solid var(--border); }
.login-box h2 { text-align: center; margin-bottom: 1.5rem; }
.login-error { color: #ef4444; font-size: .9rem; margin-bottom: 1rem; text-align: center; background: #fef2f2; padding: .75rem; border-radius: var(--radius-sm); border: 1px solid #fecaca; }
.login-box .form-input { margin-bottom: 1rem; }
.login-box .btn { width: 100%; margin-bottom: .5rem; }
.login-back-link { display: block; text-align: center; margin-top: 1rem; color: var(--text-muted); text-decoration: none; font-size: .9rem; transition: color .2s; }
.login-back-link:hover { color: var(--primary); }

/* UTILITIES */
.input-short { max-width: 200px; }
.input-readonly { background: #f1f5f9; cursor: not-allowed; }
.code-badge { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: .85rem; font-family: var(--font-mono); }
.col-id { width: 60px; }
.col-id-sm { width: 50px; }

/* DARK MODE */
body.dark-mode {
    --bg-body: #0f172a; --bg-card: #1e293b; --bg-subtle: #162032;
    --text-main: #f8fafc; --text-muted: #94a3b8; --border: #334155;
    --footer-bg: #020617; --footer-text: #cbd5e1;
    --price-bg: #064e3b; --price-text: #4ade80; --price-border: #047857;
    --warn-bg: #78350f; --warn-text: #fcd34d; --warn-border: #92400e;
    --shadow-sm: 0 1px 2px rgb(0 0 0/.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0/.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0/.5);
}
body.dark-mode .index-header { background: rgba(15,23,42,.95); }
body.dark-mode .site-footer { border-top: 1px solid #1e293b; }
body.dark-mode .footer-col h4::after { background: #3b82f6; }
body.dark-mode .card-desc code { background: #0f172a; color: #f87171; }
body.dark-mode .card-desc blockquote { background: rgba(59,130,246,.1); }
body.dark-mode .admin-sidebar { background: #1e293b; border-right-color: #334155; }
body.dark-mode .sidebar-menu a:hover { background: #334155; color: #60a5fa; }
body.dark-mode .sidebar-menu a.active { background: #2563eb; }
body.dark-mode .stat-icon.blue { background: #1e3a8a; color: #60a5fa; }
body.dark-mode .stat-icon.green { background: #14532d; color: #4ade80; }
body.dark-mode .stat-icon.purple { background: #581c87; color: #c084fc; }
body.dark-mode .server-badge { background: #0f172a; color: #93c5fd; }
body.dark-mode .form-input, body.dark-mode .form-textarea { background: #0f172a; border-color: var(--border); }
body.dark-mode .form-input:focus, body.dark-mode .form-textarea:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.2); }
body.dark-mode .btn-secondary { background: #475569; }
body.dark-mode .btn-secondary:hover { background: #64748b; }
body.dark-mode .alert { background: #064e3b; color: #6ee7b7; border-color: #059669; }
body.dark-mode .thumb { background: #0f172a; }
body.dark-mode .post-price-cell { color: #4ade80; }
body.dark-mode .user-badge-self { background: #1e3a8a; color: #93c5fd; }
body.dark-mode .badge { background: #1e3a8a; color: #93c5fd; }
body.dark-mode .file-upload-btn { background: #0f172a; }
body.dark-mode .file-upload-btn:hover { background: #1e293b; border-color: #3b82f6; color: #60a5fa; }
body.dark-mode .file-name.has-file { color: #60a5fa; }
body.dark-mode .html-btn { background: #1e293b; border-color: #334155; color: #cbd5e1; }
body.dark-mode .html-btn:hover { background: #2563eb; }
body.dark-mode .login-error { background: #450a0a; border-color: #7f1d1d; color: #fca5a5; }
body.dark-mode .sidebar-toggle-btn:hover { background: #334155; color: #60a5fa; border-color: #60a5fa; }
body.dark-mode .input-readonly { background: #0f172a; }
body.dark-mode .code-badge { background: #0f172a; color: #f87171; }
body.dark-mode .detail-full-description code { background: #0f172a; color: #f87171; }
body.dark-mode .detail-full-description blockquote { background: rgba(59,130,246,.1); }
body.dark-mode .btn-back:hover { background: #1e293b; color: #60a5fa; border-color: #60a5fa; }
body.dark-mode .category-badge:hover { background: #92400e; color: #fde68a; border-color: #b45309; }

/* THEME TOGGLE */
.theme-toggle-wrapper { display: flex; align-items: center; }
.theme-toggle-input { display: none; }
.theme-toggle-label { position: relative; display: inline-block; width: 52px; height: 28px; cursor: pointer; }
.theme-toggle-slider { position: absolute; inset: 0; background: #cbd5e1; transition: background .4s; border-radius: 34px; box-shadow: inset 0 2px 4px rgba(0,0,0,.1); }
.theme-toggle-slider::before { position: absolute; content:"☀️"; font-size: 14px; display: flex; align-items: center; justify-content: center; height: 22px; width: 22px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: transform .4s cubic-bezier(.68,-.15,.27,1.15), background .4s; }
.theme-toggle-input:checked + .theme-toggle-label .theme-toggle-slider { background: #3b82f6; }
.theme-toggle-input:checked + .theme-toggle-label .theme-toggle-slider::before { transform: translateX(24px); content:"🌙"; background: #0f172a; }