@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0f172a;
    --panel-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-secondary: #10b981;
    --border-color: #334155;
    --sidebar-width: 260px;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, var(--panel-bg) 0%, rgba(30,41,59,0.95) 100%);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    padding-top: 20px;
    z-index: 1000;
    transition: all var(--transition-speed);
}

.sidebar-header {
    padding: 0 24px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand span {
    background: -webkit-linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-item {
    margin: 4px 12px;
}

.nav-link {
    color: var(--text-muted);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-speed);
    font-weight: 500;
}

.nav-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, var(--accent-primary), rgba(59, 130, 246, 0.8));
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
}

/* Top Navbar */
.top-navbar {
    background: transparent;
    padding: 10px 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

/* Custom Cards */
.premium-card {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
}

.card-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.icon-blue { background: rgba(59, 130, 246, 0.1); color: var(--accent-primary); }
.icon-green { background: rgba(16, 185, 129, 0.1); color: var(--accent-secondary); }
.icon-purple { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.icon-orange { background: rgba(249, 115, 22, 0.1); color: #f97316; }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Custom Tables */
.table-dark-custom {
    color: var(--text-primary);
}

.table-dark-custom th {
    background-color: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    padding: 15px;
}

.table-dark-custom td {
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    padding: 15px;
    vertical-align: middle;
}

/* Buttons */
.btn-premium {
    background: linear-gradient(90deg, var(--accent-primary), rgba(59, 130, 246, 0.8));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-premium:hover {
    background: linear-gradient(90deg, #2563eb, var(--accent-primary));
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
    color: #fff;
}

/* ==========================================================================
   Visual Editor Layout (Elementor Style)
   ========================================================================== */

body.visual-editor-active {
    overflow: hidden;
}

body.visual-editor-active .sidebar {
    display: none;
}

body.visual-editor-active .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #0f172a;
}

/* Editor Header */
.editor-header {
    height: 60px;
    background-color: #1e293b;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1010;
}

.editor-header-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.editor-header-actions {
    display: flex;
    gap: 10px;
}

/* Editor Main Area */
.editor-main {
    flex: 1;
    display: flex;
    height: calc(100vh - 60px);
    overflow: hidden;
}

/* Control Panel (Left Sidebar) */
.editor-control-panel {
    width: 380px;
    background-color: #1e293b;
    border-right: 1px solid #334155;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.editor-panel-tabs {
    border-bottom: 1px solid #334155;
    padding: 10px 15px 0;
    background-color: #0f172a;
}

.editor-panel-tabs .nav-link {
    border: none;
    color: #94a3b8;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px 4px 0 0;
    margin-right: 5px;
}

.editor-panel-tabs .nav-link.active {
    color: #3b82f6;
    background-color: #1e293b;
    border-bottom: 2px solid #3b82f6;
}

.editor-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Preview Area (Right Pane) */
.editor-preview-pane {
    flex: 1;
    background-color: #0f172a;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.preview-iframe-wrapper {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
}

#preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background-color: #0f172a;
}

/* Dark Accordion Styles */
.accordion-dark .accordion-item {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion-dark .accordion-button {
    background-color: #1e293b;
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 15px 20px;
    box-shadow: none;
    border: none;
}

.accordion-dark .accordion-button:not(.collapsed) {
    background-color: #0f172a;
    color: #3b82f6;
    border-bottom: 1px solid #334155;
}

.accordion-dark .accordion-button::after {
    filter: invert(1) grayscale(1) brightness(2);
}

.accordion-dark .accordion-body {
    padding: 20px;
    background-color: #0f172a;
    color: #cbd5e1;
}

/* Image Selection cards */
.image-card-select {
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-card-select:hover {
    outline: 2px solid #3b82f6;
    transform: translateY(-2px);
}

.img-preview {
    border: 1px solid #334155;
    transition: opacity 0.2s;
}

.img-preview:hover {
    opacity: 0.8;
}

.bg-slate-800 {
    background-color: #1e293b !important;
}

.border-slate-700 {
    border-color: #334155 !important;
}

