/* OperatorCore mobile visual system — Development preview */
@media (max-width: 760px) {
  :root {
    --mobile-radius: 20px;
    --mobile-shadow: 0 16px 40px rgba(13, 18, 84, .10);
  }

  body {
    background:
      radial-gradient(circle at 100% 0, rgba(8, 191, 211, .13), transparent 24rem),
      linear-gradient(180deg, #f7fbfd 0, #edf5f8 100%);
    font-family: Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  .wrap {
    width: min(100% - 24px, 720px);
    padding: 18px 0 54px;
  }

  .portal-head,
  .calculator-head,
  .account-head,
  .guide-head,
  .study-head {
    margin: 0 -12px 16px;
    padding: 24px 20px 72px;
    overflow: hidden;
    border-radius: 0 0 28px 28px;
    background: linear-gradient(145deg, #fff 0%, #edf9fc 100%);
    box-shadow: 0 14px 36px rgba(13, 18, 84, .08);
  }

  .portal-head::after,
  .calculator-head::after,
  .account-head::after,
  .guide-head::after,
  .study-head::after {
    content: "";
    position: absolute;
    right: -35px;
    top: -42px;
    width: 142px;
    height: 142px;
    border: 22px solid rgba(8, 191, 211, .11);
    border-radius: 50%;
    pointer-events: none;
  }

  .operatorcore-logo { width: min(340px, 92%) !important; }
  h1 { font-size: clamp(2rem, 9vw, 2.65rem); line-height: 1.05; letter-spacing: -.035em; }
  h2 { letter-spacing: -.02em; }
  .subtitle, p { line-height: 1.55; }

  .app-menu {
    position: sticky;
    z-index: 50;
    top: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 20px;
    padding: 7px;
    border: 1px solid rgba(195, 216, 227, .8);
    border-radius: 18px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 30px rgba(13, 18, 84, .12);
    backdrop-filter: blur(14px);
  }

  .app-home,
  .app-menu summary {
    min-height: 50px;
    border: 0;
    border-radius: 13px;
    box-shadow: none;
  }

  .app-home::before { content: "⌂"; margin-right: 8px; font-size: 1.25rem; }
  .app-menu summary::before { content: "☰"; font-size: 1rem; }
  .app-menu summary::after { margin-left: auto; }
  .app-mobile-menu { min-width: 0; }
  .app-mobile-menu[open] summary { border-radius: 13px 13px 7px 7px; }

  .app-menu-links {
    position: fixed;
    z-index: 80;
    top: 78px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100svh - 96px);
    padding: 10px;
    overflow: auto;
    transform: none;
    border: 1px solid #d5e4eb;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(13, 18, 84, .24);
  }

  .app-menu-links a {
    display: flex;
    align-items: center;
    min-height: 52px;
    margin: 2px 0;
    padding: 12px 14px;
    border-radius: 12px;
  }

  .app-menu-links a::before,
  .resource-card::before,
  .category-link::before,
  .bench-card::before {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    margin-right: 12px;
    border-radius: 11px;
    background: linear-gradient(145deg, #e2f7fb, #dcecff);
    color: #0d1254;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
  }

  .app-menu-links a[href="/"]::before { content: "↗"; }
  .app-menu-links a[href*="dashboard"]::before { content: "▦"; }
  .app-menu-links a[href*="assets"]::before { content: "◫"; }
  .app-menu-links a[href*="calculators"]::before { content: "∑"; }
  .app-menu-links a[href*="helpful-links"]::before { content: "↗"; }
  .app-menu-links a[href*="maintenance"]::before { content: "⚙"; }
  .app-menu-links a[href*="account"]::before { content: "●"; }
  .app-menu-links a[href*="bench-sheets"]::before { content: "✓"; }
  .app-menu-links a[href*="weather"]::before { content: "☂"; }
  .app-menu-links a[href*="work-orders"]::before { content: "≡"; }
  .app-menu-links a[href*="service-request"]::before { content: "⚑"; }
  .app-menu-links a[href*="microbiology"]::before { content: "⌾"; }

  /* Navigation labels stay text only; home cards use their single SVG icon. */
  .app-menu-links a::before,
  .app-menu summary::before,
  .resource-card::before {
    content: none !important;
    display: none !important;
  }

  .panel,
  .account-panel,
  .bench-section,
  .bench-form,
  .sop-card,
  .work-order-card,
  .resource-card,
  .prepare-card,
  .category-link,
  .photo-intro {
    border: 1px solid rgba(204, 222, 231, .9) !important;
    border-radius: var(--mobile-radius);
    box-shadow: var(--mobile-shadow) !important;
  }

  .panel,
  .account-panel,
  .bench-section,
  .bench-form,
  .sop-card { padding: 20px !important; }

  .resource-grid { gap: 14px !important; }
  .resource-card,
  .category-link,
  .bench-card {
    position: relative;
    padding: 20px !important;
    overflow: hidden;
  }

  .resource-card::before,
  .category-link::before,
  .bench-card::before {
    width: 48px;
    height: 48px;
    margin: 0 0 16px;
    border-radius: 15px;
    background: linear-gradient(145deg, #0d1254, #0879c8);
    color: #fff;
    box-shadow: 0 8px 18px rgba(8, 121, 200, .24);
  }

  .resource-card[href*="calculators"]::before { content: "∑"; }
  .resource-card[href*="assets"]::before { content: "◫"; }
  .resource-card[href*="bench-sheets"]::before { content: "✓"; }
  .resource-card[href*="maintenance"]::before { content: "⚙"; }
  .resource-card[href*="service-request"]::before { content: "⚑"; }
  .resource-card[href*="microbiology"]::before { content: "⌾"; }
  .resource-card[href*="helpful-links"]::before { content: "↗"; }
  .resource-card[href*="subscribe"]::before { content: "+"; }
  .category-link::before { content: "▤"; }
  .bench-card::before { content: "✓"; }

  .resource-card::after,
  .category-link::after {
    content: "→";
    position: absolute;
    right: 18px;
    top: 20px;
    color: #0879c8;
    font-size: 1.35rem;
    font-weight: 900;
  }

  .button,
  button,
  input[type="submit"] {
    min-height: 50px;
    border-radius: 13px !important;
    font-weight: 800;
  }

  input,
  select,
  textarea {
    min-height: 50px;
    border-radius: 12px !important;
    border-color: #b9ced9 !important;
    background-color: #fff !important;
  }

  textarea { min-height: 120px; }
  label { line-height: 1.4; }

  .dashboard-head {
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0d1254, #0879c8);
    color: #fff;
    box-shadow: 0 16px 38px rgba(13, 18, 84, .22);
  }
  .dashboard-head .eyebrow { color: #9fe9f2; }
  .dashboard-head p:last-child { color: #d9f3f7; }
  .dashboard-weather { overflow: hidden; border-top: 6px solid #08bfd3 !important; }
  .dashboard-weather::before { content: "☂  LIVE FACILITY CONDITIONS"; display: block; margin: -20px -20px 18px; padding: 13px 20px; background: #e6f8fb; color: #0d1254; font-size: .72rem; font-weight: 900; letter-spacing: .10em; }

  .dashboard-stats { gap: 10px !important; }
  .dashboard-stat {
    min-height: 126px;
    padding: 18px !important;
    border-radius: 18px;
    background: linear-gradient(145deg, #101761, #0879c8) !important;
    box-shadow: 0 12px 28px rgba(13, 18, 84, .18);
  }
  .dashboard-stat:nth-child(2) { background: linear-gradient(145deg, #075f8e, #08aebe) !important; }
  .dashboard-stat strong { font-size: 2.35rem !important; }
  .weather-summary { gap: 9px !important; }
  .weather-summary article { min-height: 104px; padding: 14px !important; border-radius: 15px; background: linear-gradient(160deg, #fff, #f1f9fb) !important; }
  .weather-summary strong { font-size: 1.35rem !important; }

  .work-order-card { border-left: 1px solid rgba(204, 222, 231, .9) !important; border-top: 6px solid #08bfd3 !important; }
  .work-order-card h2 { font-size: 1.25rem; }
  .work-order-actions { gap: 10px !important; }

  .table-wrap,
  .weather-scroll,
  .work-order-table {
    margin-inline: -20px;
    padding: 0 20px 8px;
    scrollbar-width: thin;
  }

  table { font-size: .92rem; }
  th { white-space: nowrap; }

  .organization-admin-nav {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 9px !important;
  }
  .organization-admin-nav .button { display: grid; place-items: center; padding: 10px; font-size: .85rem; }

  footer { padding-bottom: max(30px, env(safe-area-inset-bottom)) !important; }
}

@media (max-width: 390px) {
  .wrap { width: min(100% - 18px, 720px); }
  .dashboard-stats, .weather-summary { grid-template-columns: 1fr 1fr !important; }
  .organization-admin-nav { grid-template-columns: 1fr; }
}

/* Field-operations visual language */
.asset-area-card,
.asset-collection-card,
.asset-record,
.work-order-card,
.maintenance-form-card,
.category-link,
.bench-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(13, 18, 84, .08);
}

.asset-area-card::before,
.asset-collection-card::before,
.asset-record::before,
.work-order-card::before {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 0 14px;
  border-radius: 12px;
  background: linear-gradient(145deg, #0d1254, #0879c8);
  color: #fff;
  box-shadow: 0 8px 18px rgba(8, 121, 200, .22);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.asset-area-card::before { content: "⌂"; }
.asset-collection-card::before { content: "⚙"; }
.asset-record::before { content: "◫"; }
.work-order-card::before { content: "✓"; }

.asset-area-card::after,
.asset-collection-card::after {
  content: "→";
  position: absolute;
  top: 22px;
  right: 22px;
  color: #0879c8;
  font-size: 1.25rem;
  font-weight: 900;
}

.asset-id-summary {
  border: 0 !important;
  border-radius: 14px;
  background: linear-gradient(145deg, #0d1254, #172878) !important;
  color: #fff;
  box-shadow: 0 12px 26px rgba(13, 18, 84, .18);
}

.asset-id-summary output,
.asset-id-summary strong {
  color: #fff !important;
}

.asset-id-summary output {
  font-weight: 800;
  letter-spacing: .035em;
}

.status {
  border: 1px solid #e8d89b;
  border-radius: 999px !important;
  box-shadow: none;
  letter-spacing: .02em;
}

.saved {
  border: 1px solid #bfe1ca;
  border-left: 5px solid #24844c !important;
  border-radius: 10px;
}

.error,
.account-error,
.form-error,
.dashboard-error {
  border: 1px solid #efc4c4;
  border-left: 5px solid #b72828 !important;
  border-radius: 10px;
}

.asset-map-panel,
.dashboard-weather {
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(13, 18, 84, .08);
}

.asset-map-panel {
  border-top: 6px solid #08bfd3 !important;
}

.dashboard-list strong,
.work-order-card h2,
.asset-record h3 {
  overflow-wrap: anywhere;
  color: #0d1254;
}

@media (max-width: 760px) {
  .asset-area-card,
  .asset-collection-card,
  .asset-record,
  .work-order-card,
  .maintenance-form-card,
  .category-link,
  .bench-card {
    border-radius: 18px !important;
  }

  .asset-area-card,
  .asset-collection-card,
  .asset-record,
  .work-order-card {
    display: block !important;
    padding: 20px !important;
  }

  .asset-record .asset-card-actions,
  .work-order-actions {
    margin-top: 16px;
  }

  .asset-card-actions .button,
  .asset-card-actions a,
  .work-order-actions .button,
  .work-order-actions button {
    min-height: 48px;
  }

  .asset-map-stage {
    border-radius: 14px;
  }

  .asset-map-stage .asset-map-marker {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    padding: 0 !important;
    border-radius: 50% !important;
  }

  .asset-map-stage .asset-map-marker::after {
    content: "";
    position: absolute;
    inset: -15px;
  }
}
