/* Golink Pro - Refined Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Soothing Dark Theme (Teduh Gelap) */
    --primary: #0ea5e9;
    --primary-glow: rgba(14, 165, 233, 0.3);
    --bg: #0b0f1a;
    --card-bg: rgba(22, 29, 45, 0.7);
    --text: #ffffff;
    --text-dim: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --glass: blur(25px) saturate(180%);
    --glass-border: rgba(255, 255, 255, 0.12);
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --glow-primary: 0 0 20px rgba(14, 165, 233, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --input-bg: rgba(0, 0, 0, 0.4);
    --sidebar-bg: rgba(22, 29, 45, 0.7);
}

.premium-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.premium-card:hover {
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

.glow-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.glow-btn:hover {
    box-shadow: var(--glow-primary);
    transform: translateY(-2px);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

body.light-mode {
    /* Soothing Light Theme (Teduh Terang) */
    --bg: #f2f5f8;
    --card-bg: #ffffff;
    --text: #1a202c;
    --text-dim: #4a5568;
    --border: rgba(0, 0, 0, 0.1);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.05);
    --primary-glow: rgba(14, 165, 233, 0.15);
    --input-bg: #ffffff;
    --sidebar-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Hide Scrollbars but keep functionality (Strict) */
::-webkit-scrollbar, *::-webkit-scrollbar {
    display: none !important;
}

* {
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;  /* Firefox */
}

.table-scroll-container::-webkit-scrollbar {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
}

.table-scroll-container {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* Exempt modal scroll containers and cards to make scrollbars visible and draggable */
.confirm-card::-webkit-scrollbar,
.modal-card::-webkit-scrollbar,
.crypto-modal::-webkit-scrollbar {
    display: block !important;
    height: 8px !important;
    width: 8px !important;
}

.confirm-card,
.modal-card,
.crypto-modal {
    -ms-overflow-style: auto !important;
    scrollbar-width: thin !important;
}

.confirm-card::-webkit-scrollbar-track,
.modal-card::-webkit-scrollbar-track,
.crypto-modal::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.65) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.confirm-card::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb,
.crypto-modal::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.55) !important; /* Premium Indigo */
    border-radius: 8px !important;
    border: 2px solid rgba(15, 23, 42, 0.8) !important;
    transition: background 0.3s ease !important;
}

.confirm-card::-webkit-scrollbar-thumb:hover,
.modal-card::-webkit-scrollbar-thumb:hover,
.crypto-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(129, 140, 248, 0.85) !important;
    cursor: pointer !important;
}

/* Firefox Support & Global Smooth Scroll */
* {
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch;
}

html {
    background: var(--bg);
}

/* Prevent SweetAlert2 from altering html height and causing layout shifting */
html.swal2-height-auto {
    height: 100% !important;
}

/* Prevent SweetAlert2 from adding padding-right to body and html */
body.swal2-shown,
body.swal2-toast-shown,
html.swal2-shown,
html.swal2-toast-shown {
    padding-right: 0 !important;
    margin-right: 0 !important;
}

/* Custom Premium SweetAlert2 Styling to match Golinks Pro theme */
.swal2-container {
    backdrop-filter: blur(8px);
    background: rgba(4, 6, 12, 0.7) !important;
    z-index: 999999 !important;
}

.swal2-popup {
    background: var(--card-bg) !important;
    backdrop-filter: var(--glass) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: 20px !important;
    box-shadow: var(--card-shadow), 0 0 30px rgba(0, 0, 0, 0.4) !important;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    padding: 30px 24px !important;
}

.swal2-title {
    color: var(--text) !important;
    font-weight: 700 !important;
    font-size: 22px !important;
    margin-top: 15px !important;
}

.swal2-html-container {
    color: var(--text-dim) !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin: 15px 0 0 !important;
}

/* Icons styling */
.swal2-icon {
    border-width: 3px !important;
    margin-top: 10px !important;
}
.swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}
.swal2-icon.swal2-success {
    border-color: #10b981 !important;
    color: #10b981 !important;
}
.swal2-icon.swal2-error {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}
.swal2-icon.swal2-info {
    border-color: #0ea5e9 !important;
    color: #0ea5e9 !important;
}

/* Buttons styling */
.swal2-actions {
    margin-top: 25px !important;
    gap: 12px !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 12px 28px !important;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3) !important;
    transition: var(--transition) !important;
    border: none !important;
}
.swal2-confirm:hover {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5) !important;
    transform: translateY(-2px) !important;
}
.swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.4) !important;
}

.swal2-cancel {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-dim) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 12px 28px !important;
    transition: var(--transition) !important;
}
.swal2-cancel:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text) !important;
    transform: translateY(-2px) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}
.swal2-cancel:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
}

