// Travel & Expense — ORIGINAL TEAL THEME  (#0d9488)
// Matches travel-expense-v2.html exactly
// ═══════════════════════════════════════════════════════════

:host {
  // ── Primary teal (exact from original) ──────────────────
  --te-primary:        #0d9488;
  --te-primary-dark:   #0f766e;
  --te-primary-light:  #ccfbf1;
  --te-primary-subtle: #f0fdfa;
  --te-accent:         #0891b2;

  // ── Semantic colours ─────────────────────────────────────
  --te-success:        #10b981;
  --te-success-light:  #d1fae5;
  --te-danger:         #ef4444;
  --te-danger-light:   #fee2e2;
  --te-warning:        #f59e0b;
  --te-warning-light:  #fef3c7;
  --te-info:           #3b82f6;
  --te-info-light:     #dbeafe;
  --te-purple:         #8b5cf6;
  --te-purple-light:   #ede9fe;
  --te-orange:         #f97316;
  --te-orange-light:   #ffedd5;

  // ── Neutrals (exact from original) ──────────────────────
  --te-white:          #ffffff;
  --te-bg:             #eaf0f6;
  --te-slate-900:      #0f172a;
  --te-slate-800:      #1e293b;
  --te-slate-700:      #334155;
  --te-slate-600:      #475569;
  --te-slate-500:      #64748b;
  --te-slate-400:      #94a3b8;
  --te-slate-300:      #cbd5e1;
  --te-slate-200:      #e2e8f0;
  --te-slate-100:      #f1f5f9;
  --te-slate-50:       #f8fafc;

  // ── Shadows ──────────────────────────────────────────────
  --te-shadow:         0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.05);
  --te-shadow-lg:      0 10px 30px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.06);
  --te-focus:          0 0 0 3px rgba(13,148,136,.18);

  // ── Radii & misc ─────────────────────────────────────────
  --te-r-sm: 6px;
  --te-r-md: 10px;
  --te-r-lg: 14px;
  --te-r-xl: 18px;
  --te-tr:   all .18s cubic-bezier(.4,0,.2,1);
}

// ── FormOverView wrapper ──────────────────────────────────
.FormOverView {
  background: var(--te-bg);
  padding: 18px 20px 48px;
  box-sizing: border-box;
}

// ── Doc Header ────────────────────────────────────────────
.doc-hdr {
  background: var(--te-white);
  border-radius: var(--te-r-lg);
  box-shadow: var(--te-shadow);
  padding: 14px 20px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;

  .doc-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--te-slate-900);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .doc-sub {
    font-size: 12px;
    color: var(--te-slate-400);
    margin-top: 2px;
  }

  .doc-hdr-r {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
}

// ── Status Badge ──────────────────────────────────────────
.s-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .03em;

  .s-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

  &.sd { background: var(--te-slate-100); color: var(--te-slate-600); border: 1.5px solid var(--te-slate-300); }
  &.ss { background: var(--te-info-light); color: var(--te-info); border: 1.5px solid #93c5fd; }
  &.sa { background: var(--te-success-light); color: #059669; border: 1.5px solid #6ee7b7; }
  &.sr { background: var(--te-danger-light); color: var(--te-danger); border: 1.5px solid #fca5a5; }
  &.sp { background: var(--te-primary-light); color: var(--te-primary-dark); border: 1.5px solid #5eead4; }
}

// ── Header Buttons ────────────────────────────────────────
.hb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 13px;
  border-radius: var(--te-r-md);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--te-tr);

  &.hb-ghost {
    background: transparent;
    color: var(--te-slate-600);
    border: 1.5px solid var(--te-slate-300);
    &:hover { background: var(--te-slate-50); }
  }

  &.hb-icon {
    width: 34px;
    padding: 0;
    background: transparent;
    color: var(--te-slate-500);
    border: 1.5px solid var(--te-slate-200);
    position: relative;
    &:hover { background: var(--te-slate-50); }
  }
}

.b-dot {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--te-primary);
  color: white;
  width: 16px; height: 16px;
  border-radius: 50%;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white;
}

// ── Stepper ───────────────────────────────────────────────
.stepper-wrap {
  background: var(--te-white);
  border-radius: var(--te-r-lg);
  box-shadow: var(--te-shadow);
  margin-bottom: 18px;
  overflow: hidden;
}

.stepper { display: flex; }

