/* ══ Reisekosten / Travel Expenses Module Styles ══ */

/* ── Spinner Overlay ── */
.expSpinnerOverlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}
.expSpinnerBox {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.expSpinnerRing {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255,255,255,.15);
  border-top-color: #22c55e;
  border-radius: 50%;
  animation: expSpin .8s linear infinite;
}
@keyframes expSpin { to { transform: rotate(360deg); } }
.expSpinnerText {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  max-width: 260px;
}

#viewExpenses {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Panels scrollen intern, KPIs + Tabs bleiben fix */
#viewExpenses .expPanel {
  flex: 1;
  min-height: 0;
  overflow-y: scroll;
  scrollbar-width: none;
  padding-bottom: 16px;
}
#viewExpenses .expPanel::-webkit-scrollbar { display: none; }

/* Wizard: Steps + Nav fix, nur Content scrollt */
#expPanelWizard {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}
#expPanelWizard > section:first-child { flex-shrink: 0; } /* Step-Tabs */
#expStep1, #expStep2 {
  flex: 1;
  min-height: 0;
  overflow-y: scroll;
  scrollbar-width: none;
}
#expStep1::-webkit-scrollbar, #expStep2::-webkit-scrollbar { display: none; }
/* Die card pad Section innerhalb der Steps soll den ganzen Platz fuellen */
#expStep1 > .card.pad, #expStep2 > .card.pad {
  min-height: 100%;
  margin-top: 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}
#expStep1 > .card.pad > #expTripCardList { flex: 1; }
/* Zusammenfassung: Content fuellt den Platz, aber kein uebertriebener Abstand */
#expStep2 > .card.pad {
  display: flex;
  flex-direction: column;
}
#expStep2 #expSummaryTable { margin-top: 8px; }
#expStep2 .expTotalBar { margin-top: auto; } /* Total-Bar immer unten */
#expTripCardList { margin-top: 0; }
#expWizNav { flex-shrink: 0; } /* Nav bleibt unten */

/* Detail-View scrollbar */
#expPanelDetail {
  flex: 1;
  min-height: 0;
  overflow-y: scroll;
  scrollbar-width: none;
}
#expPanelDetail::-webkit-scrollbar { display: none; }

/* ── Filter Grid ── */
.expFilterGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 12px;
}
.expFilterGrid label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--mut);
  margin-bottom: 4px;
}
@media (max-width: 980px) {
  .expFilterGrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .expFilterGrid { grid-template-columns: 1fr; }
}

/* ── Form Grid (Wizard) ── */
.expFormGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}
.expFormGrid label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--mut);
  margin-bottom: 4px;
}
.expFormRow { min-width: 0; }
.expFormRow input[type="date"],
.expFormRow input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
  min-height: 38px;
  max-height: 38px;
  font-size: 14px;
  line-height: 1.2;
  box-sizing: border-box;
}
.expFormFull { grid-column: 1 / -1; }
.expFormGrid textarea.ctl { min-height: 70px; resize: vertical; }
@media (max-width: 600px) {
  .expFormGrid { grid-template-columns: 1fr; }
}