/* Toasts custom styling */
.swal2-popup.swal2-toast {
    background: var(--card-bg) !important;
    backdrop-filter: var(--glass) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    padding: 12px 20px !important;
    border-radius: 12px !important;
}
.swal2-popup.swal2-toast .swal2-title {
    color: var(--text) !important;
    font-size: 14px !important;
    margin-top: 0 !important;
}
.swal2-popup.swal2-toast .swal2-html-container {
    color: var(--text-dim) !important;
    font-size: 12px !important;
    margin: 5px 0 0 !important;
}
.swal2-popup.swal2-toast .swal2-icon {
    margin-top: 0 !important;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

.main-sidebar {
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: var(--glass);
    border-right: 1px solid var(--border);
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    z-index: 1001;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.main-sidebar.collapsed {
    width: 80px;
}

.sidebar-logo {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 25px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.logo-text-group {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
}

.logo-text small {
    color: var(--primary);
}

.logo-version {
    font-size: 9px;
    opacity: 0.4;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}

.main-sidebar.collapsed .sidebar-logo {
    padding: 15px 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    border-bottom: none !important;
}

.main-sidebar.collapsed .logo-wrapper {
    justify-content: center !important;
    gap: 0 !important;
}

.main-sidebar.collapsed .logo-text-group {
    display: none !important;
}

.main-sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px 0;
    margin: 4px 15px;
    gap: 0;
}

.main-sidebar.collapsed .nav-item i {
    margin: 0;
    width: auto;
}

.main-sidebar.collapsed .nav-item:hover {
    transform: none;
}

.main-sidebar.collapsed .logo-img {
    margin: 0 auto !important;
}

.main-sidebar.collapsed .sidebar-footer {
    padding: 15px 10px !important;
    align-items: center !important;
}

.main-sidebar.collapsed .sidebar-footer button span {
    display: none !important;
}

.main-sidebar.collapsed .sidebar-footer button {
    padding: 12px 0 !important;
    width: 50px !important;
    margin: 0 auto !important;
    justify-content: center !important;
}

.main-sidebar.collapsed .sidebar-footer button i {
    margin: 0 !important;
    font-size: 16px !important;
}

.main-sidebar.collapsed .logo-text,
.main-sidebar.collapsed .nav-item span,
.main-sidebar.collapsed .logout-item span,
.main-sidebar.collapsed .profile-card-mini {
    display: none !important;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    margin: 4px 12px;
    border-radius: 14px;
    color: var(--text-dim);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    font-weight: 600;
    border-left: 4px solid transparent;
}

.nav-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.main-sidebar.collapsed .btn-download-sidebar span {
    display: none !important;
}

.main-sidebar.collapsed .btn-download-sidebar i {
    margin-right: 0 !important;
}

body.light-mode .nav-item:hover i {
    color: var(--primary) !important;
}

.nav-item.active {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary) !important;
    border-left: 4px solid var(--primary);
}

.nav-item.active i {
    color: white !important;
}

body.light-mode .log-content {
    background: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
}

body.light-mode .log-system {
    color: #94a3b8;
}

.main-sidebar.collapsed .nav-item {
    justify-content: center;
    margin: 8px auto;
    padding: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.nav-item i {
    font-size: 18px;
    width: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px 0;
    display: flex;
    justify-content: center;
}

.logout-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transition: all 0.3s;
    margin: 0 auto;
}

.main-sidebar:not(.collapsed) .logout-item {
    width: calc(100% - 30px);
    border-radius: 14px;
    justify-content: flex-start;
    padding: 0 20px;
    gap: 15px;
    margin: 0 15px;
}

/* Sidebar Toggle Button */
#sidebar-toggle {
    position: fixed;
    left: 235px;
    top: 22px;
    z-index: 10001;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

#sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.main-sidebar.collapsed ~ #sidebar-toggle {
    left: 24px;
}

.main-content,
.main-content-wrapper {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: calc(100% - 280px);
    display: flex;
    flex-direction: column;
}

.main-sidebar.collapsed ~ .main-content,
.main-sidebar.collapsed ~ .main-content-wrapper {
    margin-left: 80px;
    width: calc(100% - 80px);
}

.sidebar-logo .logo-text {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(to right, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-logo .logo-text small {
    font-size: 10px;
    background: var(--primary);
    -webkit-text-fill-color: white;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 4px;
    vertical-align: middle;
}

.sidebar-nav-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
    flex: 1;
    padding: 0 15px;
    overflow-y: auto;
    overflow-x: hidden;
    align-items: stretch !important;
    justify-content: flex-start !important;
}



.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

/* Activity Log Panel */
.activity-log-panel {
    margin: 25px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.main-sidebar.collapsed .activity-log-panel {
    display: none;
}

.log-header {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.log-status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 12px #10b981;
}

.log-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
}

.log-header-actions {
    display: flex;
    gap: 12px;
}

.log-action-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 12px;
    transition: 0.3s;
}

.log-action-btn:hover {
    color: var(--primary);
}

.log-content {
    height: 180px;
    overflow-y: auto;
    padding: 15px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #cbd5e1;
}

.log-entry {
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    padding-bottom: 4px;
}

.log-system {
    color: #64748b;
    font-style: italic;
    opacity: 0.8;
}

.log-success {
    color: #10b981;
}

.log-error {
    color: #ef4444;
}

.log-warning {
    color: #f59e0b;
}

.log-process {
    color: #3b82f6;
}

.log-time {
    color: #64748b;
    font-size: 10px;
    margin-right: 8px;
    font-weight: 500;
}

.log-icon {
    margin-right: 8px;
    font-size: 10px;
    width: 12px;
    text-align: center;
}

.log-text {
    word-break: break-word;
}

.pulse-animation {
    animation: logPulse 0.5s ease;
}

@keyframes logPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1.2);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes logFadeIn {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Main Content Area */
.main-content-wrapper {
    flex: 1;
    margin-left: 230px;
    /* Matched to .main-sidebar width */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-bar {
    height: 60px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    backdrop-filter: var(--glass);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar-left h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    height: 100%;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 14px;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
}

.btn-login-fb {
    background: #1877f2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

.btn-login-fb:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

.btn-login-ads {
    background: #008080;
    /* Teal/Blue-green for Ads Manager distinction */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 128, 128, 0.3);
}

.btn-login-ads:hover {
    background: #006666;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 128, 128, 0.4);
}

.btn-login-fb i,
.btn-login-ads i {
    font-size: 16px;
}

body.light-mode .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #f59e0b;
    /* Golden Sun color */
}

.nav-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.nav-tab-btn.active {
    background: var(--primary-glow);
    color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

body.light-mode .nav-tab-btn:hover {
    background: rgba(0, 0, 0, 0.03);
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}



.logo-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lang-selector {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.lang-selector:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.lang-selector i {
    color: var(--primary);
}

.lang-selector select {
    background: transparent;
    border: none;
    color: var(--text);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    text-transform: uppercase;
}

select option {
    background-color: #161d2d !important;
    color: #ffffff !important;
}

body.light-mode select option {
    background-color: #ffffff !important;
    color: #1a202c !important;
}

.styled-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px !important;
}

/* Layout */
.app-container {
    max-width: 100%;
    margin: 0;
    padding: 15px 20px 30px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.main-section {
    width: 100%;
    animation: fadeIn 0.4s ease-out forwards;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 25px;
    align-items: stretch;
}

@media screen and (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar-config {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 90px;
    /* Aligned with preview top */
    height: calc(100vh - 110px);
    /* Same as preview height */
}

.form-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.form-card>.card-body,
.form-card>div:not(.group-header) {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Custom Scrollbar for Sidebar Config */
.sidebar-config::-webkit-scrollbar {
    width: 4px;
}

.sidebar-config::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-config::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.sidebar-config:hover::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.3);
}

.card {
    background: var(--card-bg);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: var(--transition);
}

/* Base Components */
.avatar-container {
    position: relative;
    flex-shrink: 0;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: 2px solid var(--primary);
    background: rgba(255, 255, 255, 0.05);
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #161d2d;
    z-index: 2;
}

.status-dot.connected {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.status-dot.disconnected {
    background: #ef4444;
}

.icon-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    background: transparent;
}

.sync-btn {
    background: rgba(14, 165, 233, 0.05);
    color: var(--primary);
}

.sync-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.logout-btn {
    background: rgba(239, 68, 68, 0.05);
    color: #ef4444;
}

.logout-btn:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Header Profile Styles */
.header-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.15);
    /* More solid background */
    padding: 6px 14px 6px 6px;
    border-radius: 50px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

body.light-mode .header-profile {
    background: rgba(0, 0, 0, 0.05);
}

.header-profile:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: var(--primary);
    transform: translateY(-1px);
}

body.light-mode .header-profile:hover {
    background: rgba(0, 0, 0, 0.08);
}

.header-profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-profile-text {
    display: flex;
    flex-direction: column;
}

.header-profile-text h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
    color: var(--text);
}

