/* =========================================================
   Time Tracker - app.css  (v1.2)
   - Swap travel/labor colors (travel = gray, labor = dark)
   - Add two-line per-day totals styling (Labor / Travel)
   ========================================================= */

/* =========================================================
   APP THEME VARIABLES
   ========================================================= */
:root{
  --bg:#f6f7f9;
  --card:#fff;
  --text:#111;
  --border:#d7dbe2;
  --chip:#e4e7ee;

  /* ✅ swapped per request */
  --travel:#8b8f97;     /* travel = gray */
  --labor:#111;         /* labor  = dark */
}

/* =========================================================
   GLOBAL / RESET
   ========================================================= */
*{ box-sizing:border-box; }

html, body{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto;
  background:var(--bg);
  color:var(--text);
}

.wrap{
  max-width:900px;
  margin:auto;
  padding:14px;
}

/* =========================================================
   CARD CONTAINER
   ========================================================= */
.card{
  background:var(--card);
  border-radius:16px;
  padding:16px;
  margin-bottom:14px;
  box-shadow:0 1px 8px rgba(0,0,0,.06);
  overflow:hidden;
}

h2{ margin:0 0 10px; }

/* =========================================================
   FORMS / INPUTS
   ========================================================= */
label{
  font-size:13px;
  margin-bottom:6px;
  display:block;
}

input, select, button{
  max-width:100%;
  box-sizing:border-box;
}

input[type="date"]{
  width:100%;
  max-width:100%;
  display:block;
  appearance:none;
  -webkit-appearance:none;
  border-radius:12px;
}

.dateInput{
  width:100%;
  max-width:100%;
  display:block;
  padding:10px;
  font-size:18px;
  border-radius:12px;
  border:1px solid var(--border);
}

.row{
  display:grid;
  gap:12px;
}

@media(min-width:720px){
  .cols2{ grid-template-columns:1fr 1fr; }
}

.timegrid{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:8px;
  align-items:center;
}

.colon{
  font-size:24px;
  font-weight:900;
}

.smallColon{ font-size:18px; }

select.big{
  width:100%;
  padding:14px;
  font-size:22px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
}

select.compact{
  width:100%;
  padding:10px 12px;
  font-size:16px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
}

.btn{
  margin-top:14px;
  width:100%;
  padding:14px;
  border-radius:14px;
  border:0;
  background:#111;
  color:#fff;
  font-size:18px;
  font-weight:900;
}

/* =========================================================
   WEEK HEADER
   ========================================================= */
.weekBar{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-bottom:10px;
  user-select:none;
  -webkit-user-select:none;
  touch-action:pan-y;
}

.weekTitle{
  text-align:center;
  font-weight:900;
  font-size:16px;
  line-height:1;
  padding:6px 0;
  display:flex;
  align-items:center;
  white-space:nowrap;
}

.weekArrow{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid #e1e4ea;
  background:#fff;
  color:#111;
  text-decoration:none;
  font-size:26px;
  font-weight:900;
  line-height:1;
}

/* =========================================================
   DAYS LIST + COLLAPSE
   ========================================================= */
.week{
  display:grid;
  gap:12px;
}

.day{
  border:1px solid #eee;
  border-radius:14px;
  padding:12px;
}

.dayHeader{ cursor:pointer; }

.dayHeaderInner{
  display:flex;
  align-items:flex-start;   /* allow multi-line totals to align nicely */
  justify-content:space-between;
  width:100%;
  gap:10px;
}

.dayTitle{ font-weight:900; font-size:16px; }

/* ✅ Day totals block (two separate fields) */
.dayMeta{
  font-size:12px;
  opacity:.85;
  text-align:right;
  line-height:1.2;
}

.metaLine{
  white-space:nowrap;
}

.dayContent{
  margin-top:10px;
  overflow:hidden;
  max-height:2000px;
  opacity:1;
}

.day.collapsed .dayContent{
  max-height:0;
  opacity:0;
  margin-top:0;
}

/* =========================================================
   TIMELINE BAR
   ========================================================= */
