:root {
    --primary: #0ea5e9; /* Electric Blue Nuansa */
    --primary-hover: #0284c7;
    --sidebar-bg: #0f172a; /* Dark Slate */
    --sidebar-hover: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --text-dark: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --sidebar-width: 260px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }
body { background-color: var(--bg-main); color: var(--text-dark); display: flex; height: 100vh; overflow: hidden; }

/* === LAYOUT UTAMA === */
#app-container { display: none; width: 100%; height: 100%; flex-direction: row; }

/* === SIDEBAR (NUANSA STYLE) === */
.sidebar { width: var(--sidebar-width); background: var(--sidebar-bg); border-right: 1px solid #1e293b; display: flex; flex-direction: column; overflow-y: auto; flex-shrink: 0; box-shadow: 4px 0 10px rgba(0,0,0,0.1); z-index: 10; }
.sidebar-header { padding: 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #1e293b; margin-bottom: 20px; }
.logo-icon { background: var(--primary); color: white; width: 36px; height: 36px; display: flex; justify-content: center; align-items: center; border-radius: 8px; font-weight: 800; font-size: 1.2rem; }
.logo-text { color: white; font-weight: 700; font-size: 1.1rem; letter-spacing: 0.5px; }

/* === DROPDOWN PEMILIH WEBSITE ALA BLOGGER === */
.project-selector { margin: 0 20px 20px 20px; padding: 12px 16px; background: var(--sidebar-hover); border-radius: 8px; color: white; font-weight: 600; font-size: 0.95rem; border: 1px solid #334155; cursor: pointer; display: flex; justify-content: space-between; align-items: center; position: relative; user-select: none; transition: 0.2s; }
.project-selector:hover { border-color: var(--primary); background: #1e293bd9; }
.project-dropdown { display: none; position: absolute; top: 115%; left: 0; width: 100%; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); z-index: 100; overflow: hidden; flex-direction: column; }
.project-dropdown.show { display: flex; animation: slideDown 0.2s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.project-item { padding: 12px 16px; color: var(--text-dark); cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-item:hover { background: #f1f5f9; color: var(--primary); }
.project-item.active { border-left: 3px solid var(--primary); background: #f8fafc; font-weight: 700; color: var(--primary); }
.project-divider { height: 1px; background: var(--border-color); }
.project-new { padding: 12px 16px; color: var(--primary); cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: 0.2s; display: flex; align-items: center; gap: 8px; background: #f0f9ff; }
.project-new:hover { background: #e0f2fe; }

/* Tombol Tulis Baru Ala Blogger */
.new-post-btn { background: var(--primary); color: white; padding: 12px 20px; border-radius: 30px; border: none; font-size: 0.95rem; font-weight: 600; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: 0.2s; margin: 0 20px 24px 20px; box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3); justify-content: center; }
.new-post-btn:hover { background: var(--primary-hover); transform: translateY(-1px); }

/* Menu Navigasi */
.nav-links { list-style: none; margin-bottom: auto; padding-right: 10px; }
.nav-links li { padding: 12px 20px 12px 30px; margin-bottom: 4px; border-radius: 0 24px 24px 0; cursor: pointer; color: var(--sidebar-text); font-weight: 500; font-size: 0.95rem; display: flex; align-items: center; transition: 0.2s; border-left: 3px solid transparent; }
.nav-links li:hover { background: var(--sidebar-hover); color: white; }
.nav-links li.active { background: rgba(14, 165, 233, 0.1); color: var(--primary); font-weight: 600; border-left-color: var(--primary); }

/* Garis Pemisah & Link Eksternal */
.sidebar-divider { height: 1px; background: #1e293b; margin: 16px 20px; }
.nav-links li.external-link { color: #cbd5e1; margin-top: auto; }
.nav-links li.external-link:hover { color: white; background: none; text-decoration: underline; }

/* === KONTEN UTAMA === */
.main-content { flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column; background: var(--bg-main); }
.header { background: var(--bg-surface); height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
.header h2 { font-size: 1.3rem; font-weight: 600; color: var(--text-dark); }
.content-area { padding: 30px 40px; max-width: 1200px; margin: 0 auto; width: 100%; }

/* === KARTU & GRID === */
.view-section { display: none; animation: fadeIn 0.3s; }
.view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 10px; padding: 24px; margin-bottom: 24px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.header-action { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.header-action h3 { font-size: 1.4rem; color: var(--text-dark); font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.stat-card { border-left: 4px solid var(--primary); padding: 24px; }
.stat-card h3 { color: var(--text-muted); font-size: 0.95rem; font-weight: 600; text-transform: uppercase; margin-bottom: 12px; letter-spacing: 0.5px; }
.stat-card .value { font-size: 2.8rem; color: var(--text-dark); font-weight: 700; line-height: 1; }

/* === FORM & TOMBOL === */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-dark); font-size: 0.9rem; font-weight: 600; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px 16px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 1rem; background: #f8fafc; transition: 0.2s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1); }

.btn { padding: 10px 20px; background: var(--primary); color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.95rem; transition: 0.2s; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { background: var(--primary-hover); }
.btn-outline { background: white; color: var(--text-dark); border: 1px solid var(--border-color); }
.btn-outline:hover { background: #f1f5f9; }

/* === TABEL LISTING === */
.table-container { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 24px; text-align: left; border-bottom: 1px solid var(--border-color); }
th { background: #f8fafc; font-weight: 600; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
td { font-size: 0.95rem; color: var(--text-dark); }
.empty-row { text-align: center; padding: 40px; color: var(--text-muted); font-style: italic; }

/* === LOGIN & MODAL OVERLAY === */
#login-overlay { position: fixed; inset: 0; background: #0f172a; display: flex; justify-content: center; align-items: center; z-index: 9999; }
.login-box { background: white; padding: 40px; border-radius: 12px; width: 100%; max-width: 400px; text-align: center; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.login-box h2 { font-size: 1.8rem; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.login-box p { color: #64748b; margin-bottom: 32px; font-size: 0.95rem; }
.login-box .btn { width: 100%; margin-top: 10px; padding: 12px; border-radius: 6px; font-size: 1.05rem; }

.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.75); display: flex; justify-content: center; align-items: center; z-index: 9999; backdrop-filter: blur(4px); }
.modal-box { background: white; padding: 32px; border-radius: 12px; width: 100%; max-width: 420px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); animation: popIn 0.3s; }
@keyframes popIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-box h3 { font-size: 1.4rem; color: #0f172a; margin-bottom: 20px; }