.header-profile-text p {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 2px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.2px;
}

.header-profile-actions {
    display: flex;
    gap: 6px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

.header-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 4px;
}

.avatar-container.small {
    width: 38px;
    height: 38px;
}

.icon-action-btn.small {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.icon-action-btn.small i {
    font-size: 11px;
}

.form-card {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Forms */
.input-group {
    margin-bottom: 0;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.group-header label {
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    margin-bottom: 0;
}

.mini-refresh-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mini-refresh-btn:hover {
    background: var(--primary-glow);
    transform: rotate(180deg);
}

.badge {
    background: rgba(14, 165, 233, 0.15);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

.styled-select,
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Darker for better contrast */
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    /* Slightly more padding */
    color: var(--text);
    font-size: 13px;
    /* Larger font */
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
}

.styled-select:hover,
.form-input:hover,
.form-textarea:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.form-textarea {
    height: 100px;
    resize: none;
}

.styled-select:focus,
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.group-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 10px;
    /* Increased from 8px */
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.form-group {
    margin-bottom: 22px;
    /* Add clear spacing between groups */
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 25px 0;
    /* Increased significantly from 8px */
    opacity: 0.5;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.compact {
    padding: 10px;
    font-size: 12px;
}

.toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.1);
    padding: 12px 15px;
    border-radius: 12px;
    margin-top: 10px;
}

.toggle-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
}

/* --- Toggle Switch Styling Refinement --- */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid var(--border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(22px);
    background-color: white;
}

body.light-mode .slider {
    background-color: #e2e8f0;
}

body.light-mode .slider:before {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Preview Section */
.preview-container {
    position: sticky;
    top: 90px;
    /* Aligned with top bar + spacing */
    height: fit-content;
    display: flex;
    flex-direction: column;
}

.preview-card {
    height: calc(100vh - 110px);
    /* Dynamic height based on viewport */
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
    background: var(--card-bg);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.preview-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-tools {
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 40px 24px;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: stretch;
    /* Custom Scrollbar Styling */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.preview-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.preview-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}

.preview-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.preview-scroll-area::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Smooth scrolling globally */
html, body {
    scroll-behavior: smooth;
}

.preview-top-bar h2 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.publish-btn {
    position: relative;
    background: linear-gradient(135deg, #1877f2, #0d6efd);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 35px;
    border-radius: 50px;
    /* Pill shape for modern look */
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 25px rgba(24, 119, 242, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    backdrop-filter: blur(5px);
}

.publish-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.25),
            transparent);
    transition: all 0.5s ease;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.publish-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 35px rgba(24, 119, 242, 0.5),
        0 0 20px rgba(24, 119, 242, 0.2);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.publish-btn:hover::after {
    animation: none;
    /* Disable auto shimmer on hover to let manual hover take over or just keep it */
    left: 100%;
    transition: 0.5s;
}

.publish-btn:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.4);
}

.publish-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.publish-btn:hover i {
    transform: translateX(4px);
}

.publish-btn:disabled {
    background: #334155;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: transparent;
    box-shadow: none;
    opacity: 0.6;
}

/* Facebook Mockup - Premium Refined */
.fb-mockup {
    background: #ffffff;
    border-radius: 12px;
    color: #1c1e21;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #dddfe2;
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    /* Center within the scroll area */
    flex-shrink: 0;
}

.tool-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ratio-pills {
    display: flex;
    gap: 8px;
}

.ratio-btn {
    flex: 1;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 16px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ratio-btn i {
    font-size: 20px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.ratio-btn span {
    font-size: 13px;
    font-weight: 700;
}

.ratio-btn small {
    font-size: 10px;
    opacity: 0.5;
    font-weight: 500;
}

.ratio-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.ratio-btn:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.ratio-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white !important;
    box-shadow: 0 8px 25px var(--primary-glow);
}

.ratio-btn.active i,
.ratio-btn.active small,
.ratio-btn.active span {
    opacity: 1;
    color: white !important;
}


.fb-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fb-user-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.fb-avatar-container {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f2f5;
    border: 1px solid #dddfe2;
    flex-shrink: 0;
}

.fb-title:empty,
.fb-desc:empty {
    display: none !important;
}

.fb-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fb-user-text h4 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.1;
    color: #050505;
    margin: 0;
}

.fb-user-text p {
    font-size: 12px;
    color: #65676b;
    margin: 1px 0 0 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fb-post-text {
    padding: 4px 16px 16px;
    font-size: 15px;
    line-height: 1.4;
    color: #050505;
}

.fb-media {
    position: relative;
    background: #f0f2f5;
    min-height: 300px;
    display: block;
    width: 100%;
    overflow: hidden;
    /* Removed transition on height to prevent jittery layout jumps */
}

.fb-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 750px;
    /* Increased to support Portrait 4:5 */
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
    image-rendering: -webkit-optimize-contrast;
}

/* Aspect Ratio Options */
.fb-img.landscape {
    aspect-ratio: 1.91 / 1;
}

.fb-img.square {
    aspect-ratio: 1 / 1;
}

.fb-img.portrait {
    aspect-ratio: 4 / 5;
}

.fb-img.dynamic {
    aspect-ratio: auto;
    object-fit: contain;
    background: #000;
}

/* If the image is extremely tall, we ensure it doesn't break the layout */
.fb-media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.fb-media:hover .fb-media-overlay {
    opacity: 1;
}

.btn-add-img {
    background: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1c1e21;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.fb-media:hover .btn-add-img {
    transform: translateY(0);
}

.fb-footer {
    background: #f0f2f5 !important;
    /* Memastikan background abu-abu tetap ada */
    padding: 12px 16px;
    display: flex !important;
    /* Memastikan footer tetap muncul */
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #dddfe2;
    min-height: 40px;
    /* Tinggi minimal agar domain terlihat */
}

.fb-meta-info {
    flex: 1;
    padding-right: 12px;
    overflow: hidden;
    display: block !important;
}

.fb-domain {
    display: block !important;
    /* Memastikan domain tidak ikut tersembunyi */
    font-size: 12px;
    color: #65676b;
    text-transform: uppercase;
}

.fb-title {
    font-size: 16px;
    font-weight: 600;
    margin-top: 2px;
    color: #050505;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-cta {
    background: #e4e6eb;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 700;
    color: #050505;
    font-size: 13px;
    cursor: default;
    white-space: nowrap;
    transition: background 0.2s;
}

.fb-actions {
    display: flex;
    padding: 4px 0;
    margin: 0 12px;
    border-top: 1px solid #dddfe2;
}

.fb-action-item {
    flex: 1;
    padding: 12px;
    text-align: center;
    color: #65676b;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.fb-action-item i {
    font-size: 18px;
}

.fb-action-item:hover {
    background: #f2f2f2;
}


/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-box {
    background: var(--card-bg);
    backdrop-filter: var(--glass);
    width: 90%;
    max-width: 540px;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--border);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 24px;
    color: var(--text-dim);
    cursor: pointer;
}

.modal-box h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #10b981;
}