.step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--te-tr);
  position: relative;

  &:hover:not(.disabled) { background: var(--te-slate-50); }

  &.active {
    border-bottom-color: var(--te-primary);
    background: var(--te-primary-subtle);
    .step-num   { background: var(--te-primary); color: white; }
    .step-label { color: var(--te-primary-dark); }
  }

  &.done {
    border-bottom-color: var(--te-success);
    .step-num { background: var(--te-success); color: white; }
  }

  &.disabled { opacity: .42; cursor: not-allowed; pointer-events: none; }
}

.step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: var(--te-slate-200);
  color: var(--te-slate-600);
  flex-shrink: 0;
  transition: var(--te-tr);
}

.step-label { font-size: 12px; font-weight: 600; color: var(--te-slate-700); }
.step-sub   { font-size: 11px; color: var(--te-slate-400); margin-top: 1px; }

.step-arr {
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  color: var(--te-slate-300); font-size: 13px;
}
.step:last-child .step-arr { display: none; }

// ── Main 2-col layout ─────────────────────────────────────
.te-layout {
  display: grid;
  grid-template-columns: 1fr 288px;
  gap: 18px;
  align-items: start;
}

// ── Section Cards ─────────────────────────────────────────
.te-sec {
  background: var(--te-white);
  border-radius: var(--te-r-lg);
  box-shadow: var(--te-shadow);
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow .2s;

  &:hover { box-shadow: var(--te-shadow-lg); }
}

.te-sec-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--te-slate-100);
  transition: var(--te-tr);

  &:hover { background: var(--te-slate-50); }
}

.te-sec-ico {
  width: 32px; height: 32px;
  border-radius: var(--te-r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;

  &.ic-teal   { background: var(--te-primary-light); }
  &.ic-blue   { background: var(--te-info-light); }
  &.ic-amber  { background: var(--te-warning-light); }
  &.ic-green  { background: var(--te-success-light); }
  &.ic-purple { background: var(--te-purple-light); }
  &.ic-orange { background: var(--te-orange-light); }
}

.te-sec-tw    { flex: 1; min-width: 0; }
.te-sec-title {
  font-size: 13px; font-weight: 700; color: var(--te-slate-800);
  .te-sec-opt { font-size: 11px; font-weight: 400; color: var(--te-slate-400); margin-left: 6px; }
}

.te-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.tsp {
  display: inline-flex;
  align-items: center;
  background: var(--te-slate-100);
  border: 1px solid var(--te-slate-200);
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 11px; font-weight: 500;
  color: var(--te-slate-600);
  white-space: nowrap;

  &.prim { background: var(--te-primary-subtle); border-color: var(--te-primary-light); color: var(--te-primary-dark); }
  &.warn { background: var(--te-warning-light); border-color: #fde68a; color: #92400e; }
  &.ok   { background: var(--te-success-light); border-color: #6ee7b7; color: #065f46; }
}

.te-sec-tog {
  color: var(--te-slate-400); font-size: 13px; flex-shrink: 0;
  transition: transform .22s cubic-bezier(.4,0,.2,1);
}

.te-sec-b { padding: 18px 20px; }

// ── Form Grid ─────────────────────────────────────────────
.te-fg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 22px;
}

.te-fgrp {
  display: flex;
  flex-direction: column;
  gap: 5px;

  &.te-full { grid-column: 1 / -1; }

  > gb-newpicklist,
  > gb-input,
  > gb-combobox,
  > gb-date,
  > .field-with-action,
  > .te-date-range {
    display: block;
    width: 100%;
  }
}

.te-fl {
  font-size: 11px; font-weight: 600;
  color: var(--te-slate-500);
  letter-spacing: .04em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 4px;

  .req { color: var(--te-danger); }
}

// ── Field + action icon ───────────────────────────────────
.field-with-action {
  display: flex !important;
  align-items: center;
  gap: 10px;
  gb-newpicklist { flex-shrink: 0; }
}

.action-icon {
  cursor: pointer;
  color: var(--action-primary-default, var(--te-primary));
  flex-shrink: 0;
  font-size: 22px;
  transition: opacity .15s ease;
  &.disabled { opacity: .25; cursor: not-allowed; pointer-events: none; }
  &:hover:not(.disabled) { opacity: .7; }
}

// ── Date range ────────────────────────────────────────────
.te-date-range {
  display: flex !important;
  align-items: center;
  gap: 8px;
  gb-date { flex-shrink: 0; }
}

.te-date-sep {
  font-size: 11px; font-weight: 600;
  color: var(--te-slate-400); flex-shrink: 0;
}

// ── Info row ──────────────────────────────────────────────
.te-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--te-slate-50);
  border-radius: var(--te-r-md);
  border: 1px solid var(--te-slate-100);
  flex-wrap: wrap;
  margin-top: 14px;
}

