:root {
    --brand-blue:   #0d6efd;
    --brand-dark:   #0a1628;
    --brand-panel:  #111d35;
    --brand-border: #1e3050;
    --text-muted:   #8a9bb5;
}

body {
    background: #0c1524;
    color: #dce8f8;
    font-family: 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
}

/* Header */
.site-header {
    background: var(--brand-panel);
    border-bottom: 1px solid var(--brand-border);
    padding: 1rem 0;
}
.site-header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    letter-spacing: .02em;
}
.site-header .tagline {
    font-size: .8rem;
    color: var(--text-muted);
}

/* Cards */
.card {
    background: var(--brand-panel);
    border: 1px solid var(--brand-border);
    border-radius: .5rem;
}
.card-header {
    background: rgba(255,255,255,.04);
    border-bottom: 1px solid var(--brand-border);
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    padding: .6rem 1rem;
}

/* Form controls */
.form-label {
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: .25rem;
}
.form-control, .form-select {
    background: #0a1628;
    border: 1px solid var(--brand-border);
    color: #dce8f8;
    font-size: .9rem;
}
.form-control:focus, .form-select:focus {
    background: #0a1628;
    border-color: var(--brand-blue);
    color: #fff;
    box-shadow: 0 0 0 .2rem rgba(13,110,253,.25);
}
.form-control::placeholder { color: #4a5f7a; }

.btn-calculate {
    background: var(--brand-blue);
    border: none;
    font-weight: 600;
    letter-spacing: .04em;
    padding: .6rem 1.5rem;
    transition: background .15s;
}
.btn-calculate:hover { background: #0b5ed7; }
.btn-calculate:disabled { opacity: .45; }

/* Screen canvas */
#screen-preview-wrap {
    background: #070f1d;
    border: 1px solid var(--brand-border);
    border-radius: .4rem;
    padding: .75rem;
    text-align: center;
}
#screen-canvas { max-width: 100%; }
.preview-label {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: .4rem;
}

/* Results */
#results-panel { display: none; }

.screen-summary {
    background: rgba(13,110,253,.12);
    border: 1px solid rgba(13,110,253,.3);
    border-radius: .4rem;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
}
.screen-summary .dim {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}
.screen-summary .meta {
    font-size: .8rem;
    color: var(--text-muted);
}

.results-table {
    width: 100%;
    font-size: .875rem;
    border-collapse: collapse;
}
.results-table th {
    background: rgba(255,255,255,.04);
    color: var(--text-muted);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--brand-border);
    text-align: left;
}
.results-table td {
    padding: .5rem .75rem;
    border-bottom: 1px solid rgba(255,255,255,.05);
    vertical-align: middle;
    color: #dce8f8;
}
.results-table tr:last-child td { border-bottom: none; }
.results-table .cat-badge {
    font-size: .7rem;
    padding: .15rem .4rem;
    border-radius: .2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.cat-cabinet_case  { background: #1a3a5c; color: #5ba3e8; }
.cat-hanging_bar   { background: #1a3a30; color: #4ecb8e; }
.cat-ground_stack  { background: #3a2a10; color: #e8a94e; }
.cat-controller    { background: #2a1a3a; color: #b04ee8; }
.cat-cable_case    { background: #1a2a3a; color: #4ea8e8; }
.cat-tools         { background: #2a2a2a; color: #aaa; }

.totals-box {
    background: rgba(255,255,255,.04);
    border: 1px solid var(--brand-border);
    border-radius: .4rem;
    padding: .75rem 1rem;
}
.totals-box .val {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}
.totals-box .lbl {
    font-size: .75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.cable-summary {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: .5rem;
}
.cable-summary span { color: #dce8f8; font-weight: 600; }

.btn-print {
    border: 1px solid var(--brand-border);
    color: var(--text-muted);
    background: transparent;
    font-size: .85rem;
    padding: .4rem 1rem;
    transition: all .15s;
}
.btn-print:hover {
    background: var(--brand-border);
    color: #fff;
    border-color: var(--brand-border);
}

/* Alerts */
.alert-custom {
    background: #1a0a0a;
    border: 1px solid #5c1a1a;
    color: #e88;
    border-radius: .4rem;
    padding: .75rem 1rem;
    font-size: .875rem;
}

@media print {
    body { background: #fff; color: #000; }
    .site-header, #form-col, .btn-print { display: none !important; }
    #results-panel { display: block !important; }
    .card { border: 1px solid #ccc; background: #fff; }
    .cat-badge { border: 1px solid #ccc; background: #f5f5f5 !important; color: #333 !important; }
    .results-table th { background: #f5f5f5; color: #333; }
    .results-table td { border-bottom: 1px solid #eee; color: #000; }
    .screen-summary { background: #f0f7ff; border-color: #c0d8f0; }
    .screen-summary .dim, .totals-box .val { color: #000; }
    .totals-box { background: #f9f9f9; }
}
