body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f4f4;
}
header {
    background: #2c3e50;
    color: white;
    padding: 10px;
}
header h1 {
    margin: 0;
}
nav {
    margin-top: 5px;
}
nav button {
    margin: 0 5px;
    padding: 5px 10px;
}
main {
    display: flex;
}
#palette {
    width: 200px;
    background: #ecf0f1;
    padding: 10px;
    border-right: 1px solid #ccc;
}
.widget-item {
    background: #bdc3c7;
    padding: 8px;
    margin-bottom: 5px;
    cursor: grab;
}
#canvas {
    flex: 1;
    padding: 10px;
}
.grid-stack {
    background: #fff;
    min-height: 600px;
    border: 1px solid #ccc;
}
footer {
    background: #2c3e50;
    color: white;
    padding: 10px;
    text-align: center;
}

/* Widget styling - modern borders and shadows */
.grid-stack > .grid-stack-item > .grid-stack-item-content {
    background: #ffffff !important;
    border: 1px solid #e1e8ed !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease !important;
    margin: 0 !important;
}

.grid-stack > .grid-stack-item > .grid-stack-item-content:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px) !important;
}

/* Widget headers */
.grid-stack > .grid-stack-item > .grid-stack-item-content h3 {
    margin: 0 0 12px 0 !important;
    color: #2c3e50 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-bottom: 2px solid #ecf0f1 !important;
    padding-bottom: 8px !important;
}

/* Widget lists */
.grid-stack > .grid-stack-item > .grid-stack-item-content ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.grid-stack > .grid-stack-item > .grid-stack-item-content li {
    padding: 6px 0 !important;
    border-bottom: 1px solid #f8f9fa !important;
    color: #555 !important;
    font-size: 14px !important;
}

.grid-stack > .grid-stack-item > .grid-stack-item-content li:last-child {
    border-bottom: none !important;
}

/* Widget buttons */
.grid-stack > .grid-stack-item > .grid-stack-item-content button {
    background: #3498db !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    margin-top: 10px !important;
    transition: background-color 0.2s ease !important;
}

.grid-stack > .grid-stack-item > .grid-stack-item-content button:hover {
    background: #2980b9 !important;
}

/* Notes textarea */
.grid-stack > .grid-stack-item > .grid-stack-item-content textarea {
    border: 1px solid #e1e8ed !important;
    border-radius: 4px !important;
    padding: 8px !important;
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
    resize: none !important;
}

/* Dark Mode Styles for Dashboard Builder */
[data-theme="dark"] body {
    background: #1a1a1a !important;
    color: #e9ecef !important;
}

[data-theme="dark"] header {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%) !important;
}

[data-theme="dark"] #palette {
    background: #2d3748 !important;
    border-right: 1px solid #4a5568 !important;
}

[data-theme="dark"] .widget-item {
    background: #4a5568 !important;
    color: #f7fafc !important;
    border: 1px solid #718096 !important;
}

[data-theme="dark"] .widget-item:hover {
    background: #718096 !important;
}

[data-theme="dark"] #canvas {
    background: #1a1a1a !important;
}

[data-theme="dark"] .grid-stack {
    background: #2d3748 !important;
    border: 1px solid #4a5568 !important;
}

[data-theme="dark"] footer {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%) !important;
}

/* Dark mode widget content */
[data-theme="dark"] .grid-stack > .grid-stack-item > .grid-stack-item-content {
    background: #2d3748 !important;
    border: 1px solid #4a5568 !important;
    color: #f7fafc !important;
}

[data-theme="dark"] .grid-stack > .grid-stack-item > .grid-stack-item-content h3 {
    color: #f7fafc !important;
    border-bottom: 2px solid #4a5568 !important;
}

[data-theme="dark"] .grid-stack > .grid-stack-item > .grid-stack-item-content li {
    color: #e2e8f0 !important;
    border-bottom: 1px solid #4a5568 !important;
}

[data-theme="dark"] .grid-stack > .grid-stack-item > .grid-stack-item-content textarea {
    background: #4a5568 !important;
    border: 1px solid #718096 !important;
    color: #f7fafc !important;
}

[data-theme="dark"] .grid-stack > .grid-stack-item > .grid-stack-item-content textarea:focus {
    border-color: #3498db !important;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2) !important;
}
