/* ===== CSS Variables ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #1e293b;
    --dark-2: #334155;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f1f5f9;
    --light-2: #e2e8f0;
    --white: #ffffff;
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --builder-topbar-height: 50px;
    --panel-width: 280px;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--light);
}
::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 3px;
}

/* ===== Utility ===== */
.hidden {
    display: none !important;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    background: var(--light-2);
    color: var(--dark);
}
.btn:hover {
    background: var(--gray-light);
    color: var(--white);
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}
.btn-success {
    background: var(--success);
    color: var(--white);
}
.btn-success:hover {
    background: #059669;
    color: var(--white);
}
.btn-danger {
    background: var(--danger);
    color: var(--white);
}
.btn-danger:hover {
    background: #dc2626;
    color: var(--white);
}
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}
.btn-full {
    width: 100%;
    justify-content: center;
}
.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
}
.btn-icon:hover {
    background: var(--light-2);
    color: var(--primary);
}

/* ===== Form ===== */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    margin-bottom: 4px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--light-2);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--dark);
    background: var(--white);
    transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===== Login Screen ===== */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-container {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    margin: 20px;
}
.login-logo {
    text-align: center;
    margin-bottom: 30px;
}
.login-logo i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 10px;
}
.login-logo h1 {
    font-size: 24px;
    color: var(--dark);
}
.login-logo p {
    color: var(--gray);
    font-size: 14px;
}
.login-hint {
    text-align: center;
    font-size: 12px;
    color: var(--gray-light);
    margin-top: 16px;
}
.login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border: 1px solid var(--light-2);
    border-radius: var(--radius);
    overflow: hidden;
}
.login-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: var(--light);
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
}
.login-tab.active {
    background: var(--primary);
    color: var(--white);
}

/* ===== App Layout ===== */
.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: var(--white);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 100;
}
.sidebar.collapsed {
    width: 70px;
}
.sidebar.collapsed .sidebar-logo span,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-details {
    display: none;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid var(--dark-2);
}
.sidebar-logo i {
    font-size: 24px;
    color: var(--primary-light);
}
.sidebar-logo span {
    font-size: 18px;
    font-weight: 700;
}
.sidebar-nav {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--gray-light);
    transition: var(--transition);
    margin-bottom: 4px;
}
.nav-item:hover {
    background: var(--dark-2);
    color: var(--white);
}
.nav-item.active {
    background: var(--primary);
    color: var(--white);
}
.nav-item i {
    width: 20px;
    text-align: center;
}
.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-top: 1px solid var(--dark-2);
}
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}
.user-details {
    display: flex;
    flex-direction: column;
}
.user-name {
    font-size: 13px;
    font-weight: 500;
}
.user-role {
    font-size: 11px;
    color: var(--gray-light);
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.topbar {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    background: var(--white);
    border-bottom: 1px solid var(--light-2);
    gap: 16px;
}
.topbar h2 {
    font-size: 18px;
    flex: 1;
}
.pages-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}
.page {
    display: none;
}
.page.active {
    display: block;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white);
}
.bg-primary { background: var(--primary); }
.bg-success { background: var(--success); }
.bg-warning { background: var(--warning); }
.bg-info { background: var(--info); }
.stat-info h3 {
    font-size: 24px;
    line-height: 1;
}
.stat-info p {
    font-size: 13px;
    color: var(--gray);
}

/* ===== Cards ===== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--light-2);
}
.card-header h3 {
    font-size: 16px;
}
.card-body {
    padding: 20px;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

/* ===== Websites Grid ===== */
.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.website-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}
.website-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.website-card-preview {
    height: 160px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 48px;
}
.website-card-body {
    padding: 16px;
}
.website-card-body h4 {
    font-size: 16px;
    margin-bottom: 4px;
}
.website-card-body p {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 12px;
}
.website-card-actions {
    display: flex;
    gap: 8px;
}

