/* ============================================================
   VIDAPI DAY GENERATOR — FULL ORIGINAL DARK MODE THEME
   (Matches your original screenshot 100%)
============================================================ */

/* ------------------------------
   COLOR VARIABLES
------------------------------ */
:root {
  --bg:        #0d1a20;
  --ink:       #e7eef0;
  --panel:     #0b1418;
  --line:      #244c57;
  --accent:    #173239;
  --danger:    #822;
  --danger-h:  #a33;
  --yellow-bg: rgba(255,210,70,0.10);
  --yellow-bd: #e6c34a;
  --cyan-bg:   rgba(0,234,255,0.12);
  --cyan-bd:   #00eaff;
  --sr-bg:     rgba(241,15,255,0.12);
  --sr-bd:     #f10fff;
}

/* ------------------------------
   GLOBAL
------------------------------ */
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, system-ui, sans-serif;
  margin: 0;
  padding: 20px;
}

h1 {
  font-size: 18px;
  margin: 0 0 12px;
}

/* ------------------------------
   WEEK + DAY BLOCKS
------------------------------ */
.week {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day {
  border: 2px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
}

.day + .day {
  margin-top: 6px;
}

/* ------------------------------
   DAY HEADER
------------------------------ */
.day-h {
  background: var(--accent);
  border-bottom: 2px solid var(--line);
  padding: 8px 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: .3px;
}

.day-title {
  white-space: nowrap;
}

.head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.head-right input[type="date"],
.head-right select {
  background: var(--bg);
  border: 2px solid var(--line);
  color: var(--ink);
  padding: 4px 6px;
  font-size: 12px;
}

/* midnight note */
.midnight-note {
  background: var(--accent);
  border-left: 3px solid var(--cyan-bd);
  padding: 6px 10px;
  margin: 4px 0;
  font-size: 12px;
  opacity: .9;
}

/* ------------------------------
   DAY BODY GRID
------------------------------ */
.day-body {
  display: grid;
  grid-template-columns: 200px 1fr 160px;
  column-gap: 16px;
  row-gap: 10px;
  padding: 10px;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ------------------------------
   TITLE + DESCRIPTION
------------------------------ */
.title-box input,
.title-box textarea {
  background: var(--bg);
  border: 2px solid var(--line);
  color: var(--ink);
  padding: 4px;
  font-size: 12px;
}

.title-box textarea {
  min-height: 32px;
  resize: vertical;
}

/* ------------------------------
   MAIN SLOT ROW
------------------------------ */
.slot-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr 260px 220px auto;
  gap: 12px;
  align-items: center;
}

.slot-row input,
.slot-row select {
  background: var(--bg);
  border: 2px solid var(--line);
  color: var(--ink);
  padding: 6px;
  font-size: 13px;
}

.time-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stop-chip {
  font-size: 12px;
  opacity: .85;
}

.stop-chip .label {
  opacity: .8;
  margin-right: 4px;
}

.btn {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--line);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 6px;
}

.btn:hover {
  background: #1f4c59;
}

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
}

.btn.danger:hover {
  background: var(--danger-h);
}

/* ------------------------------
   SUB-SLOTS
------------------------------ */
.subs-title {
  font-size: 12px;
  color: #cfe3e7;
  margin-bottom: 6px;
}

.sub-row {
  display: grid;
  grid-template-columns: 64px 150px 1.4fr 1fr 1fr 2fr 2fr auto;
  gap: 6px;
  padding: 6px 0;
  align-items: center;
  border-top: 1px dashed var(--accent);
}

.sub-row:first-of-type {
  border-top: none;
}

.sub-row input,
.sub-row select {
  background: var(--bg);
  border: 2px solid var(--line);
  padding: 4px;
  color: var(--ink);
}

/* Move buttons */
.icon-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

.icon-btn:hover {
  background: #13222a;
}

.icon-btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

/* Delete button inside row */
.del-sub {
  height: 34px;
}

/* ------------------------------
   COMMERCIAL ROW (YELLOW)
------------------------------ */
.sub-row.commercial {
  background: var(--yellow-bg);
  border-left: 3px solid var(--yellow-bd);
  padding-left: 9px;
}

.sub-row.commercial input,
.sub-row.commercial select {
  border-color: var(--yellow-bd);
}

/* ------------------------------
   FLEX ROW (CYAN)
------------------------------ */
.sub-row.flex-active {
  background: var(--cyan-bg);
  border-left: 3px solid var(--cyan-bd);
  padding-left: 9px;
}

.sub-row.flex-active select,
.sub-row.flex-active input,
.sub-row.flex-active .icon-btn {
  border-color: var(--cyan-bd) !important;
}

/* ------------------------------
   SR- HIGHLIGHT (MAGENTA)
------------------------------ */
.sub-row.sr-name-highlight input,
.sub-row.sr-name-highlight select,
.sub-row.sr-name-highlight .stop-chip .val {
  border-color: var(--sr-bd) !important;
  background: var(--sr-bg) !important;
}

/* ------------------------------
   CALENDAR MODAL
------------------------------ */
.cal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.cal {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  min-width: 960px;
  max-width: 96vw;
}

.cal-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cal-btn {
  background: var(--accent);
  border: 1px solid var(--line);
  padding: 8px 12px;
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
}

.cal-btn:hover {
  filter: brightness(1.08);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.cal-dow {
  text-align: center;
  opacity: .8;
  font-size: 13px;
}

.cal-cell {
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cal-cell:hover {
  background: #13222a;
}

.cal-cell.muted {
  opacity: .45;
}

.cal-dot {
  width: 8px;
  height: 8px;
  background: #ff4e4e;
  border-radius: 50%;
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
}

/* ------------------------------
   TOAST
------------------------------ */
#toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #12313a;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