/* ── Category Quick-Add Cards ── */
.expCategoryGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.expCatCard {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 100px;
  padding: 16px 12px;
  border: 2px dashed rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  color: var(--mut);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.expCatCard {
  position: relative;
  overflow: hidden;
}
.expCatCard::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  padding: 2px;
  background: conic-gradient(
    from var(--tt-angle, 0deg),
    transparent 0%,
    rgba(139,92,246,.6) 10%,
    rgba(196,167,253,.8) 15%,
    rgba(139,92,246,.6) 20%,
    transparent 30%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: ttBorderSpin 3s linear infinite;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
.expCatCard:hover::before {
  opacity: 1;
}
.expCatCard:hover {
  border-color: transparent;
  background: rgba(139,92,246,.06);
  color: #8b5cf6;
  box-shadow: 0 0 20px rgba(139,92,246,.15);
  transform: translateY(-2px);
}
.expCatCard:active {
  transform: scale(.97);
  background: rgba(139,92,246,.12);
}
.expCatCard .expCatIcon {
  width: 32px;
  height: 32px;
  color: #3b82f6;
  transition: color .2s ease, transform .3s ease;
}
.expCatCard:hover .expCatIcon {
  color: #8b5cf6;
  animation: expIconPop .55s cubic-bezier(.2,.9,.2,1) 1;
}
@keyframes expIconPop {
  0%   { transform: translateY(0) scale(1); }
  45%  { transform: translateY(-4px) scale(1.18) rotate(-8deg); }
  75%  { transform: translateY(1px) scale(.97) rotate(2deg); }
  100% { transform: translateY(0) scale(1) rotate(0); }
}
html[data-theme=light] .expCatCard {
  border-color: rgba(0,0,0,.1);
  background: rgba(0,0,0,.02);
}
html[data-theme=light] .expCatCard:hover {
  border-color: transparent;
  background: rgba(139,92,246,.05);
  box-shadow: 0 0 16px rgba(139,92,246,.1);
}
html[data-theme=light] .expCatCard::before {
  background: conic-gradient(
    from var(--tt-angle, 0deg),
    transparent 0%,
    rgba(139,92,246,.4) 10%,
    rgba(139,92,246,.6) 15%,
    rgba(139,92,246,.4) 20%,
    transparent 30%
  );
}
@media (prefers-reduced-motion: reduce) {
  .expCatCard:hover { transform: none; }
  .expCatCard:hover .expCatIcon { animation: none; }
  .expCatCard::before { animation: none; }
}

/* ── Report Cards ── */
.expReportCard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-top: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
  transition: all .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.expReportCard:first-child { margin-top: 0; }
.expReportCard:hover {
  background: rgba(59,130,246,.06);
  border-color: rgba(59,130,246,.2);
}
.expReportCard:active { transform: scale(.995); }
.expRcLeft { flex: 1; min-width: 0; }
.expRcNo { font-weight: 700; font-size: 14px; color: var(--txt); }
.expRcPurpose { font-size: 13px; color: var(--mut); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expRcMeta { font-size: 12px; color: var(--mut); margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.expRcRight { text-align: right; flex-shrink: 0; }
.expRcAmount { font-weight: 700; font-size: 15px; color: var(--txt); }
html[data-theme=light] .expReportCard {
  background: rgba(0,0,0,.02);
  border-color: rgba(0,0,0,.06);
}
html[data-theme=light] .expReportCard:hover {
  background: rgba(59,130,246,.04);
  border-color: rgba(59,130,246,.15);
}

/* ── Status Chips ── */
.expStatusChip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.expStatusChip.st-draft {
  background: rgba(156,163,175,.15);
  color: #9ca3af;
}
.expStatusChip.st-submitted {
  background: rgba(245,158,11,.15);
  color: #f59e0b;
}
.expStatusChip.st-approved {
  background: rgba(34,197,94,.15);
  color: #22c55e;
}
.expStatusChip.st-rejected {
  background: rgba(239,68,68,.15);
  color: #ef4444;
}
.expStatusChip.st-user {
  background: rgba(139,92,246,.15);
  color: #8b5cf6;
}

/* ── Item Rows ── */
.expItemRow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-top: 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  flex-wrap: wrap;
}
.expItemRow:first-child { margin-top: 0; }
.expItemIcon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: #3b82f6;
}
.expItemInfo { flex: 1; min-width: 0; }
.expItemCat { font-size: 11px; font-weight: 600; text-transform: uppercase; color: #3b82f6; letter-spacing: .5px; }
.expItemDesc { font-size: 13px; color: var(--txt); margin-top: 2px; }
.expItemDate { font-size: 12px; color: var(--mut); }
.expItemAmount { font-weight: 700; font-size: 14px; color: var(--txt); flex-shrink: 0; white-space: nowrap; }
.expItemActions { display: flex; gap: 6px; flex-shrink: 0; }
.expItemDel {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: rgba(239,68,68,.12);
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.expItemDel:hover { background: rgba(239,68,68,.25); }
html[data-theme=light] .expItemRow {
  background: rgba(0,0,0,.02);
  border-color: rgba(0,0,0,.06);
}

/* ── Receipt Thumbnails ── */
.expReceiptGrid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  width: 100%;
}
.expReceiptThumb {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.1);
  cursor: pointer;
}
.expReceiptThumb > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.expMiniThumb > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
.expReceiptThumb .expThumbDel {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(239,68,68,.85);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Receipt Hover Preview (fixed position, not clipped by overflow) ── */
#expFloatPreview {
  position: fixed;
  width: 220px;
  height: 220px;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  border: 1px solid rgba(255,255,255,.15);
  z-index: 10000;
  pointer-events: none;
  object-fit: cover;
  background: var(--card);
  display: none;
}

/* ── Mini Thumbnails (Report + Approval Lists) ── */
.expMiniThumbs {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: nowrap;
  margin-top: 6px;
  overflow: visible;
}
.expMiniThumb {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 6px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.1);
  cursor: pointer;
  position: relative;
  transition: transform .15s, box-shadow .15s;
}
.expMiniThumb:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
  z-index: 2;
}
.expMiniThumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* hover preview handled by #expFloatPreview (JS-based, fixed position) */
.expMiniMore {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 6px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--mut);
}

