:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #d1d5db;
  --brand: #d62828;
  --brand-dark: #b71c1c;
  --accent: #d62828;
  --gold: #d4af37;
  --warning: #8a6d1d;
  --shadow: 0 18px 42px rgba(31, 41, 55, 0.08);
  --button-shadow: 0 4px 12px rgba(198, 40, 40, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.is-hidden {
  display: none !important;
}

.icon-sprite {
  display: none;
}

.svg-icon {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.presentation-view {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.auth-view {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.auth-panel {
  display: grid;
  width: min(540px, 100%);
  justify-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.auth-panel h1 {
  margin: 0;
  color: #5f6368;
  font-size: clamp(1.8rem, 5vw, 3rem);
}

.auth-panel h1 span {
  color: var(--brand);
}

.auth-panel p,
.auth-note {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-panel > p {
  font-size: 0.95rem;
  white-space: nowrap;
}

.auth-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 7px 12px;
}

.auth-status.is-live {
  border-color: rgba(25, 128, 64, 0.3);
  color: #198040;
}

.auth-copy {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.4;
  margin: 0;
}

.auth-form {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.auth-card {
  width: min(420px, 100%);
  text-align: left;
}

.auth-form h2 {
  margin: 0;
  color: var(--brand);
  font-size: 1.2rem;
}

.auth-switch {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.auth-switch button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 900;
  padding: 0;
  text-decoration: underline;
}

.recover-feedback {
  min-height: 22px;
  margin: 0;
  color: var(--brand);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.email-suggestion {
  display: block;
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(198, 40, 40, 0.22);
  border-radius: 8px;
  background: #fff6f6;
  color: var(--brand-dark);
  padding: 0 10px;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: left;
}

.presentation-brand {
  display: grid;
  width: min(560px, 100%);
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.ipc-logo {
  display: grid;
  justify-items: center;
  width: min(620px, 100%);
  color: #101820;
  text-align: center;
}

.ipc-logo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.ipc-logo > :not(img) {
  display: none;
}

.ipc-logo-icon {
  position: relative;
  display: grid;
  width: 116px;
  aspect-ratio: 1;
  place-items: start;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, #f20b0b 0%, #c70000 52%, #111b24 53%, #111b24 100%);
  box-shadow: 0 16px 34px rgba(17, 27, 36, 0.18);
}

.ipc-logo-icon span {
  position: relative;
  z-index: 2;
  margin: 33px 0 0 15px;
  color: #fff;
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1;
}

.ipc-logo-icon .road {
  position: absolute;
  right: 5px;
  bottom: 16px;
  width: 96px;
  height: 5px;
  transform: rotate(-31deg);
  transform-origin: right center;
  border-radius: 999px;
  background: #ffd54f;
}

.ipc-logo-icon .buildings {
  position: absolute;
  right: 8px;
  bottom: 34px;
  width: 42px;
  height: 50px;
  border-right: 4px solid #ffd54f;
  border-bottom: 4px solid #ffd54f;
  background:
    linear-gradient(to top, transparent 0 18px, #ffd54f 18px 22px, transparent 22px 100%) 0 100% / 12px 100% no-repeat,
    linear-gradient(to top, transparent 0 29px, #ffd54f 29px 33px, transparent 33px 100%) 14px 100% / 12px 100% no-repeat;
}

.ipc-logo-copy {
  display: grid;
  gap: 6px;
}

.ipc-logo-copy strong {
  display: block;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand);
  color: #101820;
  font-size: clamp(1.9rem, 5vw, 3.1rem);
  font-weight: 900;
  line-height: 1.04;
}

.ipc-logo-copy strong span,
.ipc-logo-copy strong em {
  color: #e00000;
  font-style: normal;
}

.ipc-logo-copy small {
  color: #777d84;
  font-size: clamp(0.8rem, 2.4vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-transform: uppercase;
}

.ipc-logo-auth {
  max-width: 500px;
}

.ipc-logo-hero {
  max-width: 680px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(198, 40, 40, 0.22);
}

.ipc-logo-auth .ipc-logo-icon,
.ipc-logo-sidebar .ipc-logo-icon {
  width: 76px;
  border-radius: 14px;
}

.ipc-logo-auth .ipc-logo-icon span,
.ipc-logo-sidebar .ipc-logo-icon span {
  margin: 22px 0 0 10px;
  font-size: 1.55rem;
}

.ipc-logo-auth .ipc-logo-copy strong {
  font-size: clamp(1.35rem, 5vw, 2.15rem);
}

.ipc-logo-sidebar {
  max-width: 280px;
}

.ipc-logo-sidebar .ipc-logo-copy strong {
  font-size: 1.35rem;
}

.ipc-logo-sidebar .ipc-logo-copy small {
  font-size: 0.63rem;
  letter-spacing: 0.12em;
}

.legacy-logo,
.legacy-logo + h1 {
  display: none !important;
}

.presentation-mark {
  display: grid;
  width: 108px;
  height: 108px;
  place-items: center;
  border-radius: 18px;
  background: var(--brand);
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.presentation-brand h1 {
  margin: 0;
  color: #5f6368;
  font-size: clamp(2rem, 7vw, 3.7rem);
  line-height: 1;
}

.presentation-brand h1 span {
  color: var(--brand);
}

.presentation-brand p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: min(520px, 100%);
  margin-top: 2px;
}

.feature-line {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 8px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.06);
}

.feature-line span {
  font-size: 1.35rem;
  line-height: 1;
}

.feature-line strong {
  font-size: 0.82rem;
}

.feature-line span {
  font-size: 1.35rem;
}

.feature-line strong {
  font-size: 0.98rem;
}

.sidebar-button {
  width: 100%;
  margin-top: 8px;
}

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
}

.sidebar,
.workspace {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 4px 10px;
}

.brand > .brand-mark,
.brand > div:not(.ipc-logo) {
  display: none;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.brand-name span {
  color: #5f6368;
}

.brand-name .brand-red {
  color: var(--brand);
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.panel h2,
.section-title h3 {
  margin: 0;
}

.brand h1 {
  font-size: 1.45rem;
}

.brand p,
.eyebrow,
.field span,
.section-title span,
.panel small {
  color: var(--muted);
}

.panel,
.composer,
.entry-surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.panel.compact {
  box-shadow: none;
}

.panel-header,
.topbar,
.section-title,
.entry-meta,
.entry-actions,
.site-row,
.stats-grid,
.media-grid {
  display: flex;
  align-items: center;
}

.panel-header,
.topbar,
.section-title,
.site-row {
  justify-content: space-between;
  gap: 16px;
}

.eyebrow,
.field span {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: Arial, sans-serif;
  font-kerning: normal;
  letter-spacing: normal;
  text-transform: uppercase;
}

.today-date {
  display: block;
  margin-top: 5px;
  font-size: 1.35rem;
}

.stats-grid {
  justify-content: stretch;
  gap: 10px;
  margin-top: 14px;
}

.stats-grid div {
  flex: 1;
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-2);
}

.stats-grid span {
  display: block;
  font-size: 1.25rem;
  font-weight: 900;
}

.site-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.site-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.site-form.wide {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto;
  align-items: end;
  margin-top: 0;
}

.site-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 44px;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--surface-2);
}

.site-row strong,
.site-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-row strong {
  display: block;
}

.site-row small {
  display: block;
  color: var(--muted);
}

.site-row span {
  align-self: center;
  color: var(--muted);
  font-weight: 800;
}

.site-row span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-row span:last-child {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 800;
}

.site-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.mini-action {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.mini-action.is-danger {
  border-color: rgba(166, 31, 43, 0.28);
  color: var(--brand);
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.screen-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.screen-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 15px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.screen-tab.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.support-tab {
  border-color: rgba(34, 197, 94, 0.35);
  background: #ecfdf5;
  color: #15803d;
}

.support-tab:hover,
.support-tab:focus-visible {
  border-color: #22c55e;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.18);
  outline: none;
}

.app-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.executive-dashboard {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  gap: 12px;
}

.dashboard-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 16px;
  box-shadow: var(--shadow);
}

.dashboard-card span {
  display: grid;
  width: 42px;
  aspect-ratio: 1;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #fff1f1;
  color: var(--brand);
  font-size: 1.35rem;
}

.dashboard-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dashboard-card strong {
  color: var(--ink);
  font-size: 1.75rem;
  line-height: 1;
}

.dashboard-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.document-dashboard-card {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) repeat(3, auto);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.document-dashboard-card > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.document-dashboard-card span {
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 8px;
  background: #fff1f1;
  color: var(--brand);
}

.document-dashboard-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.ok-dot {
  color: #198040;
}

.warn-dot {
  color: #b88a00;
}

.danger-dot {
  color: var(--brand);
}

.system-alert {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  background: #fff8df;
  color: var(--ink);
  padding: 10px 14px;
  text-align: left;
  font-weight: 900;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 12px;
}

.home-highlight-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 14px;
  align-items: center;
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 18px;
  text-align: left;
  box-shadow: var(--shadow);
}

.home-highlight-card .highlight-icon {
  display: grid;
  width: 52px;
  aspect-ratio: 1;
  grid-row: span 3;
  place-items: center;
  border-radius: 8px;
  background: #fff1f1;
  color: var(--brand);
}

.home-highlight-card .svg-icon {
  width: 28px;
  height: 28px;
}

.home-highlight-card strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.home-highlight-card small {
  color: var(--muted);
  line-height: 1.4;
}

.home-highlight-card b {
  color: var(--brand);
  font-size: 1.65rem;
  line-height: 1;
}

.home-highlight-card em {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  padding: 0 12px;
  font-style: normal;
  font-weight: 900;
}

.ai-highlight-card {
  border-color: rgba(198, 40, 40, 0.28);
  background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
}

.pilot-highlight-card {
  border-color: rgba(212, 175, 55, 0.42);
}

.pilot-highlight-card .highlight-icon {
  background: #fff8df;
  color: #b88a00;
}

.pilot-highlight-card em {
  background: linear-gradient(135deg, #b88a00, var(--gold));
  color: #1f2937;
}

.situation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.situation-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 18px;
  text-align: left;
  box-shadow: var(--shadow);
}

.situation-card.small {
  min-height: 118px;
}

.quick-question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.assistant-form,
.document-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.assistant-form {
  grid-template-columns: 1fr auto;
}

.assistant-result {
  display: grid;
  gap: 10px;
  min-height: 180px;
}

.assistant-result pre {
  overflow: auto;
  margin: 0;
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ai-chart-panel {
  display: grid;
  gap: 16px;
}

.ai-chart {
  display: grid;
  gap: 12px;
}

.ai-chart-row {
  display: grid;
  grid-template-columns: minmax(110px, 160px) minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: center;
}

.ai-chart-row span {
  color: var(--muted);
  font-weight: 900;
}

.ai-chart-row strong {
  color: var(--ink);
  text-align: right;
}

.ai-chart-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.ai-chart-track b {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
}

.document-list {
  display: grid;
  gap: 10px;
}

.document-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 5px solid #198040;
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.document-card.is-warning {
  border-left-color: var(--gold);
}

.document-card.is-expired {
  border-left-color: var(--brand);
}

.document-card strong,
.document-card span,
.document-card small {
  display: block;
}

.document-card span,
.document-card small,
.document-alert span {
  color: var(--muted);
}

.document-alert {
  display: grid;
  gap: 3px;
  text-align: right;
}

.document-alert b {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #198040;
}

.status-dot.warning {
  background: var(--gold);
}

.status-dot.expired {
  background: var(--brand);
}

.file-action {
  cursor: pointer;
}

.file-action input {
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.legal-text {
  display: grid;
  gap: 10px;
}

.legal-text p {
  margin: 0;
  color: #4d4d4d;
  line-height: 1.55;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.plan-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.plan-card {
  --plan-color: #707070;
  border-top: 7px solid var(--plan-color);
}

.plan-free {
  --plan-color: #707070;
  background: linear-gradient(180deg, #f6f6f6 0%, #ffffff 45%);
}

.plan-basic {
  --plan-color: var(--brand);
  background: linear-gradient(180deg, #fff1f1 0%, #ffffff 45%);
}

.plan-pro {
  --plan-color: var(--gold);
  background: linear-gradient(180deg, #fff8e1 0%, #ffffff 45%);
}

.plan-premium {
  --plan-color: #b88a00;
  background: linear-gradient(180deg, #fff8df 0%, #ffffff 45%);
  position: relative;
}

.plan-enterprise {
  --plan-color: var(--ink);
  background: linear-gradient(180deg, #1f2937 0%, #374151 6px, #ffffff 48%);
  position: relative;
}

.plan-addon {
  --plan-color: #c62828;
  background: linear-gradient(180deg, #fff3f3 0%, #ffffff 45%);
}

.plan-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: var(--plan-color);
  color: #fff;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.premium-badge {
  color: #fff;
}

.enterprise-badge {
  background: linear-gradient(135deg, var(--ink), var(--gold));
}

.addon-badge {
  background: #c62828;
}

.plan-card.is-current {
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.18), var(--shadow);
}

.plan-card h3,
.plan-card ul {
  margin: 0;
}

.plan-card strong {
  color: var(--plan-color);
  font-size: 1.25rem;
}

.price-note {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.plan-card ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.plan-card li {
  color: #4d4d4d;
  line-height: 1.35;
}

.plan-usage {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.plan-feedback {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--brand);
  font-weight: 800;
  line-height: 1.35;
}

.pilot-owner-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.pilot-owner-panel div {
  display: grid;
  gap: 6px;
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.06);
}

.pilot-owner-panel span,
.owner-note {
  color: var(--muted);
  line-height: 1.35;
}

.pilot-owner-panel strong {
  color: var(--brand);
  font-size: 1.8rem;
}

.owner-note {
  margin: 0 0 14px;
  font-weight: 700;
}

.pilot-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.pilot-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
}

.pilot-checklist input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--brand);
}

.feedback-form,
.customer-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.feedback-form .full,
.feedback-form button,
.feedback-form + .plan-feedback,
.customer-form .full,
.customer-form button,
.customer-form + .success-panel,
.customer-form + .success-panel + .plan-feedback {
  grid-column: 1 / -1;
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  line-height: 1.45;
  font-weight: 700;
}

.checkbox-line input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.feedback-list {
  display: grid;
  gap: 10px;
}

.feedback-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.06);
}

.feedback-card div {
  display: grid;
  gap: 4px;
}

.feedback-card strong {
  color: var(--ink);
}

.feedback-card span,
.feedback-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.cloud-status {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.cloud-status strong {
  color: var(--brand-dark);
}

.cloud-status span {
  color: var(--muted);
  line-height: 1.35;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.account-grid div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.account-grid span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: Arial, sans-serif;
  font-kerning: normal;
  letter-spacing: normal;
  text-transform: uppercase;
}

.account-grid strong {
  overflow-wrap: anywhere;
}

.situation-card strong {
  font-size: 1.05rem;
}

.situation-card span {
  color: var(--muted);
  line-height: 1.4;
}

.situation-card:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.next-actions {
  display: flex;
  justify-content: flex-end;
}

.topbar {
  min-height: 64px;
}

.topbar h2 {
  font-size: clamp(1.65rem, 3vw, 2.45rem);
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--brand);
  font-size: 1.2rem;
  font-weight: 900;
}

.pdf-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--brand);
}

.icon-button .svg-icon,
.pdf-button .svg-icon {
  width: 21px;
  height: 21px;
}

.pdf-button.is-loading .svg-icon,
.icon-button.is-loading .svg-icon {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ai-status {
  align-self: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  max-width: 190px;
}

.modal-view {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow: auto;
  background: rgba(51, 51, 51, 0.42);
  padding: 18px;
}

.modal-panel {
  display: grid;
  width: min(720px, 100%);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-actions a {
  align-items: center;
  text-decoration: none;
}

.ai-image-preview {
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 12px;
  text-align: center;
}

.ai-image-preview img {
  width: min(100%, 520px);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.checkout-panel {
  max-width: 640px;
}

.checkout-summary,
.checkout-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkout-summary div {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.checkout-summary span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.checkout-summary strong {
  color: var(--brand-dark);
  font-size: 1.15rem;
}

.composer {
  padding: 16px;
}

.diary-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.diary-shortcut-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 6px 12px;
  align-items: center;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.06);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.diary-shortcut-card:hover,
.diary-shortcut-card:focus-visible {
  border-color: rgba(214, 40, 40, 0.42);
  box-shadow: 0 14px 30px rgba(31, 41, 55, 0.10);
  transform: translateY(-1px);
  outline: none;
}

.shortcut-icon {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #fff1f1;
  color: var(--brand);
  font-size: 1.25rem;
  font-weight: 900;
}

.diary-shortcut-card strong {
  overflow-wrap: anywhere;
  font-size: 0.98rem;
}

.diary-shortcut-card small {
  color: var(--muted);
  line-height: 1.35;
}

#entryForm {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) 150px 170px;
  gap: 12px;
  align-items: end;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea,
.search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.password-field input {
  min-width: 0;
}

.password-field button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 900;
}

.field input,
.field select,
.search {
  min-height: 44px;
}

.field textarea {
  min-height: 104px;
  padding-top: 12px;
  resize: vertical;
}

.labor-fieldset,
.tools-fieldset,
.materials-fieldset,
.occurrence-fieldset {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
  scroll-margin-top: 20px;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.labor-fieldset legend,
.tools-fieldset legend,
.materials-fieldset legend,
.occurrence-fieldset legend {
  padding: 0 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: Arial, sans-serif;
  font-kerning: normal;
  letter-spacing: normal;
  text-transform: uppercase;
}

.labor-grid,
.tools-grid,
.materials-grid,
.occurrence-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.tool-group {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  scroll-margin-top: 20px;
  transition: background 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.is-highlighted {
  border-color: rgba(214, 40, 40, 0.55) !important;
  background: #fff8f8 !important;
  box-shadow: 0 0 0 4px rgba(214, 40, 40, 0.10);
}

.tool-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.tool-group h4 {
  margin: 0;
  font-size: 0.9rem;
}

.tool-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
}

.labor-item,
.tool-item,
.material-item,
.occurrence-item {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.labor-item span,
.tool-item span,
.material-item span,
.occurrence-item span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.labor-item input,
.tool-item input,
.material-item input,
.occurrence-item input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  outline: none;
}

.checkbox-item {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
}

.checkbox-item input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--brand);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.labor-item input:focus,
.tool-item input:focus,
.material-item input:focus,
.occurrence-item input:focus,
.search:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.12);
}

.primary-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  padding: 0 18px;
  font-weight: 900;
  box-shadow: var(--button-shadow);
}

.compact-button {
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

.secondary-button {
  min-height: 42px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  padding: 0 14px;
  font-weight: 900;
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.help-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  appearance: none;
}

.help-card:hover,
.help-card:focus-visible {
  border-color: rgba(214, 40, 40, 0.45);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.10);
  transform: translateY(-1px);
  outline: none;
}

.help-card strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.help-card span,
.help-faq p,
.help-support-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.help-faq {
  display: grid;
  gap: 10px;
}

.faq-box {
  padding: 0;
  overflow: hidden;
}

.faq-master {
  padding: 18px;
}

.faq-master > summary {
  display: grid;
  gap: 6px;
  cursor: pointer;
  list-style: none;
}

.faq-master > summary::-webkit-details-marker {
  display: none;
}

.faq-master > summary strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.faq-master > summary span {
  color: var(--muted);
  line-height: 1.45;
}

.faq-master[open] > summary {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.help-faq details {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.help-faq summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.help-faq summary + p {
  margin-top: 10px;
}

.help-support-card {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(135deg, #fff, #f0fdf4);
}

.help-whatsapp-link {
  display: inline-flex;
  min-width: 150px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.help-whatsapp-link:hover,
.help-whatsapp-link:focus-visible {
  background: linear-gradient(135deg, #15803d, #166534);
  box-shadow: 0 12px 26px rgba(22, 163, 74, 0.30);
  outline: none;
}

.success-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 8px;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
}

.success-panel strong {
  color: #15803d;
  font-size: 1.05rem;
}

.success-panel span {
  color: var(--muted);
  line-height: 1.45;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filters {
  display: grid;
  grid-template-columns: auto auto auto minmax(180px, 1fr);
  gap: 8px;
}

.filter {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 16px;
  font-weight: 800;
}

.filter.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.entry-surface {
  flex: 1;
  padding: 18px;
}

.entry-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.entry-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.entry-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.entry-title {
  overflow-wrap: anywhere;
  font-size: 1.08rem;
  font-weight: 900;
}

.entry-notes {
  margin: 0;
  color: #344252;
  line-height: 1.55;
  white-space: pre-wrap;
}

.entry-meta {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 100%;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.pill.photo {
  background: #ddf1ea;
  color: var(--brand-dark);
}

.pill.video {
  background: #fff0cf;
  color: var(--warning);
}

.pill.worker {
  background: #f4e4e4;
  color: var(--brand-dark);
}

.labor-summary {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.tools-summary {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.materials-summary,
.occurrences-summary {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.labor-summary strong,
.tools-summary strong,
.materials-summary strong,
.occurrences-summary strong {
  font-size: 0.9rem;
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.report-button-row {
  display: flex;
  gap: 8px;
}

.delete-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #f7e8e3;
  color: var(--accent);
  font-weight: 900;
}

.media-grid {
  display: grid;
  align-items: start;
  gap: 10px;
  grid-template-columns: minmax(160px, 220px);
  margin-top: 12px;
}

.media-grid.is-gallery {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}

.media-grid.is-single {
  max-width: 260px;
}

.media-item {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 6px;
}

.media-item img,
.media-item video {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  background: #d7dee5;
  object-fit: cover;
}

.media-grid.is-single .media-item img,
.media-grid.is-single .media-item video {
  aspect-ratio: 4 / 3;
}

.media-item a {
  overflow: hidden;
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  display: none;
  min-height: 220px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

.empty-state.is-visible {
  display: grid;
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .executive-dashboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-feature-grid {
    grid-template-columns: 1fr;
  }

  .document-dashboard-card {
    grid-template-columns: 1fr;
  }

  #entryForm {
    grid-template-columns: 1fr 1fr;
  }

  .site-form.wide,
  .settings-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  body {
    min-height: 100dvh;
  }

  .auth-view,
  .presentation-view {
    align-items: center;
    justify-items: center;
    min-height: 100dvh;
    padding: 16px;
  }

  .auth-panel {
    width: min(100%, 430px);
    max-height: calc(100dvh - 32px);
    gap: 12px;
    overflow-y: auto;
    padding: 18px;
  }

  .auth-panel > p {
    max-width: 100%;
    font-size: 0.88rem;
    white-space: normal;
  }

  .auth-card {
    width: 100%;
  }

  .auth-form {
    padding: 14px;
  }

  .ipc-logo {
    gap: 12px;
  }

  .ipc-logo-hero .ipc-logo-icon {
    width: 84px;
    border-radius: 16px;
  }

  .ipc-logo-hero .ipc-logo-icon span {
    margin: 25px 0 0 11px;
    font-size: 1.75rem;
  }

  .ipc-logo-copy strong {
    font-size: 1.5rem;
  }

  .ipc-logo-copy small {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }

  .app-shell {
    padding: 14px;
  }

  .executive-dashboard {
    grid-template-columns: 1fr;
  }

  .home-highlight-card {
    grid-template-columns: 1fr;
  }

  .home-highlight-card .highlight-icon {
    grid-row: auto;
  }

  .dashboard-card {
    min-height: 86px;
  }

  #entryForm,
  .site-form.wide,
  .settings-form,
  .document-form,
  .assistant-form,
  .feedback-form,
  .customer-form,
  .entry-head,
  .filters,
  .pilot-owner-panel {
    grid-template-columns: 1fr;
  }

  .document-card {
    grid-template-columns: 1fr;
  }

  .document-alert {
    text-align: left;
  }

  .document-alert b {
    justify-content: flex-start;
  }

  .field.full,
  .labor-fieldset,
  .tools-fieldset,
  .materials-fieldset,
  .occurrence-fieldset {
    grid-column: auto;
  }

  .entry-actions {
    justify-content: flex-end;
  }

  .site-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .site-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .media-grid {
    grid-template-columns: minmax(140px, 220px);
  }

  .media-grid.is-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checkout-summary,
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}