/* ===== Data Table ===== */
.table-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--light-2);
    font-size: 14px;
}
.data-table th {
    background: var(--light);
    font-weight: 600;
    color: var(--gray);
    font-size: 12px;
    text-transform: uppercase;
}
.data-table tr:hover {
    background: var(--light);
}
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}
.status-active {
    background: #d1fae5;
    color: #065f46;
}
.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== Roles Grid ===== */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}
.role-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}
.role-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
}
.role-card p {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 12px;
}
.role-card .permission-count {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

/* ===== Permissions Table ===== */
.permission-role-select {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.permission-role-select label {
    font-weight: 500;
}
.permission-role-select select {
    padding: 8px 16px;
    border: 1px solid var(--light-2);
    border-radius: var(--radius);
    font-size: 14px;
}
.permissions-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ===== Page Header ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.page-header h3 {
    font-size: 20px;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--gray);
    font-size: 14px;
}

/* ===== Media Grid ===== */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}
.media-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--light-2);
    cursor: pointer;
}
.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.media-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}
.media-item:hover .media-item-overlay {
    opacity: 1;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--light-2);
}
.modal-header h3 {
    font-size: 18px;
}
.modal-body {
    padding: 20px;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--light-2);
}

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 20px;
    border-radius: var(--radius);
    background: var(--dark);
    color: var(--white);
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--info); }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== Website Builder ===== */
.website-builder {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    flex-direction: column;
    background: var(--light);
}
.builder-topbar {
    height: var(--builder-topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--light-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}
.builder-topbar-left,
.builder-topbar-center,
.builder-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.builder-site-name {
    font-weight: 600;
    font-size: 14px;
}
.device-btn.active {
    background: var(--primary);
    color: var(--white);
}
.builder-page-dropdown {
    padding: 6px 12px;
    border: 1px solid var(--light-2);
    border-radius: var(--radius);
    font-size: 13px;
}

/* ===== Builder Main ===== */
.builder-main {
    flex: 1;
    display: flex;
    overflow: hidden;
}
.builder-panel {
    width: var(--panel-width);
    background: var(--white);
    border-right: 1px solid var(--light-2);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow: hidden;
}
.builder-panel.collapsed {
    width: 0;
    border: none;
}
.builder-properties {
    border-right: none;
    border-left: 1px solid var(--light-2);
}
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--light-2);
}
.panel-header h4 {
    font-size: 14px;
}
.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* ===== Panel Tabs ===== */
.panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--light-2);
    padding: 0 8px;
}
.panel-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: none;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.panel-tab:hover {
    color: var(--primary);
}
.panel-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.panel-tab-content {
    display: none;
}
.panel-tab-content.active {
    display: block;
}

