/* ==========================================================================
   NEW UI/UX DESIGN SYSTEM (Slate & Deep Indigo Theme)
   Kebijakan AdSense Friendly: Kontras tinggi, Tata Letak Jelas, Tanpa Element Tumpang Tindih
   ========================================================================== */

:root {
    /* Colors */
    --bg-main: #f8fafc;        /* Slate 50 */
    --bg-card: #ffffff;        /* Putih bersih */
    --bg-sidebar: #0f172a;     /* Slate 900 */
    --text-main: #0f172a;      /* Slate 900 */
    --text-muted: #475569;     /* Slate 600 */
    --border-color: #e2e8f0;   /* Slate 200 */
    
    /* Brand Accents */
    --primary: #3b82f6;        /* Blue 500 */
    --primary-hover: #1d4ed8;  /* Blue 700 */
    --pro-color: #f59e0b;      /* Amber 500 */
    --pro-accent: #fef3c7;     /* Amber 100 */
    
    /* Layout Dimensions */
    --topbar-height: 65px;
    --sidebar-width: 260px;
    --radius-lg: 12px;
    --radius-md: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   TYPOGRAPHY & ELEMENTS
   ========================================================================== */

h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

input[type="text"],
input[type="url"],
input[type="password"],
select {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-main);
    background-color: #ffffff;
    transition: all 0.2s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* BUTTONS */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

.btn-outline {
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

/* BADGES */
.badge-free, .badge-pro {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.05em;
}

.badge-free {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-pro {
    background: var(--pro-accent);
    color: #b45309;
}

#planBadge {
    background: rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

/* ==========================================================================
   STICKY TOPBAR & USER PROFILE AREA
   ========================================================================== */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: var(--topbar-height);
    background: var(--bg-card);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

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

.topbar-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--bg-sidebar);
    letter-spacing: -0.03em;
}

.topbar-logo span {
    color: var(--primary);
}

.topbar-right {
    display: flex;
    align-items: center;
}

.user-profile-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

/* ==========================================================================
   APP LAYOUT SECTION
   ========================================================================== */

.app-layout {
    display: flex;
    min-height: calc(100vh - var(--topbar-height));
}

/* STICKY SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: #f8fafc;
    padding: 32px 20px;
    flex-shrink: 0;
    position: sticky;
    top: var(--topbar-height);
    height: calc(100vh - var(--topbar-height));
    overflow-y: auto;
    z-index: 90;
    border-right: 1px solid #1e293b;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-nav a {
    color: #94a3b8;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover, 
.sidebar-nav a.active {
    background: #1e293b;
    color: #ffffff;
}

.sidebar-nav hr {
    border: none;
    border-top: 1px solid #334155;
    margin: 20px 0;
    opacity: 0.5;
}

.sidebar-plan {
    margin-top: 10px;
    padding: 0 14px;
}

.admin-link {
    background: #7f1d1d !important;
    color: #fca5a5 !important;
    text-align: center;
    font-weight: 600;
    margin-top: 10px;
    border: 1px solid #b91c1c;
}

.admin-link:hover {
    background: #991b1b !important;
}

/* MAIN CONTENT AREA */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
    min-width: 0;
}

/* HERO SECTION */
.hero {
    text-align: left;
    padding: 40px 40px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.hero h1 span {
    color: var(--primary);
    background: #eff6ff;
    padding: 2px 10px;
    border-radius: var(--radius-md);
}

.hero p {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 700px;
}

/* BUILDER WRAPPER GRID */
.builder-wrapper {
    padding: 40px;
}

.builder-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.free-section,
.pro-section {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.section-header h3 {
    font-size: 18px;
    font-weight: 700;
}

/* PREVIEW ICON BOX */
.preview-box {
    margin-top: 10px;
}
#iconPreview {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* PREMIUM BLUR OVERLAY */
.locked-pro {
    position: relative;
}

.pro-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    border-radius: var(--radius-lg);
    padding: 24px;
}

.pro-overlay-content {
    text-align: center;
    max-width: 340px;
    background: #ffffff;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid #fde68a;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.pro-overlay-content h3 {
    color: #b45309;
    font-size: 18px;
    margin-bottom: 8px;
}

.pro-overlay-content p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.pro-overlay-content ul {
    text-align: left;
    list-style: none;
    font-size: 13px;
    color: var(--text-main);
}

.pro-overlay-content li {
    margin: 6px 0;
    font-weight: 500;
}

.locked-pro input,
.locked-pro button,
.locked-pro select {
    pointer-events: none;
}

.pro-section h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.feature-card-pro {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 20px;
}

.feature-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.feature-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.custom-checkbox {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    cursor: pointer;
}

.custom-checkbox input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
}

