$mainBackgroundColor: #ffffff; // Main background color
$backgroundColor1: #efefef; // Background color layer 1
$backgroundColor2: #d6d6d6; // Background color layer 2
$backgroundColor3: #848484; // Background color layer 3
$backgroundColor4: #89939d; // Background color layer 4
$backgroundColor5: #adbac6; // Background color layer 5
$textColor: #141719; // Main text color
$primaryColor: #018fa3; // Primary color (buttons etc)
$secondaryColor: #e82257; // Secondary color
$tertiaryColor: #ffc50d; // Tertiary color
$quaternaryColor: #36b27e; // Quaternary color
$quinaryColor: #0ce5d5; // Quinary color
$senaryColor: #a54ce5; // Senary color
$borderColor: #cccccc; // Main border color
$curveColorGas: #c80000; // Curve color for gas plot
$curveColorGas2: #a91210; // Curve color for gas plot
$curveColorOil: #00c800; // Curve color for oil plot
$curveColorOil2: #7ba700; // Curve color for oil plot
$curveColorWater: #0000c8; // Curve color for water plot
$curveColorWater2: #3e7aa7; // Curve color for water plot
$markerColor: #141719; // Marker color
$lineMarkerColor: #018fa3; // Color of line marker
$plotGridColor: #394046; // Plot grid color
$auxiliaryCurveColor: #000000; // Auxiliary curve color

QwtPlot["*"]::grid["*"] {
    color: $backgroundColor2;
}

QwtPlot["*"]::legend {
    text-color: $textColor;
}

RiuQwtPlotWidget {
    color: $textColor;
}

QwtTextLabel {
    color: $textColor;
}

QwtPlot["PvtPlot"]::picker {
    text-color: $textColor;
}

QwtPlot["PvtPlot"]::curve["Auxiliary"] {
    line-color: #ffffff;
}

QwtPlot["PvtPlot"]::curve["Oil"] {
    line-color: $curveColorOil;
    symbol-color:  $curveColorOil;
}

QwtPlot["PvtPlot"]::curve["Gas"] {
    line-color: $curveColorGas;
    symbol-color:  $curveColorGas;
}

QwtPlot["RelPermPlot"]::curve["KRW"] {
    line-color: $curveColorWater;
    symbol-color:  $curveColorWater;
}

QwtPlot["RelPermPlot"]::curve["KROW"] {
    line-color: $curveColorWater;
    symbol-color:  $curveColorWater;
}

QwtPlot["RelPermPlot"]::curve["PCOW"] {
    line-color: $tertiaryColor;
    symbol-color:  $tertiaryColor;
}

QwtPlot["RelPermPlot"]::curve["KRG"] {
    line-color: $curveColorGas;
    symbol-color:  $curveColorGas;
}

QwtPlot["RelPermPlot"]::curve["KROG"] {
    line-color: $curveColorGas;
    symbol-color:  $curveColorGas;
}

QwtPlot["RelPermPlot"]::curve["PCOG"] {
    line-color: $senaryColor;
    symbol-color:  $senaryColor;
}

QwtPlot["PvtPlot"]::lineMarker["*"] {
    color: $textColor;
}

QwtPlot["PvtPlot"]::pointMarker["*"] {
    color: $textColor;
}

QToolBox {
    background-color: $mainBackgroundColor;
}

QLabel, QCheckBox {
    background-color: transparent;
}

QWidget {
    background-color: $mainBackgroundColor;
    color: $textColor;
    border-color: $borderColor;
}

QProgressBar {
    text-align: center;
    background-color: $backgroundColor1;
}

QAbstractItemView {
    border: 2px solid $borderColor;
    border-style: solid;
}

QAbstractItemView::item:hover {
    background-color: $primaryColor;
}

QAbstractItemView::item:selected {
    background-color: $secondaryColor;
    color: $textColor;
}

QTreeView::branch:has-children:!has-siblings:closed,
QTreeView::branch:closed:has-children:has-siblings {
    border-image: none;
    image: url(:/themes/dark/collapsed.svg);
    width: 12px;
    height: 12px;
}

QTreeView::branch:open:has-children:!has-siblings,
QTreeView::branch:open:has-children:has-siblings {
    border-image: none;
    icon-size: 12px;
}

QDockWidget {
    background-color: $mainBackgroundColor;
    titlebar-close-icon:  url(:/themes/dark/blank.svg);
    titlebar-normal-icon:  url(:/themes/dark/blank.svg);
}