.modal-box p {
    color: var(--text-dim);
    margin-bottom: 24px;
}

#html-output {
    width: 100%;
    height: 140px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    color: var(--primary);
    font-family: monospace;
    font-size: 13px;
    margin-bottom: 24px;
    resize: none;
}

.modal-btns {
    display: flex;
    gap: 16px;
}

.btn-modal {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
    border: 1px solid var(--border);
}

/* Toasts */
/* Animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spinning {
    animation: spin 1s linear infinite;
}

.toast-container {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 10000;
}

.toast {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    border-radius: 16px;
    min-width: 320px;
    margin-top: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: toastSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast-success { border-left: 4px solid #10b981; }
.toast-error { border-left: 4px solid #ef4444; }
.toast-warning { border-left: 4px solid #f59e0b; }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(50px) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

.toast-icon {
    font-size: 22px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.toast-success .toast-icon { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.toast-error .toast-icon { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.toast-warning .toast-icon { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }

.toast-content {
    display: flex;
    flex-direction: column;
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}

.toast-message {
    font-size: 12px;
    color: var(--text-dim);
    margin: 0;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.fade-out {
    animation: toastFadeOut 0.3s ease forwards;
}

@keyframes toastFadeOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Custom Confirm Modal */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass);
    width: 360px;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-overlay.active {
    opacity: 1;
}

.confirm-overlay.active .confirm-card {
    transform: scale(1);
}

.confirm-icon {
    width: 60px;
    height: 60px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px;
}

.confirm-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.confirm-card p {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 25px;
}

.confirm-btns {
    display: flex;
    gap: 12px;
}

.confirm-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.btn-no {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-yes {
    background: #ef4444;
    color: white;
}

.btn-yes-primary {
    background: var(--primary);
    color: white;
}

.confirm-btn:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

/* Activation Overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 30px;
    width: 420px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.auth-logo {
    width: 80px;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 15px var(--primary-glow));
}

.auth-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 32px;
}

.hwid-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: left;
}

.hwid-box label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-dim);
    display: block;
    margin-bottom: 4px;
}

.hwid-box code {
    font-family: monospace;
    color: var(--primary);
    font-size: 12px;
    word-break: break-all;
}

.auth-footer {
    margin-top: 32px;
    font-size: 13px;
    color: var(--text-dim);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Google Login Button Premium */
.google-login-btn {
    width: 100%;
    height: 52px;
    background: white;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.google-icon-img {
    width: 20px;
    height: 20px;
    display: block;
}

.google-login-btn span {
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.google-login-btn:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.google-login-btn:active {
    transform: translateY(0);
}

.btn-full-width {
    width: 100%;
    height: 52px;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
}

/* Responsive Design */
@media (max-width: 1100px) {
    .app-container {
        grid-template-columns: 1fr;
        padding: 0 20px;
        margin: 20px auto;
    }

    .sidebar {
        order: 2;
    }

    .preview-container {
        order: 1;
        position: static;
        margin-bottom: 40px;
    }
}

@media (max-width: 600px) {
    .nav-container {
        padding: 0 20px;
    }

    .logo-text {
        font-size: 20px;
    }

    .form-card {
        padding: 20px;
    }

    .fb-mockup {
        border-radius: 0;
        margin: 0 -20px;
        width: calc(100% + 40px);
        max-width: none;
    }
}

/* Toggle Switch Custom */
.switch input:checked+.slider {
    background-color: #ef4444 !important;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.switch input:checked+.slider:before {
    transform: translateX(22px);
}

.status-badge.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-badge.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-kill {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-kill:hover {
    background: #ef4444;
    color: white;
}

display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 20px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

/* sectionFadeIn merged into fadeIn above */

/* User Table Shared */
.user-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.user-table th {
    text-align: left;
    padding: 12px 20px;
    color: var(--text-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-table tr {
    background: rgba(0, 0, 0, 0.1);
    transition: 0.3s;
}

body.light-mode .user-table tr {
    background: #f8fafc;
}

.user-table tr:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.005);
}

.user-table td {
    padding: 18px 20px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.user-table td:first-child {
    border-left: 1px solid var(--border);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.user-table td:last-child {
    border-right: 1px solid var(--border);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}


/* --- Dashboard Layout Enhancement --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    width: 100%;
    align-items: center;
}

.sidebar-config {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding-right: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar-config::-webkit-scrollbar {
    display: none;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: var(--glass);
    transition: var(--transition);
}

.form-card {
    padding: 12px 15px 20px 15px !important;
    border-radius: 20px;
}

.input-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.styled-select,
input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.styled-select:focus,
input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
    border-color: var(--primary);
    background: rgba(14, 165, 233, 0.05);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.icon-action-btn,
.btn-refresh-icon {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    transition: 0.3s;
    font-size: 12px;
}

.icon-action-btn:hover {
    transform: rotate(180deg);
}

/* --- SMART IMAGE EDITOR PREMIUM STYLES --- */
.editor-container {
    background: var(--card-bg);
    border-radius: 20px !important;
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin: 20px;
}

.editor-main {
    background: #111 !important;
    border-radius: 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    margin: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.editor-main::-webkit-scrollbar {
    display: none;
}

.editor-sidebar {
    background: rgba(0, 0, 0, 0.2);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.editor-sidebar::-webkit-scrollbar {
    display: none;
}
    padding: 20px !important;
    border-left: 1px solid var(--border) !important;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.editor-sidebar::-webkit-scrollbar {
    display: none;
}

.editor-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
}

.tool-btn,
.filter-pill,
.ratio-pill,
.overlay-btn {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border) !important;
    transition: all 0.2s ease;
    color: var(--text-dim) !important;
}

.tool-btn:hover,
.filter-pill:hover,
.ratio-pill:hover,
.overlay-btn:hover {
    background: rgba(14, 165, 233, 0.1) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.tool-btn.active,
.filter-pill.active,
.ratio-pill.active,
.overlay-btn.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.collage-slot {
    background: #111 !important;
    border: 1px dashed rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease;
}

.collage-slot:hover {
    border-color: var(--primary) !important;
    background: rgba(14, 165, 233, 0.05) !important;
}

#editor-canvas {
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

.preview-container {
    background: transparent;
    border-radius: 0;
    padding: 20px;
    min-height: 600px;
    border: none;
}

.preview-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* Light Mode Overrides */
body.light-mode .styled-select,
body.light-mode input[type="text"],
body.light-mode textarea {
    background: #ffffff;
    border-color: #e2e8f0;
}

/* Animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spinning {
    animation: spin 1s linear infinite !important;
}

.fa-spin {
    animation: spin 1s linear infinite !important;
}

/* --- Notification / Toast Relocation (Center Bottom) --- */
#toast-container,
.toast-container,
.notification-area,
.toast-wrapper {
    position: fixed !important;
    bottom: 30px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    z-index: 10001 !important;
    gap: 10px !important;
}

/* Ensure individual toasts are centered */
.toast,
.notification,
.glass-toast {
    margin: 0 auto !important;
    right: auto !important;
    left: auto !important;
}

/* Log Animations */
@keyframes logPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1.2);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes logFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Activity Log */
@media (max-width: 768px) {
    #activity-log-panel {
        left: 20px !important;
        right: 20px !important;
        width: auto !important;
        bottom: 10px !important;
    }
}

@media (min-width: 769px) {
    #activity-log-panel {
        right: 20px !important;
        left: auto !important;
    }
}

/* Premium Execution Overlay */
.processing-loader {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.spinner-inner {
    position: absolute;
    width: 70%;
    height: 70%;
    border: 3px solid transparent;
    border-left-color: #00f2fe;
    border-right-color: #00f2fe;
    border-radius: 50%;
    animation: spin-reverse 1.5s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    0% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    max-width: 280px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0.3;
    transition: all 0.5s ease;
}

.step-item.active {
    opacity: 1;
    transform: translateX(5px);
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #475569;
    position: relative;
}

.step-item.active .step-dot {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.step-item.active span {
    color: white;
    font-weight: 600;
    font-size: 13px;
}

.step-item span {
    color: var(--text-dim);
    font-size: 12px;
}

.step-item.active .step-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Reporting Section Enhancements */
.report-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: var(--transition);
}

.report-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reporting-grid .card {
    animation: slideUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.reporting-grid .card:nth-child(2) {
    animation-delay: 0.1s;
}

.reporting-grid .card:nth-child(3) {
    animation-delay: 0.2s;
}

/* Dashboard Header Buttons Styling */
.dash-btn {
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    white-space: nowrap;
    text-transform: none;
    line-height: 1;
}

.dash-btn i {
    font-size: 15px;
}

.dash-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    border-color: var(--border);
}

.dash-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.dash-btn-purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.2);
}

.dash-btn-purple:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.15);
}

.dash-btn-green {
    background: #0f9d58;
    color: white;
    border: none;
}

.dash-btn-green:hover {
    background: #0d8a4d;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 157, 88, 0.3);
}

body.light-mode .dash-btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dim);
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .dash-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text);
}


