/* ── Timecard Calculator ── v1.0.0 ────────────────────────────────────── */
:root {
  --tc-bg:       #f0f7f4;
  --tc-card:     #ffffff;
  --tc-primary:  #1e7a5a;
  --tc-primary2: #27a370;
  --tc-accent:   #e8f5ef;
  --tc-text:     #1a2e25;
  --tc-muted:    #6b8c7d;
  --tc-border:   #c9dfd5;
  --tc-chip-bg:  #e2f2ea;
  --tc-radius:   14px;
  --tc-shadow:   0 4px 32px rgba(30,122,90,.10);
  --tc-font:     'Inter', 'Segoe UI', system-ui, sans-serif;
}

.tc-wrap {
  font-family: var(--tc-font);
  background: var(--tc-bg);
  border-radius: calc(var(--tc-radius) + 4px);
  padding: 2rem;
  max-width: 680px;
  margin: 2rem auto;
  box-shadow: var(--tc-shadow);
  color: var(--tc-text);
  box-sizing: border-box;
}

/* Header */
.tc-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.tc-icon {
  width: 44px;
  height: 44px;
  color: var(--tc-primary);
  background: var(--tc-accent);
  border-radius: 12px;
  padding: 8px;
  flex-shrink: 0;
}
.tc-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 .15rem;
  color: var(--tc-text);
}
.tc-sub {
  font-size: .82rem;
  color: var(--tc-muted);
  margin: 0;
}

/* Tabs */
.tc-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
  background: var(--tc-accent);
  padding: .35rem;
  border-radius: 10px;
}
.tc-tab {
  flex: 1;
  padding: .5rem .75rem;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--tc-muted);
  cursor: pointer;
  transition: background .18s, color .18s;
}
.tc-tab.active, .tc-tab:hover {
  background: var(--tc-primary);
  color: #fff;
}

/* Panels */
.tc-panel { display: none; }
.tc-panel.active { display: block; }

/* Labels */
.tc-label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tc-muted);
  margin-bottom: .4rem;
}
.tc-opt { font-weight: 400; text-transform: none; letter-spacing: 0; }

/* Inputs */
.tc-input {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--tc-border);
  border-radius: var(--tc-radius);
  font-size: .95rem;
  font-family: var(--tc-font);
  color: var(--tc-text);
  background: var(--tc-card);
  box-sizing: border-box;
  transition: border-color .18s, box-shadow .18s;
  outline: none;
}
.tc-input:focus {
  border-color: var(--tc-primary2);
  box-shadow: 0 0 0 3px rgba(39,163,112,.15);
}
.tc-input-lg { font-size: 1.4rem; font-weight: 700; color: var(--tc-primary); }
.tc-input-sm { max-width: 130px; }

.tc-input-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.tc-unit {
  font-size: .9rem;
  color: var(--tc-muted);
  white-space: nowrap;
}

.tc-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Currency */
.tc-currency-wrap { position: relative; }
.tc-currency {
  position: absolute;
  left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--tc-muted); font-size: .9rem; pointer-events: none;
}
.tc-input-currency { padding-left: 1.8rem; }

/* Format row */
.tc-format-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.tc-seg {
  display: flex;
  background: var(--tc-accent);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}