QDockWidget::title {
    background-color: $backgroundColor1;
    padding: 5px;
}

QDockWidget::close-button, QDockWidget::float-button {
    background: transparent;
    border: none;
    icon-size: 12px;
    padding: 0px;
}

QToolBar QWidget {
    background-color: transparent;
    border-color: $borderColor;
}

QToolBar::handle {
    image: url(:/themes/light/gripper.svg);
}

QMenu::item:selected {
    background-color: #bbd9f2;
}

QLineEdit, QComboBox, QSpinBox, 
QDoubleSpinBox, QDateEdit, QDateTimeEdit, QToolButton {
    background-color: $backgroundColor1;
    color: $textColor;
    border-color: $borderColor;
    border-width : 1.5px;
    border-style: solid;
    padding: 3px;
}

QToolBar QToolButton {
    border: none;
}

QToolBar QToolButton:hover {
    background-color: $backgroundColor1;
}

QLCDNumber {
    color: $textColor;
    border-color: $borderColor;
    border-width : 1.5px;
    border-style: solid;
    border-radius: 5px;
}

QPushButton {
    color: $textColor;
    border-color: $borderColor;
    background-color: $backgroundColor1;
    border-width: 1.5px;
    border-style: solid;
    padding: 5px;
    font-weight: bold;
}

QTabWidget {
    background-color: #535353;
}

QTabWidget::pane { 
    border-top: 1px solid $backgroundColor3;
    background-color: $mainBackgroundColor;
}

QTabBar::tab {
    background-color: $backgroundColor1;
    border: 1px solid #2C2C2C;
    border-bottom: 0px;
    border-radius: 1px;
    padding: 6px;
}

QTabBar::tab:selected, QTabBar::tab:hover {
    background-color: $backgroundColor3;
}

QTabBar::tab:selected {
    border-bottom: 0px;
}

QTabBar::tab:!selected {
    color: $textColor;
}

/* Scrollbars */

QScrollBar:vertical {
     border: 0px;;
     background: transparent;
     width: 15px;
     margin: 0px 0px 0px 0px;
 }

 QScrollBar:vertical:hover {
     background: $backgroundColor2;
 }

 QScrollBar::handle:vertical {
     background: $backgroundColor4;
     min-height: 20px;
     margin: 3px 3px 3px 3px;
     border-radius: 3px;
 }

QScrollBar::handle:vertical::hover,
QScrollBar::handle:horizontal::hover  {
     background: $backgroundColor5;
 }

QScrollBar::handle:vertical::pressed,
QScrollBar::handle:horizontal::pressed  {
     background: white;
 }

QScrollBar::add-line:vertical,  
QScrollBar::sub-line:vertical,  
QScrollBar::add-line:horizontal, 
QScrollBar::sub-line:horizontal {
     border: 0px;
     height: 0px;
 }

QScrollBar::up-arrow:vertical, 
QScrollBar::down-arrow:vertical, 
QScrollBar::down-arrow:horizontal, 
QScrollBar::up-arrow:horizontal {
     border: 0px;
     background: none;
}

QScrollBar::add-page:vertical, 
QScrollBar::sub-page:vertical,  
QScrollBar::add-page:horizontal, 
QScrollBar::sub-page:horizontal {
     background: none;
 }

QScrollBar:horizontal {
     border: 0px;
     background: transparent;
     height: 15px;
     margin: 0px 0px 0px 0px;
 }

QScrollBar:horizontal:hover {
     background: $backgroundColor2;
 }

 QScrollBar::handle:horizontal {
     background: $backgroundColor4;
     min-width: 20px;
     margin: 3px 3px 3px 3px;
     border-radius: 3px;
 }

QFrame#FramedGroupContent {
    background-color: $mainBackgroundColor;
    border-top: 1px solid $borderColor;
}

QFrame#GroupTitleFrame QToolButton {
    padding: 3px;
}

QMinimizePanel {
    qproperty-background: $mainBackgroundColor;
    qproperty-titleBackground: $backgroundColor2;
    qproperty-border: $borderColor;
    qproperty-iconSize: 8px;
    border: 2px solid $backgroundColor2;
}

QMinimizePanel QLabel, QMinimizePanel QCheckBox {
    background-color: transparent;
}

QTextEdit, QPlainTextEdit {
    border: 2px solid $borderColor;
}