/* Fix Layout Preview Facebook */
.fb-footer {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: #f0f2f5 !important;
    padding: 10px 12px !important;
}

.fb-meta-info {
    display: flex !important;
    flex-direction: column !important;
    /* Susun dari atas ke bawah */
    flex: 1 !important;
    overflow: hidden !important;
}

.fb-domain {
    display: block !important;
    font-size: 12px !important;
    color: #65676b !important;
    margin-bottom: 2px !important;
    text-transform: uppercase !important;
}

.fb-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #050505 !important;
    line-height: 1.2 !important;
}

.fb-desc {
    font-size: 14px !important;
    color: #65676b !important;
    margin-top: 2px !important;
}

/* --- ULTIMATE RESPONSIVE DESIGN PACK --- */

/* For Tablets and Small Laptops (under 1024px) */
@media screen and (max-width: 1024px) {
    .main-sidebar {
        width: 80px;
        padding: 20px 0;
    }

    .sidebar-logo .logo-text,
    .nav-item span,
    .activity-log-panel {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 15px;
    }

    .main-content-wrapper {
        margin-left: 80px;
    }

    /* Stack elements if in a grid */
    .generator-grid,
    .form-row,
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .sidebar-config {
        position: relative !important;
        top: 0 !important;
        max-height: none !important;
        padding-right: 0 !important;
    }
}