.te-il {
  display: flex; flex-direction: column; gap: 2px;
  .te-il-lbl { font-size: 10px; color: var(--te-slate-400); text-transform: uppercase; font-weight: 600; }
  .te-il-val { font-size: 12.5px; font-weight: 600; color: var(--te-slate-700); }
}

.te-idiv { width: 1px; height: 28px; background: var(--te-slate-200); }

.te-check-lbl {
  display: flex; align-items: center; gap: 5px;
  cursor: pointer; margin-top: 2px;
  input { accent-color: var(--te-primary); width: 13px; height: 13px; }
}

.te-btn-loc {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 13px;
  border-radius: var(--te-r-md);
  background: linear-gradient(135deg, var(--te-primary), var(--te-accent));
  color: white; border: none; cursor: pointer;
  font-size: 12px; font-weight: 600;
  transition: var(--te-tr);
  margin-left: auto;
  &:hover { opacity: .88; transform: translateY(-1px); }
}

// ── Mode tabs ─────────────────────────────────────────────
.te-mode-tabs {
  display: flex;
  margin-bottom: 12px;
  border-radius: var(--te-r-md);
  overflow: hidden;
  border: 1.5px solid var(--te-slate-200);
  width: fit-content;
}

.te-mode-tab {
  padding: 6px 14px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  background: var(--te-white);
  color: var(--te-slate-500);
  border: none;
  transition: var(--te-tr);
  &.active { background: var(--te-primary); color: white; }
  &:hover:not(.active) { background: var(--te-slate-50); }
}

// ── Activity row ──────────────────────────────────────────
.te-act-row {
  display: grid;
  grid-template-columns: 22px 1fr 130px 130px 28px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--te-r-md);
  border: 1.5px solid var(--te-slate-200);
  background: var(--te-slate-50);
  margin-bottom: 8px;
  transition: var(--te-tr);

  &:hover { border-color: var(--te-primary); background: var(--te-primary-subtle); }

  > gb-newpicklist,
  > gb-date { display: block; }
}

.te-act-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--te-primary-light); color: var(--te-primary-dark);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.te-ecb {
  width: 28px; height: 28px;
  border-radius: var(--te-r-sm);
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  background: transparent; color: var(--te-slate-400);
  font-size: 13px; transition: var(--te-tr);
  &:hover     { background: var(--te-slate-100); color: var(--te-slate-700); }
  &.del:hover { background: var(--te-danger-light); color: var(--te-danger); }
}

.te-btn-add-act {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  background: var(--te-primary-subtle);
  border: 1.5px dashed var(--te-primary-light);
  border-radius: var(--te-r-md);
  font-size: 12px; font-weight: 600; color: var(--te-primary);
  cursor: pointer; transition: var(--te-tr);
  &:hover { background: var(--te-primary-light); }
}

// ── Toggle switch ─────────────────────────────────────────
.te-tog-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}

.te-tog-sw {
  position: relative; width: 42px; height: 24px; flex-shrink: 0;
  input { opacity: 0; width: 0; height: 0; }

  .te-tog-sl {
    position: absolute; inset: 0;
    background: var(--te-slate-300);
    border-radius: 99px; cursor: pointer; transition: .3s;
    &::before {
      content: ''; position: absolute;
      width: 18px; height: 18px; left: 3px; top: 3px;
      background: white; border-radius: 50%; transition: .3s;
      box-shadow: 0 1px 3px rgba(0,0,0,.2);
    }
  }

  input:checked + .te-tog-sl { background: var(--te-primary); }
  input:checked + .te-tog-sl::before { transform: translateX(18px); }
}

.te-tog-lbl { font-size: 13px; font-weight: 600; color: var(--te-slate-700); }
.te-tog-sub { font-size: 11px; color: var(--te-slate-400); }

// ── Advance new box ───────────────────────────────────────
.te-adv-new {
  background: var(--te-slate-50);
  border: 1.5px dashed var(--te-slate-300);
  border-radius: var(--te-r-lg);
  padding: 16px;
  .te-adv-new-title {
    font-size: 12px; font-weight: 700;
    color: var(--te-slate-600); margin-bottom: 12px;
  }
}