.tc-seg-btn {
  padding: .3rem .7rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--tc-muted);
  cursor: pointer;
  transition: background .18s, color .18s;
}
.tc-seg-btn.active { background: var(--tc-primary); color: #fff; }

/* Toggle */
.tc-toggle-wrap {
  display: flex; align-items: center; gap: .5rem; cursor: pointer;
}
.tc-toggle-wrap input { display: none; }
.tc-toggle {
  width: 40px; height: 22px;
  background: var(--tc-border);
  border-radius: 11px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.tc-toggle::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: left .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.tc-toggle-wrap input:checked + .tc-toggle { background: var(--tc-primary); }
.tc-toggle-wrap input:checked + .tc-toggle::after { left: 21px; }

.tc-custom-start { margin-bottom: 1rem; }

/* Button */
.tc-btn {
  width: 100%;
  padding: .85rem;
  background: var(--tc-primary);
  color: #fff;
  border: none;
  border-radius: var(--tc-radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--tc-font);
  cursor: pointer;
  transition: background .18s, transform .1s;
  margin-top: .25rem;
}
.tc-btn:hover { background: var(--tc-primary2); transform: translateY(-1px); }
.tc-btn:active { transform: translateY(0); }
.tc-btn-ghost {
  width: 100%;
  padding: .65rem;
  background: transparent;
  color: var(--tc-primary);
  border: 1.5px dashed var(--tc-border);
  border-radius: var(--tc-radius);
  font-size: .9rem;
  font-weight: 600;
  font-family: var(--tc-font);
  cursor: pointer;
  margin-top: .5rem;
  transition: border-color .18s, background .18s;
}
.tc-btn-ghost:hover { background: var(--tc-accent); border-color: var(--tc-primary2); }

/* Result */
.tc-result { margin-top: 1.5rem; }
.tc-result-label { font-size: .95rem; margin: 0 0 .75rem; }
.tc-result-box {
  background: var(--tc-card);
  border: 1.5px solid var(--tc-border);
  border-radius: var(--tc-radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(30,122,90,.07);
}
.tc-tz {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tc-primary);
  margin-bottom: .4rem;
}
.tc-big-time {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--tc-primary);
  letter-spacing: -.02em;
  line-height: 1;
}

/* Chips */
.tc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .75rem;
}
.tc-chip {
  background: var(--tc-chip-bg);
  border-radius: 8px;
  padding: .45rem .85rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--tc-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
}
.tc-chip-val { font-size: 1.05rem; font-weight: 800; }
.tc-chip-sub { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tc-muted); font-weight: 600; }

/* Quick calc */
.tc-quick { margin-top: 1.5rem; }
.tc-quick-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.tc-quick-btn {
  padding: .4rem .85rem;
  border: 1.5px solid var(--tc-border);
  background: var(--tc-card);
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--tc-text);
  cursor: pointer;
  font-family: var(--tc-font);
  transition: border-color .18s, background .18s;
}
.tc-quick-btn:hover, .tc-quick-btn.active {
  border-color: var(--tc-primary);
  background: var(--tc-accent);
  color: var(--tc-primary);
}

/* Shift pay */
.tc-shift-pay {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--tc-primary);
  border-radius: var(--tc-radius);
  padding: 1rem 1.25rem;
  margin-top: .5rem;
}
.tc-pay-label { color: rgba(255,255,255,.85); font-size: .85rem; font-weight: 600; }
.tc-pay-val   { color: #fff; font-size: 1.5rem; font-weight: 800; }

/* Multi-day */
.tc-multi-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .6rem;
  flex-wrap: wrap;
}
.tc-day-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--tc-muted);
  min-width: 42px;
}
.tc-remove-row {
  background: none;
  border: none;
  color: var(--tc-muted);
  cursor: pointer;
  font-size: .85rem;
  padding: .3rem;
  border-radius: 6px;
  transition: background .15s;
}
.tc-remove-row:hover { background: #ffe5e5; color: #c0392b; }

/* Table */
.tc-multi-table-wrap { overflow-x: auto; margin-top: .5rem; }
.tc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.tc-table th, .tc-table td {
  padding: .55rem .75rem;
  text-align: left;
  border-bottom: 1px solid var(--tc-border);
}
.tc-table th {
  font-weight: 700;
  color: var(--tc-muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.tc-table tr:last-child td { font-weight: 700; background: var(--tc-accent); }

/* Responsive */
@media (max-width: 520px) {
  .tc-wrap { padding: 1.25rem; }
  .tc-row-2 { grid-template-columns: 1fr; }
  .tc-big-time { font-size: 2rem; }
  .tc-format-row { flex-direction: column; align-items: flex-start; }
  .tc-multi-row .tc-input { min-width: 0; }
}