/* For Mobile Devices (under 768px) */
@media screen and (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .main-sidebar {
        width: 280px;
        height: 100vh;
        position: fixed;
        flex-direction: column;
        padding: 20px 0;
    }

    .sidebar-nav-list {
        flex-direction: column;
        overflow-y: auto;
        padding: 0 15px;
    }

    .nav-item {
        white-space: nowrap;
        padding: 12px 20px;
        width: 100%;
    }

    .main-content-wrapper {
        margin-left: 0 !important;
        padding: 15px !important;
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .generator-card,
    .form-card {
        padding: 15px;
    }

    .preview-container {
        position: relative !important;
        top: 0 !important;
        width: 100% !important;
        margin-top: 20px;
    }

    .preview-card {
        height: auto !important;
        min-height: 400px;
    }

    .fb-mockup {
        max-width: 100% !important;
        margin: 0 auto;
    }

    .app-container {
        padding: 15px !important;
        gap: 20px !important;
    }
}

/* --- BROWSER MOCKUP & INTERNAL FB UI --- */
.browser-mockup {
    background: #f0f2f5;
    border-radius: 20px;
    width: 100%;
    max-width: none;
    margin: 0;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.browser-header {
    background: #ffffff;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 30px;
    border-bottom: 1px solid #dddfe2;
    height: 70px;
}

.browser-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.browser-address-bar {
    flex: 1;
    background: #f0f2f5;
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 13px;
    color: #65676b;
    display: flex;
    align-items: center;
    gap: 12px;
}

.browser-content {
    display: grid;
    grid-template-columns: 96px 1fr;
    flex: 1;
    min-height: 650px;
    background: #f0f2f5;
}

.fb-internal-sidebar {
    background: #f0f2f5;
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-right: 1px solid #dddfe2;
}

/* Toolbar toggle rasio/tampilan (menggantikan sidebar FB palsu) */
.nav-icons-vertical {
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.fb-side-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    border-radius: 12px;
    color: #1c1e21;
    font-size: 16px;
    font-weight: 600;
    cursor: default;
    transition: all 0.2s ease;
}

.fb-side-item i {
    font-size: 28px;
    color: #1877f2;
}

.fb-side-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.fb-feed-container {
    background: #f0f2f5;
    padding: 20px 40px 60px;
    overflow-y: auto;
    flex: 1;
    height: auto;
    min-height: 650px;
    display: flex;
    flex-direction: column;
    align-items: center;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.fb-feed-container::-webkit-scrollbar {
    display: none;
}

.fb-internal-nav {
    display: flex;
    justify-content: center;
    padding: 15px 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #dddfe2;
    width: 100%;
}

.nav-icons {
    display: flex;
    gap: 20px;
}

.nav-icons i {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    color: #65676b;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-icons i:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.nav-icons i.active {
    background: #1877f2;
    color: white;
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
    transform: none;
}

/* Post alignment and refinement */
.fb-mockup {
    margin: 0 auto;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #dddfe2;
}

@media screen and (max-width: 768px) {
    .fb-internal-sidebar {
        display: none;
    }

    .browser-content {
        grid-template-columns: 1fr;
    }

    .browser-address-bar {
        display: none;
    }
}

/* --- NEW UI REFINEMENTS --- */
.version-badge {
    font-size: 10px;
    background: var(--primary);
    color: white;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.sidebar-logo .logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
}

/* -------------------------------------------------------------------------- */
/*                          RESPONSIVE DESIGN SYSTEM                          */
/* -------------------------------------------------------------------------- */

/* Large Tablets & Small Desktops (Below 1200px) */
@media screen and (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    .sidebar-config {
        position: static !important;
        height: auto !important;
        width: 100% !important;
    }

    .preview-container {
        width: 100% !important;
    }

    .admin-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Tablets (769px to 1024px) - Collapsed Sidebar State */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .main-sidebar {
        width: 80px !important;
    }

    .main-sidebar .logo-text,
    .main-sidebar .nav-item span,
    .main-sidebar .logout-item span,
    .main-sidebar .sidebar-logo .logo-text {
        display: none !important;
    }

    .main-sidebar .nav-item {
        justify-content: center;
        padding: 0;
        margin: 8px auto;
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }

    .main-sidebar .sidebar-logo {
        justify-content: center !important;
        padding: 20px 0 !important;
    }

    #sidebar-toggle {
        display: none;
    }

    .main-content,
    .main-content-wrapper {
        margin-left: 80px !important;
        width: calc(100% - 80px) !important;
    }

    .top-bar {
        padding: 0 15px !important;
    }

    .header-profile-text {
        display: none !important;
    }
}

/* Mobile Phones (Below 768px) */
@media screen and (max-width: 768px) {
    body {
        display: block !important;
    }

    .main-sidebar {
        transform: translateX(-100%);
        width: 280px !important;
        position: fixed !important;
        left: 0;
        top: 0;
        height: 100vh !important;
        z-index: 9999 !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
        background: rgba(15, 23, 42, 0.95) !important;
        backdrop-filter: blur(15px);
    }

    .main-sidebar.mobile-active {
        transform: translateX(0) !important;
    }

    .main-sidebar.mobile-active .logo-text,
    .main-sidebar.mobile-active .nav-item span,
    .main-sidebar.mobile-active .logout-item span,
    .main-sidebar.mobile-active .sidebar-logo .logo-text {
        display: block !important;
    }

    .main-sidebar.mobile-active .nav-item {
        display: flex !important;
        justify-content: flex-start !important;
        width: calc(100% - 30px) !important;
        height: 50px !important;
        border-radius: 14px !important;
        padding: 0 20px !important;
        margin: 4px 15px !important;
    }

    .main-sidebar.mobile-active .nav-item span,
    .main-sidebar.mobile-active .logout-item span {
        display: block !important;
    }

    .main-sidebar .sidebar-nav-list {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        padding: 0 15px !important;
        height: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    #sidebar-toggle {
        display: flex !important;
        position: fixed !important;
        left: 15px;
        top: 10px;
        z-index: 10001 !important;
        background: var(--primary) !important;
        color: white !important;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        box-shadow: 0 4px 15px var(--primary-glow);
        align-items: center;
        justify-content: center;
    }

    .main-content,
    .main-content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 20px !important;
    }

    .top-bar {
        position: relative !important;
        width: 100% !important;
        padding-left: 65px !important;
        margin-bottom: 20px !important;
        height: auto !important;
        min-height: 60px !important;
        flex-wrap: wrap;
        gap: 10px;
    }

    .top-bar-left {
        width: 100% !important;
    }

    .top-bar-left h2 {
        font-size: 16px !important;
    }

    .header-profile-actions,
    .header-divider {
        display: none !important;
    }

    .btn-login-fb span,
    .btn-login-ads span {
        display: none !important;
    }

    .btn-login-fb,
    .btn-login-ads {
        padding: 10px !important;
        width: 40px !important;
        height: 40px !important;
        justify-content: center !important;
    }

    .app-container {
        padding: 10px !important;
        gap: 20px !important;
    }

    .card {
        padding: 15px !important;
        border-radius: 16px !important;
    }

    .fb-mockup {
        transform: scale(0.95);
        transform-origin: top center;
        width: 100% !important;
        max-width: 100% !important;
    }

    .form-row {
        grid-template-columns: 1fr !important;
    }

    .reporting-grid {
        grid-template-columns: 1fr !important;
        padding: 10px !important;
    }

    .admin-grid {
        margin-bottom: 20px !important;
    }

    .stats-container {
        grid-template-columns: 1fr !important;
    }

    .user-table th:nth-child(3),
    .user-table td:nth-child(3),
    .user-table th:nth-child(4),
    .user-table td:nth-child(4) {
        display: none !important;
    }

    .tab-btn, .modern-tab-btn {
        padding: 10px 14px !important;
        font-size: 11px !important;
    }
}

/* ─── Modern Tab Buttons ─────────────────────────────────── */
.modern-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.modern-tab-btn i {
    font-size: 12px;
    transition: transform 0.25s ease;
}

.modern-tab-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modern-tab-btn:hover {
    border-color: rgba(14, 165, 233, 0.4);
    color: var(--text);
    transform: translateY(-1px);
    background: rgba(14, 165, 233, 0.06);
}

.modern-tab-btn:hover i {
    transform: scale(1.15);
}

.modern-tab-btn.active {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35), 0 0 0 1px rgba(14, 165, 233, 0.2);
    transform: translateY(-1px);
}

