/* =========================================
   VARIABEL & RESET DASAR
========================================= */
:root {
    --primary-color: #1A56DB;
    --surface-color: #FFFFFF;
    --background-color: #F3F4F6;
    --text-color: #1F2937;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--background-color); color: var(--text-color); }

/* =========================================
   1. DASHBOARD ADMIN (BACK-END)
========================================= */
body.admin-layout { background-color: #F8FAFC; }
.app-container { display: flex; flex-direction: column; min-height: 100vh; }
.sidebar-nav { display: none; }
.main-content { flex: 1; display: flex; flex-direction: column; padding-bottom: 80px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; background: #fff; position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 3px rgba(0,0,0,0.02); border-bottom: 1px solid #f1f5f9; }
.admin-header h2 { font-size: 1.25rem; font-weight: 700; color: #1e293b; margin: 0; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.icon-btn { background: none; border: none; font-size: 1.2rem; color: #64748b; cursor: pointer; }
.user-profile { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.user-name { font-weight: 600; font-size: 0.9rem; color: #334155; }
.content-body { padding: 25px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 20px; }
.dashboard-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; }
.stat-card, .chart-card { background: #ffffff; padding: 20px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; }
.stat-title { font-size: 0.9rem; color: #64748b; margin-bottom: 8px; font-weight: 500; }
.stat-value { font-size: 1.8rem; color: #0f172a; margin-bottom: 10px; font-weight: 700; }
.stat-trend { font-size: 0.8rem; font-weight: 600; }
.stat-trend.positive { color: #10b981; }
.card-heading { font-size: 1rem; color: #1e293b; margin-bottom: 15px; font-weight: 700; }
.placeholder-chart { height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f8fafc; border-radius: 8px; color: #94a3b8; gap: 10px; }
.bottom-nav { display: flex; position: fixed; bottom: 0; width: 100%; background: #ffffff; justify-content: space-around; padding: 10px 0 15px; box-shadow: 0 -4px 15px rgba(0,0,0,0.05); z-index: 100; border-radius: 20px 20px 0 0; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #94a3b8; font-size: 11px; font-weight: 600; gap: 5px; }
.bottom-nav a i { font-size: 1.2rem; }
.bottom-nav a.active { color: var(--primary-color); }

@media (min-width: 768px) {
    .app-container { flex-direction: row; }
    .sidebar-nav { display: flex; flex-direction: column; width: 260px; background: #ffffff; height: 100vh; position: sticky; top: 0; box-shadow: 1px 0 10px rgba(0,0,0,0.03); border-right: 1px solid #f1f5f9; }
    .logo-area { padding: 25px 20px; font-size: 1.4rem; font-weight: 800; color: #0f172a; display: flex; align-items: center; gap: 10px; }
    .logo-area i { color: var(--primary-color); font-size: 1.5rem; }
    .nav-links { display: flex; flex-direction: column; padding: 10px; gap: 5px; }
    .nav-links a { padding: 12px 15px; text-decoration: none; color: #64748b; border-radius: 10px; transition: all 0.3s; font-weight: 600; display: flex; align-items: center; gap: 12px; }
    .nav-links a i { font-size: 1.1rem; width: 20px; text-align: center; }
    .nav-links a:hover { background: #f1f5f9; color: #0f172a; }
    .nav-links a.active { background: var(--primary-color); color: #ffffff; box-shadow: 0 4px 10px rgba(26, 86, 219, 0.2); }
    .bottom-nav { display: none; }
    .main-content { padding-bottom: 0; }
    .admin-header { border-bottom: 1px solid #f1f5f9; box-shadow: none; }
}

/* =========================================
   2. LANDING PAGE PUBLIK (FRONT-END)
========================================= */
body.public-layout { display: block; background-color: var(--surface-color); }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* Navbar Menyatu dengan Hero */
.public-header {
    background-color: transparent !important;
    position: absolute;
    width: 100%;
    top: 0;
    box-shadow: none !important;
    z-index: 1000;
    padding-top: 15px;
}
.navbar { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.navbar .logo { font-size: 1.8rem; font-weight: 800; letter-spacing: 1px; color: #ffffff !important; display: flex; align-items: center; gap: 8px;}
.nav-menu a { text-decoration: none; color: #E2E8F0 !important; margin-left: 25px; font-size: 15px; font-weight: 600; transition: color 0.3s ease; }
.nav-menu a:hover { color: #06B6D4 !important; }

.section { padding: 80px 0; }
.bg-light { background-color: #F9FAFB; }
.text-center { text-align: center; }

.section-title { text-align: center; font-size: 2.2rem; color: var(--text-color); margin-bottom: 15px; font-weight: 800;}
.section-title::after { content: ''; display: block; width: 60px; height: 4px; background-color: var(--primary-color); margin: 15px auto 40px; border-radius: 2px; }

/* =========================================
   HERO SECTION ELEGAN
========================================= */
.hero-elegant {
    padding: 180px 0 140px !important; 
    background: linear-gradient(135deg, #0B1727 0%, #113C96 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

/* Wave SVG di bawah hero */
.hero-elegant::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 120px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1440 120" xmlns="http://www.w3.org/2000/svg"><path d="M0,64L80,69.3C160,75,320,85,480,80C640,75,800,53,960,48C1120,43,1280,53,1360,58.7L1440,64L1440,120L1360,120C1280,120,1120,120,960,120C800,120,640,120,480,120C320,120,160,120,80,120L0,120Z" fill="%23F9FAFB"/></svg>') no-repeat bottom;
    background-size: 100% 120px;
    z-index: 1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.hero-text { flex: 1; max-width: 600px; }
.hero-text h1 { font-size: 2.8rem; font-weight: 800; line-height: 1.25; margin-bottom: 20px; text-transform: uppercase; letter-spacing: -0.5px; }
.hero-text p { font-size: 1.1rem; color: #E2E8F0; margin-bottom: 35px; line-height: 1.6; }

.btn-primary-glow {
    display: inline-flex; align-items: center; gap: 10px; background-color: #06B6D4; color: #ffffff !important;
    padding: 14px 32px; border-radius: 50px; text-decoration: none; font-weight: 700; transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4); border: none;
}
.btn-primary-glow:hover { background-color: #0891B2; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(6, 182, 212, 0.6); }

.hero-image { flex: 1; display: flex; justify-content: center; }
.mockup-placeholder {
    width: 100%; max-width: 450px; aspect-ratio: 4/3; background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 16px; display: flex; align-items: center;
    justify-content: center; font-size: 5rem; color: rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* =========================================
   KATALOG PRODUK DIGITAL
========================================= */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; margin-top: 40px; position: relative; z-index: 5;}
.catalog-card { background: #ffffff; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.04); border: 1px solid #f1f5f9; transition: all 0.3s ease; display: flex; flex-direction: column; }
.catalog-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,0.08); }
.catalog-img { height: 200px; background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%); display: flex; align-items: center; justify-content: center; font-size: 4rem; color: var(--primary-color); }

.catalog-body { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.catalog-body h3 { font-size: 1.3rem; color: #0F172A; margin-bottom: 10px; font-weight: 700; }
.catalog-body p { color: #64748B; font-size: 0.95rem; line-height: 1.5; margin-bottom: 25px; flex: 1; }

.catalog-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
.catalog-actions:has(.btn-buy) { grid-template-columns: 1fr 1fr; }
.catalog-actions a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: all 0.2s; }

.btn-demo { background-color: var(--primary-color); color: #ffffff !important; }
.btn-demo:hover { background-color: #1545B3; }
.btn-buy { background-color: transparent; color: var(--primary-color) !important; border: 1.5px solid var(--primary-color); }
.btn-buy:hover { background-color: #EFF6FF; }
.btn-download { background: linear-gradient(90deg, #06B6D4 0%, #0EA5E9 100%); color: #ffffff !important; grid-column: 1 / -1; }
.btn-download:hover { opacity: 0.9; box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3); }

/* =========================================
   FOOTER
========================================= */
.public-footer { background-color: #0B1727; color: #9CA3AF; text-align: center; padding: 40px 0; margin-top: auto; border-top: 1px solid rgba(255,255,255,0.1);}

/* =========================================
   RESPONSIVE LANDING PAGE (MOBILE)
========================================= */
.bottom-nav-public { display: none; }
.bottom-sheet-overlay { display: none; }

@media (max-width: 768px) {
    .public-header .nav-menu { display: none; }
    .public-header .logo { margin: 0 auto; text-align: center; width: 100%; color: #fff !important; justify-content: center;}
    .public-main { padding-bottom: 80px; }
    
    .hero-elegant { padding: 120px 20px 80px !important; }
    .hero-content { flex-direction: column; text-align: center; }
    .hero-text h1 { font-size: 2.2rem; }
    
    .bottom-nav-public {
        display: flex; position: fixed; bottom: 0; left: 0; width: 100%;
        background-color: #ffffff; justify-content: space-around;
        padding: 10px 0 15px; box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
        z-index: 1000; border-radius: 20px 20px 0 0;
    }
    .bottom-nav-public a {
        display: flex; flex-direction: column; align-items: center;
        text-decoration: none; color: #94a3b8; font-size: 11px; font-weight: 600; gap: 5px;
        transition: 0.3s;
    }
    .bottom-nav-public a i { font-size: 1.2rem; }
    .bottom-nav-public a.active, .bottom-nav-public a:hover { color: var(--primary-color); }

    .bottom-sheet-overlay {
        display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
        background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(2px);
        z-index: 2000; opacity: 0; visibility: hidden; transition: all 0.3s ease;
    }
    .bottom-sheet-overlay.active { opacity: 1; visibility: visible; }
    .bottom-sheet-content {
        position: absolute; bottom: -100%; left: 0; width: 100%;
        background: #ffffff; border-radius: 24px 24px 0 0; padding: 25px;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
    }
    .bottom-sheet-overlay.active .bottom-sheet-content { bottom: 0; }
    .sheet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
    .sheet-header h3 { font-size: 1.2rem; color: #0f172a; margin: 0; }
    .sheet-header button { background: #f1f5f9; border: none; width: 32px; height: 32px; border-radius: 50%; color: #64748b; cursor: pointer; display: flex; align-items: center; justify-content: center;}
    .sheet-links { display: flex; flex-direction: column; gap: 12px; }
    .sheet-links a { text-decoration: none; color: #334155; font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 15px; padding: 12px; border-radius: 12px; background: #f8fafc; transition: 0.2s;}
    .sheet-links a i { color: var(--primary-color); font-size: 1.2rem; width: 24px; text-align: center;}
    .sheet-links a:active { background: #eff6ff; }
}

/* =========================================
   BLOG STYLING
========================================= */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.blog-card { background: #fff; border-radius: 12px; padding: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.06); }
.blog-meta { display: flex; justify-content: space-between; font-size: 0.85rem; color: #64748b; margin-bottom: 12px; }
.blog-category { background: #EFF6FF; color: var(--primary-color); padding: 4px 12px; border-radius: 20px; font-weight: 600; }
.blog-title { font-size: 1.2rem; margin-bottom: 10px; line-height: 1.4; }
.blog-title a { text-decoration: none; color: #0f172a; transition: color 0.2s; }
.blog-title a:hover { color: var(--primary-color); }
.blog-excerpt { color: #64748b; font-size: 0.95rem; line-height: 1.6; margin-bottom: 15px; }
.read-more { font-weight: 600; color: var(--primary-color); text-decoration: none; font-size: 0.9rem; }
.post-header { margin-bottom: 30px; }
.back-link { text-decoration: none; color: #64748b; font-weight: 500; margin-bottom: 20px; display: inline-block; }
.back-link:hover { color: var(--primary-color); }
.post-title { font-size: 2.2rem; color: #0f172a; margin: 15px 0; line-height: 1.2; }
.post-meta { display: flex; gap: 20px; color: #64748b; font-size: 0.95rem; border-top: 1px solid #e2e8f0; padding-top: 15px; }
.post-content { font-size: 1.1rem; line-height: 1.8; color: #334155; }
.post-content h2, .post-content h3 { margin-top: 30px; color: #0f172a; }
.post-content code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 0.9rem; }
.blog-thumbnail { width: 100%; height: 200px; overflow: hidden; border-radius: 8px; margin-bottom: 15px; background: #f1f5f9; }
.blog-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.blog-card:hover .blog-thumbnail img { transform: scale(1.03); }
.blog-thumbnail.placeholder { display: flex; align-items: center; justify-content: center; font-size: 3rem; color: #cbd5e1; }

@media (max-width: 600px) {
    .post-title { font-size: 1.8rem; }
    .post-meta { flex-direction: column; gap: 5px; }
}

/* Admin Table & Form Styling */
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.admin-table th, .admin-table td { padding: 15px 20px; text-align: left; border-bottom: 1px solid #f1f5f9; }
.admin-table th { background: #f8fafc; font-weight: 600; color: #475569; }
.admin-table tbody tr:hover { background: #f8fafc; }
.status-badge { padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.status-draft { background: #fef3c7; color: #d97706; }
.status-published { background: #d1fae5; color: #059669; }
.action-btns a { margin-right: 10px; text-decoration: none; font-size: 1.1rem; }
.btn-edit { color: #3b82f6; }
.btn-delete { color: #ef4444; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 8px; color: #475569; }
.form-control { width: 100%; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 8px; font-family: inherit; font-size: 1rem; }
.form-control:focus { border-color: var(--primary-color); outline: none; box-shadow: 0 0 0 3px rgba(26,86,219,0.1); }

@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .admin-table { font-size: 0.85rem; }
    .admin-table th, .admin-table td { padding: 10px; }
}