.keystore-fields {
    margin-top: 12px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    top: calc(50% - 8px);
    right: 12px;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
}

/* FORM SUBMIT ACTIONS */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-submit-free {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit-free:hover {
    background: var(--primary-hover);
}

.btn-pro-locked {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 16px;
    font-weight: 700;
    cursor: not-allowed;
}

.btn-pro {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(180, 83, 9, 0.2);
}

/* ==========================================================================
   PROGRESS CARD
   ========================================================================== */

.build-card {
    background: var(--bg-card);
    margin-top: 24px;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.build-card-header {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.build-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
}

.build-row span {
    color: var(--text-muted);
}

.progress {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 12px;
}

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

#progressText {
    text-align: center;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer-simple {
    border-top: 1px solid var(--border-color);
    padding: 32px 24px;
    text-align: center;
    background: var(--bg-card);
    margin-top: auto;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 12px;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-copy {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 12px;
}

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE HIDING RULE
   ========================================================================== */

@media (max-width: 1024px) {
    .builder-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .hero {
        padding: 32px 24px;
    }
    .builder-wrapper {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    /* MODIFIKASI TERBARU: Sembunyikan Nama Pengguna pada Mode HP */
    .user-name {
        display: none !important;
    }
    
    .user-profile-area {
        gap: 8px; /* Mengurangi jarak margin karena hanya ada foto profil & tombol logout */
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--border-color);
        background: #ffffff;
        color: var(--text-main);
        width: 38px;
        height: 38px;
        border-radius: var(--radius-md);
        font-size: 16px;
        cursor: pointer;
    }

    .menu-toggle:hover {
        background: #f1f5f9;
    }

    .topbar {
        padding: 0 16px;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: var(--topbar-height);
        height: calc(100vh - var(--topbar-height));
        width: 260px;
        z-index: 1001;
        transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 25px -5px rgba(0, 0, 0, 0.1);
    }

    .sidebar.show {
        left: 0;
    }

    .hero h1 {
        font-size: 28px;
    }
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 26px;
    }
    .topbar-logo {
        font-size: 18px;
    }
    /* Mengurangi ukuran padding tombol logout di layar sangat kecil agar space efisien */
    .user-profile-area .btn-outline {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* =======================================
   PRICING PAGE STYLES 
   ======================================= */
.pricing-page{
    max-width:1200px;
    margin:auto;
}

.service-card{
    background:#0f172a;
    color:white;
    padding:30px;
    border-radius:20px;
    margin-bottom:30px;
    text-align:center;
}

.service-title{
    font-size:28px;
    font-weight:700;
    margin-bottom:15px;
}

.service-price{
    margin-top:20px;
    font-size:40px;
    font-weight:800;
    color:#22c55e;
}

.pricing-grid{
    display:grid;
    grid-template-columns: repeat(3,1fr);
    gap:25px;
}

.pricing-card{
    background:#fff;
    border-radius:20px;
    padding:30px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

.member-card{
    border:3px solid #2563eb;
}

.lifetime-card{
    border:3px solid #16a34a;
}

.plan-name{
    font-size:24px;
    font-weight:700;
    margin-bottom:10px;
}

.plan-price{
    font-size:38px;
    font-weight:800;
    margin-bottom:10px;
}

.plan-period{
    color:#64748b;
    margin-bottom:20px;
}

.feature-list{
    list-style:none;
    padding:0;
    margin:20px 0;
}

.feature-list li{
    margin-bottom:12px;
}

.pricing-btn{
    display:block;
    text-align:center;
    background:#2563eb;
    color:white;
    text-decoration:none;
    padding:14px;
    border-radius:12px;
    font-weight:600;
}

.active-plan{
    background:#16a34a !important;
    pointer-events:none;
    opacity:.8;
}

@media(max-width:768px){
    .pricing-grid{
        grid-template-columns:1fr;
    }
}

/* =======================================
   CONTACT PAGE STYLES 
   ======================================= */
.contact-page{
    max-width:700px;
    margin:auto;
}

.contact-card{
    background:#fff;
    padding:30px;
    border-radius:20px;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
}

.contact-card h2{
    margin-bottom:10px;
}

.contact-card p{
    color:#64748b;
    margin-bottom:20px;
}

.contact-card input,
.contact-card textarea{
    width:100%;
    padding:14px;
    margin-bottom:15px;
    border:1px solid #cbd5e1;
    border-radius:12px;
    box-sizing: border-box; /* Agar padding tidak merusak lebar input */
}

.contact-btn{
    width:100%;
    background:#2563eb;
    color:white;
    border:none;
    padding:14px;
    border-radius:12px;
    font-weight:600;
    cursor:pointer;
}

.contact-divider{
    text-align:center;
    margin:20px 0;
    color:#64748b;
}

.wa-btn{
    display:block;
    text-align:center;
    background:#22c55e;
    color:white;
    text-decoration:none;
    padding:14px;
    border-radius:12px;
    font-weight:600;
}

.active-plan{

    background:#16a34a !important;

    color:white !important;

    opacity:.9;

    pointer-events:none;
}

.disabled-plan{

    background:#94a3b8 !important;

    color:white !important;

    pointer-events:none;
}

.build-tasks{
    margin-top:15px;
    background:#fff;
    border-radius:12px;
    border:1px solid #e5e7eb;
}

.build-tasks-header{
    padding:12px;
    font-weight:700;
    border-bottom:1px solid #e5e7eb;
}

.task-list{
    max-height:220px;
    overflow-y:auto;
    padding:12px;
}

.features-section {
            padding: 40px 20px;
            background-color: #f9f9f9;
            margin-top: 40px;
            border-top: 1px solid #eee;
        }
        .features-title {
            text-align: center;
            font-size: 24px;
            margin-bottom: 30px;
            color: #333;
            font-weight: bold;
        }
        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            max-width: 1200px;
            margin: 0 auto;
        }
        .feature-card {
            background: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            border: 1px solid #eee;
            transition: transform 0.2s;
        }
        .feature-card:hover {
            transform: translateY(-5px);
        }
        .feature-card h3 {
            font-size: 18px;
            color: #0070f3;
            margin-top: 0;
            margin-bottom: 10px;
        }
        .feature-card p {
            font-size: 14px;
            color: #666;
            line-height: 1.5;
            margin: 0;
        }

        /* Reset & Smooth Scroll hanya untuk elemen penampung utama jika diperlukan */
html {
    scroll-behavior: smooth;
}

/* Memastikan konten Disclaimer rapi di dalam layout dashboard */
.main-content .container {
    max-width: 960px;
    margin: 20px auto 40px auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .05);
}

/* Breadcrumb styling */
.main-content .breadcrumb {
    margin-bottom: 18px;
    font-size: 14px;
    color: #666;
}
.main-content .breadcrumb a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
}
.main-content .breadcrumb a:hover {
    text-decoration: underline;
}

/* Typography untuk halaman Disclaimer */
.main-content h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: #1e293b;
    line-height: 1.2;
}
.main-content .updated {
    color: #64748b;
    margin-bottom: 25px;
    font-size: 14px;
    font-style: italic;
}
.main-content h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: #1e293b;
    padding-bottom: 6px;
}
.main-content p {
    margin-bottom: 16px;
    color: #334155;
    line-height: 1.7;
}