// ── Payment mode pills ────────────────────────────────────
.te-pm-grp { display: flex; gap: 6px; flex-wrap: wrap; }

.te-pm {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 99px;
  border: 1.5px solid var(--te-slate-200);
  background: var(--te-white);
  font-size: 12px; font-weight: 500; color: var(--te-slate-600);
  cursor: pointer; transition: var(--te-tr);
  &:hover  { border-color: var(--te-primary); color: var(--te-primary); }
  &.active { background: var(--te-primary); color: white; border-color: var(--te-primary); }
}

// ── Expense line header ───────────────────────────────────
.te-el-hdr {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; flex-wrap: wrap;
}

.te-el-t { font-size: 13px; font-weight: 700; color: var(--te-slate-700); }

.te-el-cnt {
  background: var(--te-primary-light); color: var(--te-primary-dark);
  padding: 2px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 700;
}

.te-btn-addl {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  border-radius: var(--te-r-md);
  background: var(--te-primary); color: white;
  font-size: 12.5px; font-weight: 600;
  border: none; cursor: pointer; transition: var(--te-tr);
  &:hover {
    background: var(--te-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13,148,136,.28);
  }
}

.te-btn-ah {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 12px;
  border-radius: var(--te-r-md);
  background: var(--te-white); color: var(--te-slate-600);
  border: 1.5px solid var(--te-slate-200);
  font-size: 12px; font-weight: 500;
  cursor: pointer; transition: var(--te-tr);
  &:hover { border-color: var(--te-primary); color: var(--te-primary); }
}

.te-exp-empty {
  border: 2px dashed var(--te-slate-200);
  border-radius: var(--te-r-lg);
  padding: 28px; text-align: center; color: var(--te-slate-400);
  .te-ee-ico { font-size: 28px; margin-bottom: 7px; }
  p { font-size: 12.5px; }
}

// ── Summary Panel ─────────────────────────────────────────
.te-right {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.te-sum-c {
  background: var(--te-white);
  border-radius: var(--te-r-lg);
  box-shadow: var(--te-shadow);
  overflow: hidden;
}

.te-sum-ch {
  padding: 11px 16px;
  // Dark navy header — exact match to original
  background: linear-gradient(135deg, var(--te-slate-900), #1e3651);
  color: white;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
}

.te-sum-b { padding: 14px 16px; }

.te-sr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed var(--te-slate-100);
  &:last-child { border-bottom: none; }

  .te-sr-l { font-size: 12px; color: var(--te-slate-500); font-weight: 500; }
  .te-sr-v {
    font-size: 13.5px; font-weight: 700;
    color: var(--te-slate-800);
    font-family: 'DM Mono', monospace;
  }
  .te-sr-v.vg   { color: var(--te-success); }
  .te-sr-v.warn { color: #92400e; }

  &.te-hl {
    .te-sr-l { color: var(--te-primary-dark); font-weight: 700; }
    .te-sr-v { color: var(--te-primary); font-size: 16px; }
  }

  &.te-adv-bal {
    border-top: 1px solid var(--te-slate-200);
    margin-top: 4px; padding-top: 8px; border-bottom: none;
    .te-sr-l { font-weight: 700; color: var(--te-slate-700); }
    .te-sr-v { font-size: 14px; color: var(--te-primary); }
  }
}

.te-sdiv { height: 1px; background: var(--te-slate-200); margin: 4px 0; }

.te-sum-st {
  padding: 10px 16px;
  border-top: 1px solid var(--te-slate-100);
  .te-sum-sl {
    font-size: 10.5px; color: var(--te-slate-400);
    text-transform: uppercase; font-weight: 600; margin-bottom: 5px;
  }
  gb-combobox { display: block; width: 100%; }
}

// ── Shared disabled ───────────────────────────────────────
.disabled { opacity: .25; }

// ── Responsive ────────────────────────────────────────────
@media (max-width: 1100px) {
  .te-layout { grid-template-columns: 1fr; }
  .te-right  { position: static; flex-direction: row; flex-wrap: wrap; }
  .te-sum-c  { flex: 1; min-width: 220px; }
}

@media (max-width: 700px) {
  .te-fg      { grid-template-columns: 1fr; }
  .te-act-row { grid-template-columns: 22px 1fr 28px; }
  .FormOverView { padding: 12px 14px 32px; }
}