.modern-tab-btn.active i {
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.5));
}

/* Scraper-specific color (green) */
#scraper-tab-results.active,
#scraper-tab-analytics.active {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35), 0 0 0 1px rgba(16, 185, 129, 0.2);
}

/* Bulk Manager-specific color (amber) */
#bm-tab-fanspage.active,
#bm-tab-groups.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35), 0 0 0 1px rgba(245, 158, 11, 0.2);
}

body.light-mode .modern-tab-btn {
    background: rgba(0, 0, 0, 0.03);
    color: #64748b;
}

body.light-mode .modern-tab-btn:hover {
    background: rgba(14, 165, 233, 0.08);
    color: var(--primary);
}

/* --- DATE INPUT DARK MODE FIX --- */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    transform: scale(1.1);
}

body.light-mode input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0);
    opacity: 0.5;
}

/* Allow scrollbars inside modal tables to prevent clipping */
.modal-card .table-scroll-container::-webkit-scrollbar {
    display: block !important;
    height: 8px !important;
    width: 8px !important;
}

.modal-card .table-scroll-container::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4) !important;
    border-radius: 4px !important;
}

.modal-card .table-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4) !important;
    border-radius: 4px !important;
    border: 2px solid rgba(15, 23, 42, 0.8) !important;
}

.modal-card .table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(129, 140, 248, 0.7) !important;
}

.modal-card .table-scroll-container {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(99, 102, 241, 0.4) rgba(15, 23, 42, 0.4) !important;
    -ms-overflow-style: auto !important;
}

/* --- EXTRA RESPONSIVE OVERRIDES BY ANTIGRAVITY --- */

/* Pengaturan Grid Kolom Tengah (Visual Chart & Auto-Kill) */
.reports-middle-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    padding: 0 20px;
    margin-top: 0;
}

/* Pengaturan Desktop Lebar Minimal Tabel Campaign Monitor */
@media (min-width: 993px) {
    #ads-monitor-table {
        min-width: 1200px !important;
    }
}

@media (max-width: 1024px) {
    .reports-middle-grid {
        grid-template-columns: 1fr !important;
        padding: 0 15px !important;
    }
    
    /* Tabel pada mode tablet/layar sedang bergeser horizontal daripada tergencet */
    #ads-monitor-table:not(.card-mode) {
        min-width: 1300px !important;
    }
}

@media (max-width: 992px) {
    /* Sembunyikan label tindakan di card-view mobile agar tombol rapi di tengah */
    #ads-monitor-table td:last-child::before {
        display: none !important;
    }
    
    /* Alur Integrasi Tag Visual diatur vertikal */
    .flow-steps-container {
        flex-direction: column !important;
        align-items: center !important;
    }
    .flow-steps-container > div {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .flow-connector {
        transform: rotate(90deg) !important;
        margin: 15px 0 !important;
        min-height: 24px !important;
    }
}

/* Sidebar Split-layout Responsiveness */
.editor-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    height: 100%;
    align-items: start;
}

.scraper-manager-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    height: calc(100% - 55px);
    padding: 15px;
    box-sizing: border-box;
}

.friend-manager-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    height: 100%;
    padding: 15px;
    box-sizing: border-box;
}

.bm-fanspage-container {
    display: flex;
    gap: 20px;
    flex: 1;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.bm-fanspage-container > div.card:first-child {
    width: 350px;
}

@media (max-width: 992px) {
    .editor-grid,
    .scraper-manager-grid,
    .friend-manager-grid {
        grid-template-columns: 1fr !important;
        height: auto !important;
        overflow-y: auto !important;
    }
    
    .bm-fanspage-container {
        flex-direction: column !important;
        height: auto !important;
        overflow-y: auto !important;
    }
    .bm-fanspage-container > div.card:first-child {
        width: 100% !important;
    }
}

/* Mengizinkan tombol-tab dan navigasi menggulung (wrap) jika layar sempit */
.sub-tab-container,
.golinks-tab-nav {
    flex-wrap: wrap !important;
}

/* Show visual horizontal scrollbars on scrollable table containers */
.ads-table-scroll-container,
.table-scroll-container {
    -ms-overflow-style: auto !important; /* IE and Edge */
    scrollbar-width: thin !important; /* Firefox */
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(255, 255, 255, 0.02) !important; /* Firefox */
}

.ads-table-scroll-container::-webkit-scrollbar,
.table-scroll-container::-webkit-scrollbar {
    display: block !important;
    height: 8px !important;
    width: 8px !important;
}

.ads-table-scroll-container::-webkit-scrollbar-track,
.table-scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02) !important;
    border-radius: 4px !important;
}

.ads-table-scroll-container::-webkit-scrollbar-thumb,
.table-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 4px !important;
    border: 2px solid transparent !important;
}

.ads-table-scroll-container::-webkit-scrollbar-thumb:hover,
.table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary, #0ea5e9) !important;
}

/* Prevent controls inside the Campaign Monitor toolbar from wrapping/shrinking */
.campaign-monitor-controls > button,
.campaign-monitor-controls > div,
.campaign-monitor-controls > label {
    flex-shrink: 0 !important;
}




/* ─── Campaign Monitor toolbar (rapi & konsisten) ─── */
.campaign-monitor-controls .cm-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 10px;
    font-size: 13px; font-weight: 700; line-height: 1;
    cursor: pointer; white-space: nowrap; outline: none;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.campaign-monitor-controls .cm-btn:hover { background: rgba(255,255,255,0.08); }
