:root {
    --primary: #00aaff;
    --primary-dark: #0088cc;
    --primary-light: #e6f7ff;
    --bg-dark: #121212;
    --bg-dark-alt: #1e1e1e;
    --bg-dark-lighter: #2a2a2a;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --border: #333333;
    --accent: #00aaff;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    overflow: hidden;
}

/* Designer Layout */
.designer-container {
    display: grid;
    grid-template-columns: 260px 1fr 300px;
    height: 100vh;
    background: var(--bg-dark);
}

.sidebar {
    background: var(--bg-dark-alt);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    height: 100vh;
    box-sizing: border-box;
}

.sidebar-header {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.component-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.component-item {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 0.75rem;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
}

.component-item:hover {
    background: rgba(0, 170, 255, 0.1);
    border-color: var(--primary);
}

/* Canvas Area */
.canvas-wrapper {
    background: #0a0a0a;
    padding: 2rem;
    display: flex;
    justify-content: center;
    overflow: auto;
}

.report-canvas {
    background: #ffffff;
    width: 210mm;
    /* A4 */
    min-height: 297mm;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    position: relative;
    color: #333;
    display: flex;
    flex-direction: column;
}

.report-section-container {
    position: relative;
    width: 100%;
    border: 1px dashed transparent;
    transition: border 0.3s;
    flex-shrink: 0;
}

.section-header {
    background: #f8f9fa;
    border-bottom: 1px dashed #ddd;
    padding: 2px 10px;
    font-size: 10px;
    color: var(--primary);
    font-weight: bold;
    text-transform: uppercase;
}

/* Properties Panel */
.properties-panel {
    background: var(--bg-dark-alt);
    border-left: 1px solid var(--border);
    padding: 1rem;
    height: 100vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.prop-group {
    margin-bottom: 1.5rem;
}

.prop-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.prop-input {
    width: 100%;
    background: var(--bg-dark-lighter);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 4px;
    outline: none;
}

.prop-input:focus {
    border-color: var(--primary);
}

/* QR and Special Components */
.qr-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border: 1px solid #ccc;
}

.active-item {
    border-color: var(--primary) !important;
    background: rgba(0, 170, 255, 0.1) !important;
    box-shadow: 0 0 0 2px rgba(0, 170, 255, 0.2);
}

.drop-target-active {
    background: rgba(0, 170, 255, 0.15) !important;
    border: 2px dashed var(--primary) !important;
    transform: scale(1.01);
    transition: all 0.2s ease-in-out;
}

.report-section-container.active {

    border: 1px solid var(--primary);
    background: rgba(0, 170, 255, 0.02);
}

.btn-delete-small {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    padding: 0 4px;
    border-radius: 4px;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-delete-small:hover {
    opacity: 1;
    background: rgba(255, 68, 68, 0.1);
}

.rg-detail-row {
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.cell-selected {
    outline: 2px solid var(--primary) !important;
    background: rgba(0, 170, 255, 0.1) !important;
    position: relative;
    z-index: 5;
}

.table-preview-interactive th,
.table-preview-interactive td {
    cursor: default;
    transition: background 0.2s;
}

.table-preview-interactive th:hover,
.table-preview-interactive td:hover {
    background: #f0f8ff;
}

.col-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    transition: background 0.2s;
}

.col-resizer:hover {
    background: var(--primary);
}

.sidebar-scrollable-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scrollable-content::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

/* Utils */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Documentation & Help Styles */
.tech-grid, .video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.tech-card, .info-card {
    background: var(--bg-dark-alt);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform 0.2s, border-color 0.2s;
}

.tech-card:hover, .info-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.tech-card h4, .tech-card h5 {
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.video-item {
    background: var(--bg-dark-alt);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    padding: 1rem;
    text-align: center;
}

.video-placeholder {
    background: #000;
    height: 180px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.video-placeholder:hover {
    background: #080808;
}

.steps-list {
    background: var(--bg-dark-alt);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mt-4 { margin-top: 2rem; }
.w-100 { width: 100%; }