
:root {
  /* --brand-navy: #0D2E4D; */
  --brand-navy: #135EAB;
  --brand-lime: #7CC142;
  --brand-lime-text: #FFFFFF;
  --brand-muted: #5A6B7C;
  --brand-nav-muted: #6B7A88;
  --brand-dark-muted: #D3DEE8;
  --brand-status-bg: #E8F4DC;
  --brand-status-text: #2F5A1A;
  --brand-label: #7CC142;
  --surface: #E7EEF3;
  --card: #FFFFFF;
}

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  /* font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; */
  font-family: Poppins, sans-serif;
  background: var(--surface);
  color: var(--brand-navy);
  height: 100dvh;
  box-sizing: border-box;
  margin: 0;
}

.phone-shell {
  width: min(100%, 420px);
  max-width: 420px;
  height: 100%;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(13, 46, 77, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-header,
.bottom-nav {
  flex-shrink: 0;
}

.app-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.screen-host {
  min-height: 100%;
}

.login-screen-host {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-screen {
  width: 100%;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.brand-card {
  background: var(--brand-navy);
  color: white;
  box-shadow: 0 1px 4px rgba(13, 46, 77, 0.1);
}

.btn-primary {
  background: var(--brand-lime);
  color: var(--brand-lime-text);
  box-shadow: 0 1px 4px rgba(13, 46, 77, 0.1);
}

.btn-accent {
  background: var(--brand-lime);
  color: var(--brand-lime-text);
}

.soft-card {
  background: var(--card);
  border: 0;
  box-shadow: 0 1px 4px rgba(13, 46, 77, 0.1);
}

.soft-card h2,
.soft-card h3,
.metric-card p:last-child {
  color: var(--brand-navy);
}

.metric-card {
  background: var(--card);
  border: 0;
  box-shadow: 0 1px 4px rgba(13, 46, 77, 0.1);
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -44px;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  border: 18px solid rgba(124, 193, 66, 0.22);
}

.status-pill {
  border: 0;
  background: var(--brand-status-bg);
  color: var(--brand-lime);
}

.bottom-nav {
  min-height: 76px;
  border-top: 0;
  box-shadow: 0 -1px 4px rgba(13, 46, 77, 0.1);
  padding-bottom: 0.75rem;
}

/* body[data-screen="login"] .bottom-nav {
  display: none;
} */

.nav-btn.active {
  color: var(--brand-navy) !important;
}

.nav-btn.active .nav-icon-wrap {
  background: transparent;
  color: var(--brand-navy) !important;
  box-shadow: none;
}

.nav-btn {
  min-width: 0;
}

.workflow-tabs {
  padding-bottom: 0.25rem;
}

.workflow-tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 64px;
  border-radius: 16px;
  border: 1px solid rgba(13, 46, 77, 0.16);
  background: #FFFFFF;
  color: var(--brand-navy);
  padding: 0.75rem;
  box-shadow: 0 1px 4px rgba(13, 46, 77, 0.08);
}

.workflow-tab.active {
  border-color: var(--brand-lime);
  background: var(--brand-lime);
  color: #FFFFFF;
}

.workflow-tab-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 14px;
  background: #E8F4DC;
  color: var(--brand-navy);
}

.workflow-tab.active .workflow-tab-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

.workflow-tab-title,
.workflow-tab-subtitle {
  display: block;
}

.workflow-tab-title {
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.15;
}

.workflow-tab-subtitle {
  margin-top: 0.2rem;
  color: var(--brand-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.workflow-tab.active .workflow-tab-subtitle {
  color: rgba(255, 255, 255, 0.88);
}

.nav-btn span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

button {
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  transform: none;
  opacity: 0.58;
}

.upload-preview img,
.upload-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compact-upload {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.compact-upload:active {
  transform: scale(0.98);
}

.compact-preview > div {
  min-height: 0;
}

.video-preview-item {
  position: relative;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #FFFFFF;
  background: rgba(13, 46, 77, 0.18);
  pointer-events: none;
}

.video-play-overlay > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(13, 46, 77, 0.84);
}

.media-viewer-swal {
  overflow: hidden;
  border-radius: 16px !important;
}

.media-viewer-swal-html {
  margin: 0 !important;
  padding: 0 !important;
}

.media-viewer-close {
  color: #FFFFFF !important;
}

.media-viewer {
  width: 100%;
  color: #FFFFFF;
  background: #0D2E4D;
}

.media-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 44px 12px 14px;
}

.media-viewer-title {
  min-width: 0;
  overflow: hidden;
  color: #FFFFFF;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-viewer-download {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  background: var(--brand-lime);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  padding: 0 12px;
  text-decoration: none;
}

.media-viewer-stage {
  display: grid;
  max-height: min(74dvh, 620px);
  min-height: 220px;
  place-items: center;
  background: #061B2E;
}

.media-viewer-stage img,
.media-viewer-stage video {
  display: block;
  width: 100%;
  max-height: min(74dvh, 620px);
  object-fit: contain;
}

.media-viewer-stage video {
  background: #000000;
}

.signature-canvas {
  touch-action: none;
  background: #FFFFFF;
}

.map-grid {
  background:
    linear-gradient(90deg, rgba(13, 46, 77, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(13, 46, 77, 0.08) 1px, transparent 1px),
    var(--surface);
  background-size: 38px 38px;
}

.map-road {
  position: absolute;
  border-radius: 999px;
  background: rgba(124, 193, 66, 0.78);
}

.map-road.green {
  background: rgba(13, 46, 77, 0.62);
}

.star-btn.active,
.star-btn:hover {
  color: var(--brand-lime);
}

.otp-input:focus {
  border-color: var(--brand-lime);
  box-shadow: 0 0 0 3px rgba(124, 193, 66, 0.24);
  outline: none;
}

.text-slate-500,
.text-slate-600 {
  color: var(--brand-muted) !important;
}

.text-slate-400 {
  color: var(--brand-nav-muted) !important;
}

.brand-card .text-white\/75,
.brand-card .text-white\/70,
.brand-card .text-white\/80 {
  color: var(--brand-dark-muted) !important;
}

.ui-datepicker td.selected-date a {
    background: #7CC142;
    border-color: #7CC142;
    color: #fff;
}