/* Table of Contents (TOC) Modern */
details.toc {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    margin: 30px 0;
    overflow: hidden;
    transition: all 0.3s ease;
}
details.toc summary {
    padding: 16px 18px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    list-style: none;
    user-select: none;
    color: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
details.toc summary::-webkit-details-marker {
    display: none;
}
details.toc summary::after {
    content: "▼";
    font-size: 12px;
    color: #64748b;
}
details.toc[open] summary::after {
    content: "▲";
}
details.toc ol {
    padding: 0 30px 20px 40px;
}
details.toc li {
    margin: 10px 0;
    color: #334155;
}
details.toc a {
    text-decoration: none;
    color: #2563eb;
}
details.toc a:hover {
    text-decoration: underline;
}

/* Section & List konten */
.main-content section {
    margin: 40px 0;
    scroll-margin-top: 80px; /* Mencegah judul tertutup header topbar saat diklik dari TOC */
}
.main-content ul {
    margin-left: 24px;
    margin-bottom: 16px;
}
.main-content ul li {
    margin-bottom: 8px;
    color: #334155;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .main-content .container {
        margin: 10px;
        padding: 24px;
    }
    .main-content h1 {
        font-size: 1.8rem;
    }
    details.toc ol {
        padding: 0 20px 20px 30px;
    }
}

details.toc{
    border:1px solid #ddd;
    border-radius:12px;
    background:#fff;
    margin:30px 0;
    transition:.3s;
}

details.toc summary{
    padding:16px 20px;
    cursor:pointer;
    font-size:18px;
    font-weight:600;
    list-style:none;
    user-select:none;
}

details.toc summary::-webkit-details-marker{
    display:none;
}

details.toc summary::after{
    content:"▼";
    float:right;
    transition:transform .25s ease;
}

details.toc[open] summary::after{
    transform:rotate(180deg);
}