/* Shared date fields: retain existing markup and form semantics. */
.app-date-field { position: relative; min-width: 0; }
.app-date-field > [data-date-picker] { width: 100%; padding-right: 42px; background: var(--surface, #fff); cursor: pointer; }
.app-date-field > svg { position: absolute; top: 50%; right: 12px; width: 18px; height: 18px; color: var(--brand-dark, #14598f); pointer-events: none; transform: translateY(-50%); }

/* Lucian UX/UI Prompt #030 · scoped styling, mapped to AQUAONE theme. */
.u030 {
  --ux-page: var(--app-bg, #f4f7f9);
  --ux-surface: var(--surface, #fff);
  --ux-surface-2: var(--surface-muted, #f7f9fb);
  --ux-surface-3: var(--brand-soft, #eaf3fe);
  --ux-ink: var(--ink, #14212b);
  --ux-ink-2: var(--ink-soft, #64748b);
  --ux-ink-3: var(--ink-soft, #8a98a9);
  --ux-line: var(--line-soft, #edf1f5);
  --ux-line-2: var(--line, #dce4ec);
  --ux-accent: var(--brand, #1479e8);
  --ux-accent-soft: var(--brand-soft, #eaf3fe);
  --ux-accent-ink: #fff;
  --ux-mint: var(--success, #16834a);
  --ux-warn: var(--warning, #a66a0c);
  --ux-danger: var(--danger, #d9363e);
  --ux-shadow-strong: rgba(15,35,60,.28);
  --ux-ease: cubic-bezier(.2,.8,.2,1);
  --ux-spring: cubic-bezier(.34,1.45,.64,1);
  box-sizing: border-box;
  color: var(--ux-ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.u030 *, .u030 *::before, .u030 *::after { box-sizing: border-box; }
:root[data-theme="dark"] .u030, [data-theme="dark"] .u030 {
  color-scheme: dark;
  --ux-page: #07080d;
  --ux-surface: #13141c;
  --ux-surface-2: #1a1b25;
  --ux-surface-3: #252632;
  --ux-ink: #f4f0e8;
  --ux-ink-2: rgba(244,240,232,.68);
  --ux-ink-3: rgba(244,240,232,.42);
  --ux-line: rgba(255,255,255,.08);
  --ux-line-2: rgba(255,255,255,.16);
  --ux-accent: #7db4ff;
  --ux-accent-soft: rgba(125,180,255,.15);
  --ux-accent-ink: #0b0c12;
  --ux-mint: #7ee8c0;
  --ux-warn: #ffb26b;
  --ux-danger: #ff7d8c;
  --ux-shadow-strong: rgba(0,0,0,.72);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .u030 {
    color-scheme: dark;
    --ux-page: #07080d;
    --ux-surface: #13141c;
    --ux-surface-2: #1a1b25;
    --ux-surface-3: #252632;
    --ux-ink: #f4f0e8;
    --ux-ink-2: rgba(244,240,232,.68);
    --ux-ink-3: rgba(244,240,232,.42);
    --ux-line: rgba(255,255,255,.08);
    --ux-line-2: rgba(255,255,255,.16);
    --ux-accent: #b7a4ff;
    --ux-accent-soft: rgba(183,164,255,.15);
    --ux-accent-ink: #0b0c12;
    --ux-mint: #7ee8c0;
    --ux-warn: #ffb26b;
    --ux-danger: #ff7d8c;
    --ux-shadow-strong: rgba(0,0,0,.72);
  }
}
.app-date-picker.u030 {
  position: fixed;
  z-index: 1500;
  width: min(350px, calc(100vw - 20px));
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  padding: 18px 16px 14px;
  border: 0;
  border-radius: 28px;
  background: var(--ux-surface);
  box-shadow: 0 0 0 1px var(--ux-line-2), 0 36px 70px -40px var(--ux-shadow-strong);
  font-size: 14px;
  line-height: 1.35;
  -webkit-tap-highlight-color: transparent;
}
.u030 :is(button,input) { font: inherit; color: inherit; }
.u030 button { cursor: pointer; }
.u030 button:focus-visible { outline: 2px solid var(--ux-accent); outline-offset: 2px; }
.u030 button:disabled { opacity: .32; cursor: not-allowed; }
.u030-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.u030-pills.is-single { grid-template-columns: 1fr; }
.u030-pill {
  min-width: 0;
  width: 100%;
  border: 0;
  text-align: left;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--ux-surface-2);
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: box-shadow .3s var(--ux-ease), background-color .3s;
}
.u030-pill small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--ux-ink-3); }
.u030-pill b { display: block; margin-top: 2px; min-height: 20px; font-size: 15.5px; font-weight: 740; font-variant-numeric: tabular-nums; }
.u030-pill b.ph { color: var(--ux-ink-3); font-weight: 600; }
.u030-pill.on { background: var(--ux-surface); box-shadow: inset 0 0 0 2px var(--ux-accent); }
.u030-top { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; }
.u030-m { position: relative; flex: 1; height: 24px; overflow: hidden; }
.u030-m span { position: absolute; inset: 0 auto auto 0; line-height: 24px; font-size: 16.5px; font-weight: 760; letter-spacing: -.03em; text-transform: capitalize; }
.u030-nav { display: flex; gap: 4px; }
.u030-nav button {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; padding: 0; border-radius: 50%;
  background: var(--ux-surface-2); color: var(--ux-ink);
  font-size: 24px; line-height: 1;
  transition: transform .35s var(--ux-spring), background-color .2s;
}
.u030-nav button:hover { background: var(--ux-surface-3); }
.u030-nav button:active { transform: scale(.88); }
.u030-wk { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; font-size: 12px; font-weight: 700; color: var(--ux-ink-3); text-align: center; }
.u030-wk span { display: grid; place-items: center; min-height: 24px; }
.u030-wk span:last-child { color: var(--ux-danger); }
.u030-view { position: relative; height: 276px; overflow: hidden; }
.u030-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(6, 1fr); row-gap: 2px; transition: transform .45s var(--ux-ease), opacity .35s var(--ux-ease); }
.u030-grid.is-entering.is-next { transform: translateX(100%); opacity: 0; }
.u030-grid.is-entering.is-prev { transform: translateX(-100%); opacity: 0; }
.u030-cell { position: relative; display: grid; place-items: center; }
.u030-cell::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; bottom: 5px; background: var(--ux-accent-soft); opacity: 0; transition: opacity .2s var(--ux-ease); }
.u030-cell.in::before { opacity: 1; }
.u030-cell.s::before { left: 50%; border-radius: 0; }
.u030-cell.e::before { right: 50%; }
.u030-cell.s.e::before { opacity: 0; }
.u030-cell:nth-child(7n+1).in::before { border-radius: 12px 0 0 12px; }
.u030-cell:nth-child(7n).in::before { border-radius: 0 12px 12px 0; }
.u030-d {
  position: relative; width: 40px; height: 40px;
  border: 0; padding: 0; border-radius: 50%;
  background: none; font-size: 14.5px; font-weight: 620;
  color: var(--ux-ink); font-variant-numeric: tabular-nums;
  transition: background-color .2s var(--ux-ease), color .2s, transform .35s var(--ux-spring);
}
.u030-d:hover:not(:disabled) { background: var(--ux-surface-2); }
.u030-d.past { color: var(--ux-ink-3); opacity: .55; }
.u030-d.today::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--ux-accent); }
.u030-cell.s .u030-d, .u030-cell.e .u030-d {
  background: var(--ux-accent); color: var(--ux-accent-ink); font-weight: 760;
  box-shadow: 0 8px 16px -8px var(--ux-shadow-strong); animation: u030-pick .4s var(--ux-spring);
}
.u030-cell.s .u030-d.today::after, .u030-cell.e .u030-d.today::after { background: var(--ux-accent-ink); }
@keyframes u030-pick { from { transform: scale(.7); } }
.u030-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 12px 4px 0; border-top: 1px solid var(--ux-line); }
.u030-sum { font-size: 13.5px; font-weight: 650; color: var(--ux-ink-2); }
.u030-ok {
  flex: 0 0 auto; height: 42px; padding: 0 18px; border: 0; border-radius: 13px;
  background: var(--ux-ink); color: var(--ux-page) !important; font-size: 14px; font-weight: 700;
  transition: opacity .3s, transform .35s var(--ux-spring);
}
.u030-ok:active { transform: scale(.95); }
.u030-quick { display: flex; justify-content: space-between; margin-top: 6px; }
.u030-quick button { min-height: 32px; border: 0; border-radius: 10px; padding: 5px 9px; background: transparent; color: var(--ux-accent); font-size: 12px; font-weight: 700; }
.u030-quick button:hover { background: var(--ux-accent-soft); }
@media (max-width: 420px) {
  .app-date-picker.u030 { padding: 14px 10px 10px; border-radius: 20px; }
  .u030-d { width: 38px; height: 38px; }
  .u030-view { height: 265px; }
}
@media (max-height: 560px) { .u030-view { height: 228px; } .u030-d { height: 34px; width: 34px; } }
@media (prefers-reduced-motion: reduce) {
  .u030, .u030 *, .u030 *::before, .u030 *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