.campaign-monitor-controls .cm-btn:active { transform: translateY(1px); }
.campaign-monitor-controls .cm-btn i { font-size: 13px; }
.campaign-monitor-controls .cm-btn-ghost i { color: var(--primary); }
.campaign-monitor-controls .cm-btn-primary {
    background: linear-gradient(135deg,#3b82f6,#2563eb);
    border-color: transparent; color: #fff;
    box-shadow: 0 2px 10px rgba(59,130,246,.25);
}
.campaign-monitor-controls .cm-btn-primary:hover { filter: brightness(1.07); background: linear-gradient(135deg,#3b82f6,#2563eb); }
.campaign-monitor-controls .cm-btn-accent {
    background: rgba(249,115,22,0.12);
    border-color: rgba(249,115,22,0.35);
    color: #fb923c;
}
.campaign-monitor-controls .cm-btn-accent:hover { background: rgba(249,115,22,0.20); }
.campaign-monitor-controls .cm-divider { width: 1px; height: 22px; background: var(--border); margin: 0 3px; }

.campaign-monitor-controls .cm-dropdown { position: relative; display: inline-block; }
.campaign-monitor-controls .cm-menu {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
    min-width: 210px; padding: 6px;
    background: var(--card-bg, #1e293b);
    border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.38);
}
.campaign-monitor-controls .cm-menu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px;
    font-size: 13px; font-weight: 600; color: var(--text);
    cursor: pointer; margin: 0;
}
.campaign-monitor-controls .cm-menu-item:hover { background: rgba(255,255,255,0.06); }
.campaign-monitor-controls .cm-menu-item i { width: 16px; text-align: center; font-size: 13px; }

/* ─── Campaign Monitor: grup aksi data tersegmen ─── */
.campaign-monitor-controls .cm-group {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px; border: 1px solid var(--border); border-radius: 12px;
    background: rgba(255,255,255,0.02);
}
.campaign-monitor-controls .cm-group .cm-btn {
    background: transparent; border-color: transparent;
}
.campaign-monitor-controls .cm-group .cm-btn:hover { background: rgba(255,255,255,0.07); }

/* ============================================================= */
/* SEMBUNYIKAN SEMUA SCROLLBAR (scroll tetap berfungsi) - override */
/* Ditaruh paling akhir agar mengalahkan semua aturan sebelumnya. */
/* ============================================================= */
*::-webkit-scrollbar,
.confirm-card::-webkit-scrollbar,
.modal-card::-webkit-scrollbar,
.crypto-modal::-webkit-scrollbar,
.sidebar-config::-webkit-scrollbar,
.preview-scroll-area::-webkit-scrollbar,
.editor-main::-webkit-scrollbar,
.editor-sidebar::-webkit-scrollbar,
.fb-feed-container::-webkit-scrollbar,
.ads-table-scroll-container::-webkit-scrollbar,
.table-scroll-container::-webkit-scrollbar,
.modal-card .table-scroll-container::-webkit-scrollbar,
.log-content::-webkit-scrollbar,
.log-popover::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

*::-webkit-scrollbar-track,
*::-webkit-scrollbar-thumb,
.confirm-card::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb,
.crypto-modal::-webkit-scrollbar-thumb,
.sidebar-config::-webkit-scrollbar-thumb,
.preview-scroll-area::-webkit-scrollbar-thumb,
.ads-table-scroll-container::-webkit-scrollbar-thumb,
.table-scroll-container::-webkit-scrollbar-thumb,
.modal-card .table-scroll-container::-webkit-scrollbar-thumb {
    display: none !important;
    background: transparent !important;
}

*,
.confirm-card,
.modal-card,
.crypto-modal,
.sidebar-config,
.preview-scroll-area,
.editor-main,
.editor-sidebar,
.fb-feed-container,
.ads-table-scroll-container,
.table-scroll-container,
.modal-card .table-scroll-container {
    scrollbar-width: none !important;      /* Firefox */
    -ms-overflow-style: none !important;   /* IE/Edge lama */
}

/* ============================================================= */
/* RESPONSIVE POLISH v2 — perapian lintas perangkat (2026)        */
/* Ditaruh paling akhir agar menang cascade. Semua di dalam       */
/* media-query, jadi tampilan desktop lebar tidak berubah.        */
/* ============================================================= */

/* Jaring pengaman global: cegah elemen memaksa halaman melebar   */
img, video, canvas, svg { max-width: 100%; height: auto; }
table { max-width: 100%; }

/* ── Tablet & di bawahnya (≤1024px) ─────────────────────────── */
@media (max-width: 1024px) {
    /* Grid apa pun yang dipaksa 2–4 kolom via inline style tetap
       boleh; tapi kartu auto-fit sudah aman. Rapikan jarak umum. */
    .app-container { gap: 18px !important; }
    /* Toolbar/tab yang panjang boleh menggulung, bukan terpotong */
    .golinks-tab-nav,
    .sub-tab-container,
    .campaign-monitor-controls,
    .catalog-toolbar { flex-wrap: wrap !important; }
}

/* ── Ponsel (≤768px) ────────────────────────────────────────── */
@media (max-width: 768px) {
    .app-container { padding: 12px !important; gap: 16px !important; }

    /* Section ber-tinggi tetap (calc 100vh) sering memotong isi di
       HP — biarkan tumbuh mengikuti konten & bisa di-scroll. */
    .main-section[style*="calc(100vh"],
    .main-section[style*="calc(100dvh"] {
        height: auto !important;
        min-height: 60vh !important;
        overflow: visible !important;
    }

    /* Judul/heading besar dikecilkan agar tidak overflow */
    .section-title { font-size: 20px !important; }

    /* Modal memenuhi layar dengan margin aman + bisa scroll */
    .modal-card {
        max-width: 94vw !important;
        width: 94vw !important;
        padding: 24px 18px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        border-radius: 20px !important;
    }

    /* Tombol tab performa nyaman disentuh & menggulung */
    .golinks-tab-btn { font-size: 12px !important; padding: 8px 12px !important; }

    /* Kartu peringkat 1 kolom penuh di HP */
    #adv-ranking-cards-container { grid-template-columns: 1fr !important; gap: 14px !important; }

    /* Kartu umum: kurangi padding & sudut agar muat */
    .card { padding: 16px !important; }
}

/* ── Ponsel kecil (≤480px, mis. iPhone SE) ──────────────────── */
@media (max-width: 480px) {
    .app-container { padding: 10px !important; }
    .card { padding: 14px !important; border-radius: 14px !important; }
    .section-title { font-size: 18px !important; }

    /* Grid inline yang dipaksa banyak kolom → paksa 1 kolom.
       Menangkap pola umum "grid-template-columns: repeat( / 1fr 1fr" */
    [style*="grid-template-columns: repeat(2"],
    [style*="grid-template-columns: repeat(3"],
    [style*="grid-template-columns: repeat(4"],
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    /* Kecuali grid auto-fit (kartu KPI/ranking) — biarkan mengalir */
    [style*="auto-fit"],
    [style*="auto-fill"] { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important; }

    /* Angka KPI besar dikecilkan sedikit */
    h2[id^="golinks-"] { font-size: 20px !important; }

    /* Modal makin ramping */
    .modal-card { padding: 20px 14px !important; }

    /* Tombol tab lebih kecil */
    .golinks-tab-btn { font-size: 11px !important; padding: 7px 10px !important; }
}
