/* Main Window - Professional Dark Theme with subtle background */
QMainWindow {
    background-color: #0F111A; /* Deep dark blue-ish gray */
    color: #E2E8F0;
}

/* Base Panel Style */
#TopPanel, #QueuePanel, QTabWidget::pane {
    background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(30, 35, 45, 0.9), stop:1 rgba(20, 24, 32, 0.95));
    border: 1px solid #2D3748;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

/* Labels */
QLabel {
    color: #CBD5E0;
}

/* List Widget (Queue) */
QListWidget {
    background-color: #1A202C;
    border-radius: 4px;
    border: 1px solid #2D3748;
    padding: 2px;
    color: #E2E8F0;
    font-size: 14px;
    outline: none; /* Remove focus rect */
}

QListWidget::item {
    border-bottom: 1px solid #0F111A;
    padding: 6px 10px;
    color: #E2E8F0;
}

QListWidget::item:selected {
    background-color: #E2E8F0;
    border: 1px solid #A0AEC0;
    color: #1A202C;
}

QListWidget::item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Tabs */
QTabWidget::pane {
    border-top-left-radius: 0px; /* Tab bar connects here */
}

QTabBar::tab {
    background-color: #1A202C;
    color: #A0AEC0;
    padding: 8px 20px;
    border: 1px solid #2D3748;
    border-bottom: none;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    margin-right: 2px;
    font-weight: bold;
}

QTabBar::tab:selected {
    background-color: #2D3748;
    color: #63B3ED;
    border-top: 2px solid #3182CE;
}

QTabBar::tab:hover:!selected {
    background-color: #2A3441;
}

/* Buttons */
QPushButton {
    background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #4A5568, stop:1 #2D3748);
    border: 1px solid #1A202C;
    border-top: 1px solid #718096;
    border-radius: 4px;
    color: #E2E8F0;
    padding: 6px 14px;
    font-weight: bold;
}

QPushButton:hover {
    background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #718096, stop:1 #4A5568);
    border-top: 1px solid #A0AEC0;
}

QPushButton:pressed {
    background-color: #1A202C;
    border: 1px solid #0F111A;
    border-top: 1px solid #1A202C;
    padding-top: 7px;
    padding-bottom: 5px;
}


QDialog, QMessageBox, QInputDialog, QProgressDialog { background-color: #0D1117; color: #E2E8F0; }
QMessageBox QLabel, QInputDialog QLabel, QProgressDialog QLabel { color: #E2E8F0; background: transparent; }
QMessageBox QPushButton, QInputDialog QPushButton, QProgressDialog QPushButton { min-width: 80px; }
QLineEdit, QTextEdit, QSpinBox, QComboBox { background-color: #1A202C; color: #E2E8F0; border: 1px solid #4A5568; border-radius: 3px; }
QProgressBar { background-color: #0D1117; border: 1px solid #4A5568; border-radius: 3px; color: white; text-align: center; }
QProgressBar::chunk { background-color: #3182CE; }