/* ── Lightbox ── */
.expLightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.expLightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  cursor: default;
}
.expLbClose {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  font-size: 20px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.expLbClose:hover {
  background: rgba(255,255,255,.2);
}

/* ── Meal Banner ── */
.expMealBanner {
  background: rgba(34,197,94,.06) !important;
  border-left: 3px solid #22c55e;
}
html[data-theme=light] .expMealBanner {
  background: rgba(34,197,94,.05) !important;
}

/* ── Total Bar ── */
.expTotalBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  margin-top: 18px;
  border-radius: 10px;
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.2);
  font-weight: 700;
  font-size: 16px;
}
html[data-theme=light] .expTotalBar {
  background: rgba(59,130,246,.05);
  border-color: rgba(59,130,246,.15);
}

/* ── Wizard Nav: Abstand nach oben + solider Hintergrund ── */
#expWizNav {
  margin-top: 18px;
}

/* ── Analytics KPI Cards ── */
.expAnaKpi {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  text-align: center;
}
.expAnaKpiLabel { font-size: 12px; font-weight: 600; color: var(--mut); text-transform: uppercase; letter-spacing: .5px; }
.expAnaKpiVal { font-size: 22px; font-weight: 800; color: var(--txt); margin-top: 6px; }
html[data-theme=light] .expAnaKpi { background: rgba(0,0,0,.02); border-color: rgba(0,0,0,.06); }
@media (max-width: 768px) {
  #expAnaKpis { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 480px) {
  #expAnaKpis { grid-template-columns: 1fr !important; }
}

/* ── Analytics: User Cards with Category Breakdown ── */
.expAnaUserCard {
  padding: 16px 18px;
  margin-top: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
}
.expAnaUserCard:first-child { margin-top: 0; }
.expAnaUserHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
html[data-theme=light] .expAnaUserCard {
  background: rgba(0,0,0,.015);
  border-color: rgba(0,0,0,.06);
}

/* ── Buttons: alle nutzen qcCameraBtn aus qc.css ── */

/* ── Wizard Step-Tabs: Lila/Violett statt Blau ── */
#expStepTabs .ttTab.active {
  background: rgba(139,92,246,.15);
  color: #8b5cf6;
  border-color: transparent;
  box-shadow: 0 0 14px rgba(139,92,246,.3), inset 0 0 10px rgba(139,92,246,.06);
}
#expStepTabs .ttTab.active::before {
  background: conic-gradient(
    from var(--tt-angle),
    transparent 0%,
    rgba(139,92,246,.6) 10%,
    rgba(196,167,253,.8) 15%,
    rgba(139,92,246,.6) 20%,
    transparent 30%
  );
}
#expStepTabs .ttTab:hover:not(.active):not(.done) {
  background: rgba(139,92,246,.08);
  border-color: rgba(139,92,246,.25);
  color: #8b5cf6;
}
html[data-theme=light] #expStepTabs .ttTab.active {
  background: rgba(139,92,246,.12);
  color: #8b5cf6;
  box-shadow: 0 0 10px rgba(139,92,246,.15), inset 0 0 8px rgba(139,92,246,.04);
}
html[data-theme=light] #expStepTabs .ttTab.active::before {
  background: conic-gradient(
    from var(--tt-angle),
    transparent 0%,
    rgba(139,92,246,.4) 10%,
    rgba(139,92,246,.6) 15%,
    rgba(139,92,246,.4) 20%,
    transparent 30%
  );
}
html[data-theme=light] #expStepTabs .ttTab:hover:not(.active):not(.done) {
  background: rgba(139,92,246,.06);
  border-color: rgba(139,92,246,.2);
}

