/* Variables & Themes */
:root {
    --bg-main: #121212;
    --bg-secondary: #1e1e1e;
    --text-main: #e0e0e0;
    --accent: #007bff;
    --border-color: #333;
    --panel-header-bg: #252525;
}

[data-theme='midnight'] {
    --bg-main: #020617;
    --bg-secondary: #0f172a;
    --text-main: #f1f5f9;
    --accent: #38bdf8;
    --border-color: #1e293b;
    --panel-header-bg: #1e293b;
}

/* Base Layout */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow: hidden;
}

/* Header Navigation */
.header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-weight: 800;
    letter-spacing: 1px;
    margin-right: 20px;
    color: var(--accent);
}

.search-bar {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    width: 280px;
}

/* 5-Panel Grid: 25/40/25/10 */
.dashboard-container {
    display: grid;
    grid-template-columns: 25% 40% 25% 10%;
    height: calc(100vh - 60px);
    width: 100vw;
}

.panel {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
}

.panel-header {
    background: var(--panel-header-bg);
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h3 {
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.panel-content {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

/* Vertical Ad Space */
.ad-zone {
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.7rem;
    opacity: 0.08;
    user-select: none;
    color: var(--text-main);
    text-transform: uppercase;
}

/* Buttons */
.btn-group { display: flex; gap: 12px; }

.btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: filter 0.2s;
}

.btn:hover { filter: brightness(1.2); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal.active { display: flex; }

.modal-content {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: 320px;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 4px;
}