/*
 * Shared application styles.
 */

@font-face {
  font-family: "Open Sans";
  src: url("/assets/OpenSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Open Sans";
  src: url("/assets/OpenSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Helvetica Neue";
  src: url("/assets/HelveticaNeue.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Helvetica Neue";
  src: url("/assets/HelveticaNeue-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

:root {
  --font-body: "Open Sans", sans-serif;
  --font-heading: "Helvetica Neue", "Open Sans", sans-serif;
  --color-bg: #f0f2f5;
  --color-bg-strong: #e4e8ed;
  --color-surface: #ffffff;
  --color-surface-muted: #f7f9fc;
  --color-surface-strong: #eef1f6;
  --color-border: #d0d8e2;
  --color-border-strong: #bac5d2;
  --color-text: #1a2535;
  --color-text-muted: #5d6b82;
  --color-heading: #0f1e2d;
  --color-primary: #0f4c81;
  --color-primary-strong: #0b3d68;
  --color-primary-soft: #dce9f7;
  --color-success: #1f6b4f;
  --color-success-soft: #def4ea;
  --color-warning: #8a5a18;
  --color-warning-soft: #fdf0d9;
  --color-danger: #a63838;
  --color-danger-soft: #fae2e2;
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 2px 8px rgba(15, 23, 42, 0.08);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--color-heading);
  font-family: var(--font-heading);
}

a {
  color: var(--color-primary);
}

.app-shell-card,
.enterprise-card,
.data-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.eyebrow-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  background: var(--color-surface-strong);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
}

/* Page Banner — enterprise page header */
.page-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  margin-bottom: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.page-banner-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-banner-title {
  font-size: 20px;
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: 700;
}

.page-banner-kpis {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 8px 14px;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-width: 80px;
  text-align: right;
}

.kpi-tile-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.kpi-tile-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-heading);
  font-family: var(--font-heading);
  margin-top: 2px;
  line-height: 1;
}

/* Table */
.table-shell {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.table-shell table {
  width: 100%;
  border-collapse: collapse;
}

.table-shell th {
  padding: 11px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.table-shell td {
  padding: 13px 16px;
  border-bottom: 1px solid #eaeff5;
  color: var(--color-text);
  font-size: 14px;
  vertical-align: middle;
}

.table-shell tr:last-child td {
  border-bottom: none;
}

.table-shell tbody tr:hover td {
  background: #f5f8fb;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-open {
  background: #ddeafd;
  color: #0f4c81;
}

.status-in-progress {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.status-closed {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.severity-repaired {
  background: #edf2f7;
  color: #5d6b82;
}

.severity-normal {
  background: #e2ebf6;
  color: #30506f;
}

.severity-warning {
  background: #fde8c8;
  color: #8a5a18;
}

.severity-serious {
  background: #efd6b8;
  color: #734312;
}

.severity-critical {
  background: #f7d7d7;
  color: #9e2b2b;
}