/* ── Abgeschlossene Steps: Gruen ── */
#expStepTabs .ttTab.done {
  background: rgba(34,197,94,.12);
  color: #22c55e;
  border-color: rgba(34,197,94,.25);
}
#expStepTabs .ttTab.done::before {
  background: conic-gradient(
    from var(--tt-angle),
    transparent 0%,
    rgba(34,197,94,.5) 10%,
    rgba(134,239,172,.7) 15%,
    rgba(34,197,94,.5) 20%,
    transparent 30%
  );
}
#expStepTabs .ttTab.done .expStepNum {
  background: rgba(34,197,94,.25);
  color: #22c55e;
}
html[data-theme=light] #expStepTabs .ttTab.done {
  background: rgba(34,197,94,.08);
  color: #16a34a;
  border-color: rgba(34,197,94,.2);
}
html[data-theme=light] #expStepTabs .ttTab.done::before {
  background: conic-gradient(
    from var(--tt-angle),
    transparent 0%,
    rgba(34,197,94,.35) 10%,
    rgba(34,197,94,.5) 15%,
    rgba(34,197,94,.35) 20%,
    transparent 30%
  );
}

/* ── Step Numbers ── */
.expStepNum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
#expStepTabs .ttTab.active .expStepNum {
  background: rgba(139,92,246,.25);
  color: #8b5cf6;
}
#expStepTabs .ttTab .expStepNum {
  transition: all .2s ease;
}

/* ── Badge (approval count) ── */
.expBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* ── Count Tag ── */
.expCount {
  font-size: 12px;
  font-weight: 600;
  color: var(--mut);
  margin-left: 8px;
}

/* ── Month Header (Berichtsliste Gruppierung) ── */
.expMonthHeader {
  padding: 12px 16px;
  margin-top: 20px;
  margin-bottom: 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--txt);
  letter-spacing: -.3px;
  border-bottom: 2px solid rgba(139,92,246,.25);
}
.expMonthHeader:first-child { margin-top: 0; }
html[data-theme=light] .expMonthHeader {
  border-bottom-color: rgba(139,92,246,.2);
}

/* ── Month Badge on Report Card ── */
.expMonthBadge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(139,92,246,.1);
  color: #8b5cf6;
  margin-left: 8px;
}

/* ── Deadline Button (in Menue-Zeile, pulsierend) ── */
.expDeadlineBtn {
  pointer-events: none;
  cursor: default;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
.expDeadlineBtn.dl-green {
  background: rgba(34,197,94,.12) !important;
  color: #22c55e !important;
  border-color: rgba(34,197,94,.25) !important;
  animation: expDlPulseGreen 2.5s ease-in-out infinite;
}
.expDeadlineBtn.dl-yellow {
  background: rgba(245,158,11,.12) !important;
  color: #f59e0b !important;
  border-color: rgba(245,158,11,.25) !important;
  animation: expDlPulseYellow 2s ease-in-out infinite;
}
.expDeadlineBtn.dl-red {
  background: rgba(239,68,68,.12) !important;
  color: #ef4444 !important;
  border-color: rgba(239,68,68,.3) !important;
  animation: expDlPulseRed 1.5s ease-in-out infinite;
}
@keyframes expDlPulseGreen {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
  50% { box-shadow: 0 0 12px 3px rgba(34,197,94,.2); }
}
@keyframes expDlPulseYellow {
  0%,100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
  50% { box-shadow: 0 0 12px 3px rgba(245,158,11,.25); }
}
@keyframes expDlPulseRed {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
  50% { box-shadow: 0 0 14px 4px rgba(239,68,68,.3); }
}
@media (prefers-reduced-motion: reduce) {
  .expDeadlineBtn { animation: none !important; }
}

/* ── Trip Cards (Wizard Step 1) ── */
#expTripCardList { width: 100%; }
.expTripCard {
  margin-top: 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.06);
  width: 100%;
  box-sizing: border-box;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01)),
    var(--card);
  overflow: hidden;
}
.expTripCardHead {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.expTripCardHead:hover { background: rgba(139,92,246,.04); }
/* Aufgeklappt: Head bekommt unteren Akzent-Border */
.expTripCard.open .expTripCardHead {
  background: rgba(139,92,246,.04);
  border-bottom: 2px solid rgba(139,92,246,.2);
}
.expTripCardIcon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(139,92,246,.1);
  color: #8b5cf6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.expTripCardIcon svg { width: 20px; height: 20px; }
.expTripCardInfo { flex: 1; min-width: 0; }
.expTripCardTitle { font-weight: 700; font-size: 14px; color: var(--txt); }
.expTripCardSub { font-size: 13px; color: var(--mut); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.expTripCardAmount { font-weight: 700; font-size: 15px; color: var(--txt); flex-shrink: 0; text-align: right; }
.expTripCardChevron {
  width: 20px; height: 20px; color: var(--mut); flex-shrink: 0;
  transition: transform .2s ease;
}
.expTripCard.open .expTripCardChevron { transform: rotate(180deg); }
.expTripCard.open .expTripCardAmount { color: #8b5cf6; }
.expTripCardBody {
  display: none;
  padding: 18px;
  border-top: 1px solid rgba(255,255,255,.04);
  width: 100%;
  box-sizing: border-box;
}
.expTripCard.open .expTripCardBody { display: block; }
.expTripCardBody .expCategoryGrid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  width: 100%;
}
.expTripCardActions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
html[data-theme=light] .expTripCard {
  border-color: rgba(0,0,0,.06);
  background: var(--card);
}
html[data-theme=light] .expTripCardHead:hover { background: rgba(139,92,246,.03); }
html[data-theme=light] .expTripCardBody { border-top-color: rgba(0,0,0,.04); }

/* ── Trip Form (inside card or modal) ── */
.expTripForm {
  padding: 18px;
  border-top: 1px solid rgba(255,255,255,.04);
}

/* ── Empty States ── */
.expEmpty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--mut);
  text-align: center;
  gap: 12px;
}
.expEmpty p { font-size: 14px; margin: 0; }

