/* -----------------------------------------------------------
   CHAINLINX PowerTrack ULTRA — Dark Mode UI (Chunk 2/5)
   Full dealership-grade styling.
----------------------------------------------------------- */

body {
    margin: 0;
    padding: 0;
    background: #0a0a0a;
    color: #e6e6e6;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

/* Layout grid: left catalog / right estimate */
#layout {
    display: grid;
    grid-template-columns: 380px auto;
    height: 100vh;
}

/* Left panel — service catalog */
#catalog-panel {
    background: #111;
    border-right: 2px solid #222;
    padding: 15px;
    overflow-y: auto;
}

/* Search bar */
#service-search {
    width: 100%;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    margin-bottom: 12px;
}

/* Category filters */
.category-filter {
    display: inline-block;
    padding: 6px 10px;
    margin: 3px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    color: #ccc;
    transition: 0.2s;
}

.category-filter:hover {
    border-color: #ff1a1a;
    color: #ff1a1a;
}

.category-filter.active {
    background: #ff1a1a;
    color: #fff;
    border-color: #ff1a1a;
}

/* Service list */
.service-item {
    padding: 10px;
    margin: 6px 0;
    background: #1a1a1a;
    border: 1px solid #222;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}

.service-item:hover {
    border-color: #ff1a1a;
    box-shadow: 0 0 8px #ff1a1a;
}

/* Right panel — estimate builder */
#estimate-panel {
    padding: 20px;
    overflow-y: auto;
}

/* Section headers */
.section-title {
    font-size: 20px;
    margin-bottom: 10px;
    border-bottom: 2px solid #222;
    padding-bottom: 5px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th {
    background: #222;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #333;
}

td {
    padding: 8px;
    border-bottom: 1px solid #222;
}

/* Editable fields */
input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 6px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
}

input[type="text"]:focus,
input[type="number"]:focus {
    border-color: #ff1a1a;
    outline: none;
    box-shadow: 0 0 6px #ff1a1a;
}

/* Buttons */
button {
    background: #ff1a1a;
    border: none;
    padding: 10px 16px;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: #cc0000;
}

/* Totals panel */
#totals-box {
    background: #111;
    border: 1px solid #222;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

/* Customer + Unit selectors */
.selector-box {
    background: #111;
    border: 1px solid #222;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.selector-box input {
    margin-bottom: 10px;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1a1a1a;
    padding: 20px;
    border: 1px solid #333;
    border-radius: 4px;
    width: 400px;
}

.modal-content h2 {
    margin-top: 0;
}

.close-modal {
    float: right;
    cursor: pointer;
    color: #ff1a1a;
}