/* ===== Sections List ===== */
.sections-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.section-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--light-2);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}
.section-preview-item:hover {
    border-color: var(--primary);
    background: rgba(99,102,241,0.05);
}
.section-preview-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 16px;
    flex-shrink: 0;
}
.hero-thumb { background: linear-gradient(135deg, #667eea, #764ba2); }
.about-thumb { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.services-thumb { background: linear-gradient(135deg, #f093fb, #f5576c); }
.features-thumb { background: linear-gradient(135deg, #f5af19, #f12711); }
.team-thumb { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.testimonial-thumb { background: linear-gradient(135deg, #13547a, #80d0c7); }
.pricing-thumb { background: linear-gradient(135deg, #ee9ca7, #ffdde1); }
.cta-thumb { background: linear-gradient(135deg, #667eea, #764ba2); }
.contact-thumb { background: linear-gradient(135deg, #11998e, #38ef7d); }
.gallery-thumb { background: linear-gradient(135deg, #fc5c7d, #6a82fb); }
.stats-thumb { background: linear-gradient(135deg, #f7971e, #ffd200); }
.faq-thumb { background: linear-gradient(135deg, #7f7fd5, #86a8e7); }
.footer-thumb { background: linear-gradient(135deg, #1e293b, #334155); }
.section-preview-item span {
    font-size: 12px;
    font-weight: 500;
    color: var(--dark);
}

/* ===== Templates List ===== */
.templates-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.template-preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--light-2);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}
.template-preview-item:hover {
    border-color: var(--primary);
    background: rgba(99,102,241,0.03);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.template-preview-thumb {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    flex-shrink: 0;
}
.template-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.template-info strong {
    font-size: 13px;
    color: var(--dark);
}
.template-info small {
    font-size: 11px;
    color: var(--gray);
}

/* ===== Elements Grid ===== */
.elements-category {
    margin-bottom: 16px;
}
.elements-category h5 {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 8px;
    padding: 0 4px;
}
.elements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.element-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: 1px solid var(--light-2);
    border-radius: var(--radius);
    cursor: grab;
    transition: var(--transition);
    font-size: 11px;
    color: var(--gray);
    text-align: center;
}
.element-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99,102,241,0.05);
}
.element-item i {
    font-size: 18px;
}
.element-item:active {
    cursor: grabbing;
}

/* ===== Builder Canvas ===== */
.builder-canvas-wrapper {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow: auto;
    background: var(--light);
}
.builder-canvas {
    width: 100%;
    max-width: 1200px;
    min-height: calc(100vh - var(--builder-topbar-height) - 40px);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    transition: max-width 0.3s ease;
    overflow: hidden;
}
.builder-canvas[data-device="tablet"] {
    max-width: 768px;
}
.builder-canvas[data-device="mobile"] {
    max-width: 375px;
}
.canvas-drop-zone {
    min-height: 100%;
    padding: 0;
    position: relative;
}
.canvas-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--gray-light);
    gap: 12px;
}
.canvas-empty-state i {
    font-size: 48px;
}

/* ===== Canvas Elements ===== */
.canvas-element {
    position: relative;
    transition: outline 0.15s ease;
    cursor: pointer;
}
.canvas-element:hover {
    outline: 2px dashed var(--primary-light);
}
.canvas-element.selected {
    outline: 2px solid var(--primary);
}
.canvas-element-actions {
    position: absolute;
    top: -30px;
    right: 4px;
    display: none;
    gap: 4px;
    background: var(--primary);
    border-radius: 4px;
    padding: 2px;
}
.canvas-element.selected .canvas-element-actions,
.canvas-element:hover .canvas-element-actions {
    display: flex;
}
.canvas-element-actions button {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    border-radius: 3px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.canvas-element-actions button:hover {
    background: rgba(255,255,255,0.2);
}

/* Drop indicator */
.drop-indicator {
    height: 3px;
    background: var(--primary);
    margin: 0;
    border-radius: 2px;
    transition: all 0.2s;
}

/* Inline editing */
.inline-editing {
    outline: 2px solid var(--primary) !important;
    outline-offset: 2px;
    background: rgba(99, 102, 241, 0.05) !important;
    cursor: text !important;
    min-width: 50px;
    border-radius: 4px;
    padding: 4px 8px !important;
}
.inline-editing:focus {
    outline: 2px solid var(--primary) !important;
}

/* Drop position indicator */
.drop-position-indicator {
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
    margin: 2px 0;
    animation: pulseIndicator 1s infinite;
    position: relative;
}
.drop-position-indicator::before {
    content: '';
    position: absolute;
    left: 0;
    top: -3px;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}
@keyframes pulseIndicator {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Section editing mode */
.section-editing-mode {
    outline: 2px solid var(--primary) !important;
    outline-offset: 2px;
}
.section-editable-item {
    cursor: pointer !important;
    transition: all 0.15s ease;
    border-radius: 3px;
}
.section-editable-item:hover {
    outline: 2px dashed var(--primary) !important;
    outline-offset: 2px;
    background: rgba(99, 102, 241, 0.05) !important;
}
.section-item-active {
    outline: 2px solid var(--primary) !important;
    outline-offset: 2px;
    background: rgba(99, 102, 241, 0.08) !important;
    border-radius: 3px;
}

/* ===== Properties Panel Content ===== */
.properties-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--gray-light);
    gap: 8px;
}
.properties-empty i {
    font-size: 32px;
}
.property-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--light-2);
}
.property-section:last-child {
    border-bottom: none;
}
.property-section h5 {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 10px;
}
.property-row {
    margin-bottom: 10px;
}
.property-row label {
    display: block;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 3px;
}
.property-row input,
.property-row select,
.property-row textarea {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--light-2);
    border-radius: 4px;
    font-size: 13px;
}
.property-row input[type="color"] {
    height: 32px;
    padding: 2px;
    cursor: pointer;
}
.property-row-inline {
    display: flex;
    gap: 8px;
}
.property-row-inline > div {
    flex: 1;
}
.property-row-inline label {
    font-size: 10px;
}
.property-row-inline input {
    padding: 5px 6px;
    font-size: 12px;
}

/* ===== Preview ===== */
.preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    flex-direction: column;
    background: var(--white);
}
.preview-topbar {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--dark);
    color: var(--white);
    font-size: 14px;
}
.preview-frame {
    flex: 1;
    overflow: auto;
    padding: 0;
}

/* ===== Settings Form ===== */
.settings-form .card {
    max-width: 600px;
}

/* ===== Hosting Options ===== */
.hosting-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
}
.hosting-option {
    position: relative;
    cursor: pointer;
}
.hosting-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.hosting-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border: 2px solid var(--light-2);
    border-radius: var(--radius);
    transition: var(--transition);
    text-align: center;
}
.hosting-option-content i {
    font-size: 20px;
    color: var(--gray);
}
.hosting-option-content strong {
    font-size: 12px;
    color: var(--dark);
}
.hosting-option-content small {
    font-size: 10px;
    color: var(--gray-light);
}
.hosting-option.active .hosting-option-content {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}
.hosting-option.active .hosting-option-content i {
    color: var(--primary);
}

/* Input with suffix/prefix */
.input-with-suffix {
    display: flex;
    align-items: center;
    border: 1px solid var(--light-2);
    border-radius: var(--radius);
    overflow: hidden;
}
.input-with-suffix input {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex: 1;
}
.input-suffix {
    padding: 8px 12px;
    background: var(--light);
    color: var(--gray);
    font-size: 13px;
    white-space: nowrap;
    border-left: 1px solid var(--light-2);
}
.input-prefix {
    padding: 8px 12px;
    background: var(--light);
    color: var(--gray);
    font-size: 13px;
    white-space: nowrap;
    border-right: 1px solid var(--light-2);
}

/* Hosting badges on website cards */
.hosting-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: var(--light);
    color: var(--gray);
}
.hosting-badge i {
    font-size: 10px;
}
.hosting-domain {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}
.hosting-subdomain {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.hosting-page {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}
.owner-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}
.website-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 12px;
    margin-top: 4px;
}

/* ===== List Items ===== */
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-2);
}
.list-item:last-child {
    border-bottom: none;
}
.list-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.list-item-info strong {
    font-size: 14px;
}
.list-item-info small {
    font-size: 12px;
    color: var(--gray);
}

/* ===== Templates Page Grid ===== */
.templates-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.template-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}
.template-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.template-card-preview {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 48px;
    position: relative;
}
.template-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    backdrop-filter: blur(4px);
}
.template-card-body {
    padding: 16px;
}
.template-card-body h4 {
    font-size: 16px;
    margin-bottom: 4px;
}
.template-card-body p {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 12px;
}
.template-card-actions {
    display: flex;
    gap: 8px;
}
.template-card-sections {
    font-size: 11px;
    color: var(--gray-light);
    margin-bottom: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -var(--sidebar-width);
        height: 100vh;
        z-index: 200;
    }
    .sidebar.open {
        left: 0;
    }
    .sidebar-toggle {
        display: flex;
    }
    .builder-panel {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .websites-grid {
        grid-template-columns: 1fr;
    }
    .builder-topbar {
        flex-wrap: wrap;
        height: auto;
        padding: 8px;
        gap: 8px;
    }
    .builder-topbar-center {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    .builder-panel {
        position: fixed;
        top: var(--builder-topbar-height);
        bottom: 0;
        z-index: 50;
        width: 260px;
    }
    .builder-elements {
        left: 0;
    }
    .builder-properties {
        right: 0;
    }
    .builder-panel.collapsed {
        width: 0;
    }
    .pages-container {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .login-container {
        padding: 24px;
    }
}