/* ── Modal ── */
.expModalOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.expModalContent {
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  scrollbar-width: none;
}
.expModalContent::-webkit-scrollbar { display: none; }

/* ── Approval Card ── */
.expApprovalCard {
  padding: 16px 18px;
  margin-top: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}
.expApprovalCard:first-child { margin-top: 0; }
.expAcHeader { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.expAcUserBig { font-weight: 700; font-size: 16px; color: var(--txt); }
.expAcNo { font-weight: 600; font-size: 13px; color: var(--mut); }
.expAcDetails { margin-top: 10px; font-size: 13px; color: var(--mut); }
.expAcAmount { font-weight: 700; font-size: 16px; color: var(--txt); margin-top: 8px; }
.expAcActions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
html[data-theme=light] .expApprovalCard {
  background: rgba(0,0,0,.02);
  border-color: rgba(0,0,0,.06);
}

/* ── Summary Table ── */
.expSumTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
.expSumTable col.c1 { width: 6%; }
.expSumTable col.c2 { width: 20%; }
.expSumTable col.c3 { width: 20%; }
.expSumTable col.c4 { width: 22%; }
.expSumTable col.c5 { width: 16%; }
.expSumTable col.c6 { width: 16%; }
.expSumTable th {
  text-align: left;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 12px;
  color: var(--mut);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.expSumTable td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: var(--txt);
}
.expSumTable tr:last-child td { border-bottom: none; }
html[data-theme=light] .expSumTable th { border-bottom-color: rgba(0,0,0,.08); }
html[data-theme=light] .expSumTable td { border-bottom-color: rgba(0,0,0,.04); }

/* ── Detail Trip Info ── */
.expDetailGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
.expDetailField { }
.expDetailLabel { font-size: 12px; font-weight: 600; color: var(--mut); }
.expDetailValue { font-size: 14px; color: var(--txt); margin-top: 2px; }
@media (max-width: 600px) {
  .expDetailGrid { grid-template-columns: 1fr; }
}

/* ── Upload: nutzt qcCameraBtn + qcDropZone aus qc.css ── */
/* DropZone im Modal: gleiche Hoehe wie Buttons, fuellt restliche Breite */
#expDropZone {
  flex: 1;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (pointer: coarse) {
  #expDropZone { display: none !important; }
}

/* ── AMap Distance Button ── */
.expCalcDistBtn {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; cursor: pointer;
  background: rgba(59,130,246,.08);
  border: 2px solid rgba(59,130,246,.3);
  color: #3b82f6;
  transition: all .2s;
}
.expCalcDistBtn:hover:not(:disabled) {
  background: rgba(59,130,246,.15);
  box-shadow: 0 2px 8px rgba(59,130,246,.2);
}
.expCalcDistBtn:active:not(:disabled) { transform: scale(.95); }
.expCalcDistBtn:disabled { opacity: .5; cursor: not-allowed; }
.expCalcDistBtn.loading { animation: expDistPulse 1s ease-in-out infinite; }
@keyframes expDistPulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.expDistHint {
  margin-top: 6px; padding: 6px 10px;
  font-size: .82rem; line-height: 1.4;
  border-radius: 8px;
  background: rgba(59,130,246,.06);
  color: var(--mut, #888);
}

/* ══════════════════════════════════════════════════════════════
   iPad / Touch / Mobile Optimizations
   ══════════════════════════════════════════════════════════════ */

/* ── Touch Targets: min 44px (Apple HIG / WCAG) ── */
@media (pointer: coarse) {
  /* Buttons */
  .expItemDel { min-width: 44px; min-height: 44px; width: 44px; height: 44px; font-size: 16px; }
  .expThumbDel { min-width: 32px; min-height: 32px; width: 32px; height: 32px; font-size: 16px; top: -4px; right: -4px; }
  .expCalcDistBtn { width: 48px; height: 48px; }
  .expAcActions { gap: 12px; }
  .expAcActions button { min-height: 48px; padding: 10px 18px; }
  .expCatCard { padding: 18px 14px; min-height: 90px; }
  .expMiniMore { width: 44px; height: 44px; min-width: 44px; font-size: 13px; }

  /* Form Inputs */
  .expFormRow input[type="date"],
  .expFormRow input[type="time"],
  .expFormGrid input,
  .expFormGrid select,
  .expFormGrid textarea.ctl { min-height: 44px; font-size: 16px; }

  /* Cards: more padding for comfortable tapping */
  .expApprovalCard { padding: 18px 20px; }
  .expReportCard { padding: 16px 18px; }
  .expTripCardHead { padding: 18px 20px; }
  .expItemRow { padding: 14px 16px; }

  /* Modal edge spacing */
  .expModalOverlay { padding: 16px; }

  /* Receipt thumbnails */
  .expReceiptThumb { width: 80px; height: 80px; }
  .expMiniThumb { width: 44px; height: 44px; min-width: 44px; }

  /* Smooth scrolling on iOS */
  .expPanel { -webkit-overflow-scrolling: touch; }
  #expStep1, #expStep2 { -webkit-overflow-scrolling: touch; }

  /* Navigation buttons */
  .expWizNav .btn { min-height: 48px; padding: 10px 20px; font-size: 14px; }
}

/* ── Desktop-only hover effects ── */
@media (hover: hover) and (pointer: fine) {
  .expReportCard:hover { background: rgba(59,130,246,.06); border-color: rgba(59,130,246,.2); }
  .expTripCardHead:hover { background: rgba(139,92,246,.04); }
  .expCatCard:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
  .expCalcDistBtn:hover:not(:disabled) { background: rgba(59,130,246,.15); box-shadow: 0 2px 8px rgba(59,130,246,.2); }
}
/* Remove hover effects from base styles (now desktop-only above) */
@media (pointer: coarse) {
  .expReportCard:hover { background: inherit; border-color: inherit; }
  .expReportCard:active { background: rgba(59,130,246,.06); }
  .expCatCard:hover { transform: none; box-shadow: none; }
  .expCatCard:active { transform: scale(.97); }
}

/* ── Safe Area Insets (iPhone Notch / Dynamic Island) ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .expModalOverlay { padding-bottom: env(safe-area-inset-bottom); }
  .expWizNav { padding-bottom: env(safe-area-inset-bottom); }
  .expSpinnerOverlay { padding-bottom: env(safe-area-inset-bottom); }
}

/* ── Tablet landscape ── */
@media (max-width: 1024px) and (orientation: landscape) {
  .expModalContent { max-height: 90vh; }
}

/* ── Small phones (< 480px) ── */
@media (max-width: 480px) {
  .expCategoryGrid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
  .expCatCard { padding: 14px 10px; }
  .expAcHeader { font-size: 14px; }
  .expAcActions { flex-direction: column; }
  .expAcActions button { width: 100%; justify-content: center; }
  .expKpiCard { padding: 14px 12px; }
}

html[data-theme=light] .expCalcDistBtn {
  background: rgba(59,130,246,.05);
  border-color: rgba(59,130,246,.2);
}
html[data-theme=light] .expDistHint {
  background: rgba(59,130,246,.04);
}

/* ── Toast: inline gestyled wie QC-Modul (zentriert, backdrop-blur) ── */
