/* ===== DASHBOARD MODAL ===== */

.db-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #f0f3f7;
    z-index: 9999;
    overflow-y: auto;
}

.db-modal-content {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    width: 100%;
    border-radius: 0;
}

/* ── Header — sticky so it stays visible while scrolling ── */
.db-modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 20px;
    background: #23456a;
    color: white;
}

.db-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.db-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.db-summary {
    font-size: 13px;
    opacity: 0.88;
}

.db-close-btn {
    background: rgba(255,255,255,0.18);
    border: none;
    color: white;
    font-size: 18px;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.db-close-btn:hover { background: rgba(255,255,255,0.35); }

/* ── Body - scrolls as part of the page ── */
.db-scroll-container {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Section group label ── */
.db-group-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #23456a;
    padding: 4px 4px 3px;
    border-bottom: 2px solid #23456a;
    margin-bottom: 2px;
}

/* ── Writer / large-tech full-width row ── */
.db-writer-row {
    border: 1px solid #c8d3df;
    border-radius: 6px;
    overflow: hidden;
    background: white;
}

.db-writer-name {
    background: #23456a;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    letter-spacing: 0.03em;
}

.db-writer-sections {
    display: flex;
    align-items: stretch;
    background: #f8fafc;
}

/* ── Section block inside a row ── */
.db-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.db-section-header {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.db-section-preprod { background: #e8f0fb; color: #1a4a8a; border-bottom: 1px solid #c4d4ee; }
.db-section-go      { background: #e6f5ec; color: #1a6a3a; border-bottom: 1px solid #b8dfc7; }
.db-section-tech    { background: #fdf3e8; color: #7a4000; border-bottom: 1px solid #e8ccaa; }
.db-section-detail  { background: #f3eafd; color: #5a0080; border-bottom: 1px solid #d4b8e8; }

.db-section-count {
    background: rgba(0,0,0,0.13);
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 800;
}

/* ── Horizontal scrolling card row (writers, large techs, detail) ── */
.db-cards-wrap {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 5px;
    padding: 6px 8px;
    overflow-x: auto;
    align-items: flex-start;
    min-height: 70px;
    scrollbar-width: thin;
    scrollbar-color: #b0bec5 transparent;
}
.db-cards-wrap::-webkit-scrollbar { height: 4px; }
.db-cards-wrap::-webkit-scrollbar-thumb { background: #b0bec5; border-radius: 2px; }

/* ── Divider between sections in a row ── */
.db-section-divider {
    width: 1px;
    background: #c8d4e0;
    flex-shrink: 0;
    margin: 4px 0;
}

/* ── Tech / sublet side-by-side column area ── */
.db-tech-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: thin;
    scrollbar-color: #b0bec5 transparent;
}
.db-tech-row::-webkit-scrollbar { height: 4px; }
.db-tech-row::-webkit-scrollbar-thumb { background: #b0bec5; border-radius: 2px; }

/* ── Individual tech/sublet column ── */
.db-tech-col {
    flex: 0 0 auto;
    min-width: 120px;
    max-width: 180px;
    border: 1px solid #c8d3df;
    border-radius: 6px;
    overflow: hidden;
    background: white;
}

.db-tech-col-name {
    background: #23456a;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
}

.db-tech-col-sublet   { background: #4a2370; }  /* purple  - sublet    */
.db-tech-col-warranty { background: #7a1a1a; }  /* dark red - warranty */
.db-tech-col-waiting  { background: #1a5a4a; }  /* dark teal - waiting */

.db-tech-phase-block {
    border-top: 1px solid #e0e6ed;
}
.db-tech-phase-block:first-of-type { border-top: none; }

/* Cards stacked vertically in a column */
.db-tech-cards-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px 6px;
}

/* Cards in a horizontal row (large tech phases) */
.db-tech-cards-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 5px 6px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #b0bec5 transparent;
}
.db-tech-cards-row::-webkit-scrollbar { height: 4px; }
.db-tech-cards-row::-webkit-scrollbar-thumb { background: #b0bec5; border-radius: 2px; }

/* ── Individual RO card ── */
.db-card {
    background: white;
    border: 1px solid #cdd5df;
    border-radius: 5px;
    padding: 5px 8px;
    font-size: 11px;
    min-width: 105px;
    max-width: 140px;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    transition: box-shadow 0.15s, border-color 0.15s;
    line-height: 1.45;
}
.db-card:hover {
    box-shadow: 0 3px 8px rgba(35,69,106,0.2);
    border-color: #23456a;
}

.db-card-ro      { font-weight: 800; font-size: 12.5px; color: #23456a; }
.db-card-vehicle { color: #444; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 125px; }
.db-card-tech,
.db-card-writer  { color: #555; font-size: 10px; }
.db-card-phase   { color: #b06000; font-size: 10px; font-weight: 600; }
.db-card-sched   { color: #999; font-size: 9.5px; }

.db-empty-note {
    font-size: 11px;
    color: #bbb;
    font-style: italic;
    padding: 4px 2px;
    align-self: center;
}