.timeline{
  position:relative;
  height:18px;
  border-radius:99px;
  background:#e9ebf0;
  overflow:hidden;
  margin:10px 0 12px;
}

.bar{
  position:absolute;
  top:0;
  bottom:0;
  border-radius:99px;
}

.bar.travel{ background:var(--travel); }
.bar.labor{  background:var(--labor); }

/* =========================================================
   ENTRIES LIST
   ========================================================= */
.entries{
  display:grid;
  gap:10px;
}

.entryRow{
  background:#f2f3f6;
  padding:10px;
  border-radius:12px;
  border-left:6px solid transparent;
}

.entryRow.travel{ border-left-color: var(--travel); }
.entryRow.labor{  border-left-color: var(--labor); }
.entryRow.empty{ border-left-color: transparent; }

.entryMain{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.timeText{
  font-weight:900;
  font-size:16px;
}

.tag{
  display:inline-block;
  font-size:12px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid var(--chip);
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:900;
}

.tag.travel{
  background:var(--travel);
  color:#fff;
  border-color:var(--travel);
}

.tag.labor{
  background:var(--labor);
  color:#fff;
  border-color:var(--labor);
}

/* =========================================================
   ROW ACTION BUTTONS
   ========================================================= */
.entryActions{
  display:flex;
  gap:10px;
  margin-top:8px;
}

.inlineForm{ display:inline; margin:0; }

.miniBtn{
  display:inline-block;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid #e1e4ea;
  background:#fff;
  font-weight:900;
  font-size:14px;
  text-decoration:none;
  color:#111;
  cursor:pointer;
}

.miniBtn.danger{ border-color:#f0c8c8; }

/* =========================================================
   FOOTER CARD (inverted / footer-like)
   ========================================================= */
/* FOOTER CARD (inverted / footer-like) */
.footerCard{
  background:#111;
  color:#fff;
  padding:10px 16px;
  border-radius:16px;
  box-shadow:none;
  margin-top:-4px;
  overflow:hidden;

  /* ✅ make items inline */
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

/* Export icon button (left) */
.exportBtn{
  flex:0 0 auto;
  border:1px solid rgba(255,255,255,.22);
  background:transparent;
  color:#fff;
  width:24px;
  height:24px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  font-weight:900;
  cursor:pointer;
}

/* Total text (right) */
.footerRightSmall{
  flex:1 1 auto;
  text-align:right;
  font-size:12px;
  font-weight:800;
  opacity:.85;

  /* ✅ remove the “force to new line” rules */
  width:auto !important;
  display:block !important;
}
/* =========================================================
   MODALS
   ========================================================= */
.modalOverlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.4);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9000;
}

.modalOverlay.show{ display:flex; }

.modal{
  background:#fff;
  border-radius:16px;
  width:90%;
  max-width:420px;
  overflow:hidden;
}

.modal.small{ max-width:400px; }

.modalHeader{
  display:flex;
  justify-content:space-between;
  padding:12px;
  border-bottom:1px solid #eee;
}

.modalBody{ padding:14px; }

.typeGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.typeBtn{
  padding:14px;
  font-size:18px;
  font-weight:900;
  border-radius:14px;
  border:1px solid var(--chip);
  background:#fff;
}

.typeBtn.selected{
  background:#111;
  color:#fff;
  border-color:#111;
}

.iconBtn{
  border:0;
  background:none;
  font-size:18px;
  cursor:pointer;
}

.hintSmall{
  margin-top:8px;
  font-size:12px;
  opacity:.75;
}

.hintSmall.warn{
  color:#c0392b;
  font-weight:900;
  opacity:1;
}

/* =========================================================
   TOAST
   ========================================================= */
.toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translate(-50%, 20px);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
  z-index:9999;
}

.toast.show{
  opacity:1;
  transform:translate(-50%, 0);
}

.toastInner{
  background:#111;
  color:#fff;
  font-weight:900;
  border-radius:999px;
  padding:10px 14px;
  box-shadow:0 10px 22px rgba(0,0,0,.22);
}

.toast.err .toastInner{ background:#c0392b; }
