/* OMEOHS web theme, scoped to the integrated Stitch surfaces. */
:root {
  --stitch-canvas: #0b1326;
  --stitch-card: #131b2e;
  --stitch-line: #34445f;
  --stitch-text: #f2f6fc;
  --stitch-muted: #b6c4d9;
  --stitch-accent: #10b981;
  --stitch-danger: #ef4444;
}

.stitch-brand { display: inline-flex; align-items: center; max-width: 100%; }
.stitch-brand img { display: block; width: min(9rem, 100%); height: auto; }
.stitch-home, .stitch-workspace, .stitch-qr { background-color: var(--stitch-canvas); color: var(--stitch-text); }
.stitch-home { --surface-canvas: #0b1326; --surface-ground: #0b1326; }
.stitch-home main > section:first-child {
  background: radial-gradient(ellipse at 84% 15%, #164136 0%, transparent 55%), var(--stitch-canvas);
}
.stitch-home .ome-header { background: var(--stitch-card); }
.stitch-home .ome-header .masthead img { object-fit: contain; }
.stitch-home .ome-showcase { border-block-color: var(--stitch-line); }
.stitch-home .ome-demo-entry .ome-demo { background: var(--stitch-accent); color: #061d17; }

.stitch-workspace main,
.stitch-workspace:has(#panel:not([hidden])) main,
.stitch-workspace #accidents,
.stitch-workspace #accidents .site-nav,
.stitch-workspace #accidents [role="tabpanel"],
.stitch-workspace #section-records > #accident-summary,
.stitch-workspace #section-records > form {
  background: var(--stitch-card);
  border-color: var(--stitch-line);
}
.stitch-workspace .workspace-toolbar { padding-bottom: .85rem; border-bottom: 1px solid var(--stitch-line); }
.stitch-workspace .workspace-toolbar .stitch-brand { margin-inline-end: auto; }
.stitch-workspace #accidents .site-nav button[aria-selected="true"],
.stitch-workspace #worksite-ask-launch,
.stitch-workspace #login > button,
.stitch-qr button { background: var(--stitch-accent); color: #061d17; }
.stitch-workspace .site-summary > div { background: var(--stitch-canvas); border-color: var(--stitch-line); }

@media screen {
  .stitch-analytics {
    --color-bg: #0b1326;
    --color-panel: #131b2e;
    --color-border-line: #34445f;
    --color-ok: #10b981;
    --cds-surface-popover: #1b2940;
  }
}
.stitch-analytics .isg-panel-nav { background: var(--stitch-card); border-color: var(--stitch-line); }
.stitch-analytics .isg-panel-nav .stitch-brand { padding: .25rem 0; }
.stitch-analytics .isg-kpi { border-radius: .75rem; }

.stitch-workspace #worksite-ask-drawer,
.stitch-analytics #rp-pdf-preview {
  background: var(--stitch-card);
  color: var(--stitch-text);
  border: 1px solid var(--stitch-line);
  border-radius: 1rem;
}
.stitch-workspace #worksite-ask-drawer > button { float: inline-end; }
.stitch-workspace #worksite-ask-drawer > details { margin-block: 0 1.2rem; }
.stitch-workspace #ask-worksite ol { list-style: none; padding: 0; }
.stitch-workspace #ask-worksite ol li { margin-block: .75rem; }
.stitch-workspace #ask-worksite ol p {
  padding: .7rem .85rem;
  background: var(--stitch-canvas);
  border-radius: .65rem;
  margin: .35rem 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.stitch-workspace #ask-worksite ol p:last-child { border-inline-start: 2px solid var(--stitch-accent); }
.stitch-workspace #ask-worksite form button { min-height: 44px; }

.stitch-qr { color-scheme: dark; }
.stitch-qr .stitch-brand { margin-block: .5rem 1rem; }
.stitch-qr .kart { border-color: var(--stitch-line); background: var(--stitch-card); border-radius: 1rem; }
.stitch-qr :is(input, select, textarea) {
  color: var(--stitch-text);
  background: var(--stitch-canvas);
  border-color: #687b98;
  min-height: 48px;
}
.stitch-qr .not { color: var(--stitch-muted); }
.stitch-qr .not:first-of-type:not(:empty) { border-inline-start: 3px solid var(--stitch-accent); padding-inline-start: .75rem; }
.stitch-qr .hata { color: #ffaba9; border-inline-start: 3px solid var(--stitch-danger); padding-inline-start: .75rem; }
.stitch-qr button { min-height: 56px; cursor: pointer; }
.stitch-qr button:disabled { opacity: .65; cursor: wait; }

.stitch-analytics #rp-pdf-preview { width: min(62rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); box-sizing: border-box; }
#rp-pdf-preview::backdrop { background: #060e20d9; }
#rp-pdf-preview iframe { display: block; width: 100%; height: min(65dvh, 52rem); border: 0; background: #fff; }
#rp-pdf-preview .isg-bar { margin-block: .75rem; }

:is(.stitch-home, .stitch-workspace, .stitch-analytics, .stitch-qr) :focus-visible {
  outline: 2px solid #5de4b5;
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .stitch-workspace .workspace-toolbar .stitch-brand { flex-basis: 100%; }
  .stitch-workspace #worksite-ask-drawer {
    inset: auto 0 0;
    width: 100%;
    max-height: 85dvh;
    border-radius: 1rem 1rem 0 0;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  .stitch-workspace #accidents .site-nav { scrollbar-width: thin; }
  .stitch-workspace #accidents .site-nav button { min-height: 44px; }
}
@media print {
  #rp-pdf-preview { display: none; }
}
.stitch-dashboard-brand { margin: .65rem clamp(.85rem, 3vw, 2rem) 0; }
.stitch-analytics #demo-ask-drawer ol p { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .stitch-analytics #demo-ask-drawer { inset: auto 0 0; width: 100%; max-height: 85dvh; }
}
/* Give the dark-blue strokes of the original logo a readable background. */
.stitch-brand img, .stitch-home .masthead img, .stitch-home footer img[alt="OMEOHS Logo"] {
  background-color: #e6eff7;
  border-radius: .35rem;
  box-sizing: border-box;
  padding: .25rem;
}

/* Give reports and their explanatory copy separate space on screen. */
@media screen {
  :is(.stitch-home, .stitch-workspace, .stitch-analytics, [data-stitch-cockpit]) :is(p, label, summary, h1, h2, h3, h4) {
    overflow-wrap: anywhere;
  }

  :is(.stitch-home, .stitch-analytics, [data-stitch-cockpit]) :is(.stitch-table, .isg-tbl-wrap) {
    margin-block: 1rem;
    max-width: 100%;
  }

  .stitch-home .stitch-table table { min-width: 40rem; }
  .stitch-home .stitch-table th, .stitch-home .stitch-table td { padding: .75rem; vertical-align: top; }
  .stitch-workspace #scenario-results { max-width: 100%; overflow-x: auto; margin-block: 1rem; }
  .stitch-workspace #scenario-results table { margin-block: .75rem; }
  .stitch-workspace #scenario-results :is(th, td) { padding: .5rem .65rem; vertical-align: top; }
  .stitch-workspace .report-row { padding-block: 1rem; }
  .stitch-workspace .report-row p { margin-block: .45rem .75rem; line-height: 1.55; }
  .stitch-analytics #rp-pdf-preview { overflow: auto; }
  .stitch-analytics #rp-pdf-preview iframe { height: min(58dvh, 48rem); }

  .stitch-home .stitch-action {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    padding: .5rem .8rem;
    border: 1px solid var(--stitch-accent);
    border-radius: .5rem;
    color: #9cf0d1;
    line-height: 1.35;
    white-space: normal;
  }
  .stitch-home .stitch-action:hover { background: #163932; }
  [data-stitch-cockpit] header img[src="/logo-simgesi.png"] {
    width: 2rem;
    height: 1.7rem;
    object-fit: contain;
    background: #e6eff7;
    border-radius: .25rem;
  }
  [data-stitch-cockpit] :is(th, td) { padding-inline: .65rem; line-height: 1.45; }
}

@media screen and (max-width: 760px) {
  .stitch-home .ome-nav { gap: .35rem; }
  .stitch-home .ome-nav a { display: inline-flex; min-height: 44px; align-items: center; line-height: 1.35; }
  .stitch-home #cockpit-tabs button { min-width: 0; min-height: 44px; white-space: normal; }
  .stitch-home #cockpit-tabs > * { flex-basis: 100%; }
  .stitch-home #walkthrough-viewport { min-width: 0; }
  .stitch-workspace .report-actions > *, .stitch-analytics #rp-pdf-preview .isg-btn { min-height: 44px; }
  .stitch-analytics #rp-pdf-preview .isg-bar { gap: .5rem; }
  [data-stitch-cockpit] header { padding-inline: .75rem; }
  [data-stitch-cockpit] header > div:first-child { gap: .6rem; }
}

.stitch-home-menu > summary { display: none; }
@media screen and (max-width: 760px) {
  .stitch-home-menu { width: 100%; }
  .stitch-home-menu > summary {
    display: list-item;
    min-height: 44px;
    padding: .6rem .75rem;
    border: 1px solid var(--stitch-line);
    border-radius: .5rem;
    cursor: pointer;
    color: var(--stitch-text);
  }
  .stitch-home-menu .ome-nav { margin-block-start: .5rem; }
}

.stitch-cockpit-menu > summary { display: none; }
[data-stitch-cockpit]:not(.stitch-icons-ready) .material-symbols-outlined { display: none; }
[data-stitch-cockpit]:not(.stitch-icons-ready) :is(#btn-close-modal, #btn-close-rep-modal)::after { content: "×"; font-size: 1.25rem; }
.stitch-home { font-family: Inter, system-ui, sans-serif; }
.stitch-home :is(h1, h2, h3, .mastcopy strong) { font-family: "Space Grotesk", system-ui, sans-serif; }
.stitch-home .ome-showcase { max-width: 70rem; }
.stitch-home .ome-report-grid { gap: 1rem; }

@media screen and (max-width: 760px) {
  [data-stitch-cockpit] header { position: static; min-height: 4rem; height: auto; flex-wrap: wrap; gap: .5rem; }
  [data-stitch-cockpit] aside {
    position: static;
    width: auto;
    padding-block: .5rem;
    border-inline-end: 0;
    border-block-end: 1px solid var(--stitch-line);
  }
  [data-stitch-cockpit] aside > :last-child { margin-block-start: .75rem; }
  [data-stitch-cockpit] .stitch-cockpit-content { padding: 0; }
  [data-stitch-cockpit] main { min-width: 0; padding: .75rem; }
  [data-stitch-cockpit] main > section { min-width: 0; }
  [data-stitch-cockpit] main > section:first-child > :first-child { position: static; margin-inline: 0; padding-inline: 0; }
  [data-stitch-cockpit] main select { max-width: 100%; }
  .stitch-cockpit-menu > summary {
    display: list-item;
    padding: .65rem .75rem;
    min-height: 44px;
    border: 1px solid var(--stitch-line);
    border-radius: .5rem;
    cursor: pointer;
  }
  .stitch-cockpit-menu nav { margin-block-start: .5rem; }
}

@media screen {
  [data-stitch-cockpit] #modal-rep-body > section p { margin-block: .5rem 0; line-height: 1.55; }
  [data-stitch-cockpit] #modal-rep-body .stitch-table { overflow: auto; }
  .stitch-cockpit-table {
    width: 100%;
    min-width: 27rem;
    border-collapse: collapse;
    text-align: start;
  }
}

.stitch-home:not(.stitch-icons-ready) .material-symbols-outlined { display: none; }
