@font-face {
  font-family: 'BreuerText';
  src: url('./BreuerText-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'BreuerText';
  src: url('./BreuerText-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --c-primary: #00619e;
  --c-primary-dark: #004d7c;
  --c-primary-hover: #006eb3;
  --c-secondary: #ee712a;
  --c-secondary-dark: #ba5114;
  --c-secondary-hover: #c7591b;
  --c-black: #151515;
  --c-success: #0abf00;
  --c-success-light: #dcfeda;
  --c-error: #d80000;
  --c-error-light: #ffdddd;
  --c-warn: #f59e0b;
  --c-warn-light: #fef3c7;
  --c-grey-50: #f7f8fa;
  --c-grey-100: #f1f3f6;
  --c-grey-200: #e4e8ee;
  --c-grey-300: #cdd4dc;
  --c-grey-500: #6b7785;
  --c-grey-700: #374151;
  --font: 'BreuerText', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { font-family: var(--font); color: var(--c-black); -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--c-grey-50); font-family: var(--font); color: var(--c-black); }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-hover); }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 12px 22px; border-radius: 60px;
  font-family: var(--font); font-weight: 700; font-size: 15px;
  border: 2px solid transparent; cursor: pointer; transition: all .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--c-secondary); color: #fff; }
.btn-primary:hover { background: var(--c-secondary-hover); transform: translateY(-1px); color:#fff; }
.btn-blue { background: var(--c-primary); color: #fff; }
.btn-blue:hover { background: var(--c-primary-hover); transform: translateY(-1px); color:#fff; }
.btn-ghost { background: transparent; color: var(--c-primary); border-color: var(--c-grey-200); }
.btn-ghost:hover { border-color: var(--c-primary); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* === Cards === */
.card {
  background: #fff; border: 1px solid var(--c-grey-200);
  border-radius: 16px; padding: 24px; transition: box-shadow .18s ease;
}
.card:hover { box-shadow: 0 6px 24px -8px rgba(0,77,124,.12); }
.card-header { display:flex; align-items:center; justify-content:space-between; margin-bottom: 16px; }
.card-title { font-weight: 700; font-size: 16px; color: var(--c-primary-dark); margin: 0; }

/* === Tags / pills === */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 90px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em;
}
.tag-urgent { background: var(--c-error-light); color: var(--c-error); }
.tag-warn { background: var(--c-warn-light); color: #92400e; }
.tag-ok { background: var(--c-success-light); color: #036b00; }
.tag-info { background: #e0f2ff; color: var(--c-primary-dark); }
.tag-orange { background: #ffe7d4; color: var(--c-secondary-dark); }
.tag-grey { background: var(--c-grey-100); color: var(--c-grey-700); }

/* === Sidebar === */
.sidebar {
  width: 250px; min-height: 100vh; background: var(--c-primary-dark);
  color: #fff; padding: 28px 18px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; align-self: flex-start;
}
.sidebar-logo { padding: 0 4px 28px; display:block; }
.sidebar-logo img { width: 180px; height: auto; }
.sidebar a.nav {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  color: #cbe1ee; font-weight: 500; font-size: 15px;
  transition: all .15s ease;
}
.sidebar a.nav:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar a.nav.active { background: var(--c-secondary); color: #fff; font-weight: 700; }
.sidebar a.nav svg { width: 19px; height: 19px; flex-shrink: 0; }
.sidebar-divider { border-top: 1px solid rgba(255,255,255,.12); margin: 18px 4px; }
.sidebar-foot {
  margin-top: auto; padding: 14px; border-radius: 12px;
  background: rgba(0,0,0,.18); display:flex; align-items:center; gap:12px;
}
.sidebar-foot img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.sidebar-foot .name { font-weight: 700; font-size: 14px; color: #fff; }
.sidebar-foot .role { font-size: 12px; color: #9bbed4; }

/* === Layout === */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; padding: 32px 40px; min-width: 0; }
.topbar {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.crumbs { color: var(--c-grey-500); font-size: 13px; }
.crumbs a { color: var(--c-grey-500); }
.h1 { font-size: 32px; font-weight: 700; margin: 0 0 6px; color: var(--c-primary-dark); }
.lede { color: var(--c-grey-500); margin: 0; }
.search {
  display:flex; align-items:center; gap: 10px;
  background: #fff; border: 1px solid var(--c-grey-200);
  border-radius: 60px; padding: 9px 18px; min-width: 280px;
}
.search input { border: 0; outline: 0; flex: 1; font-family: var(--font); font-size: 14px; }
.bell { position: relative; width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 1px solid var(--c-grey-200); display:flex; align-items:center; justify-content:center; cursor:pointer; }
.bell .dot { position:absolute; top:9px; right:11px; width:8px; height:8px; border-radius:50%; background: var(--c-secondary); border: 2px solid #fff; }

/* === KPI Cards === */
.kpi-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.kpi {
  background: #fff; border: 1px solid var(--c-grey-200);
  border-radius: 16px; padding: 22px;
  position: relative; overflow: hidden;
}
.kpi .lbl { font-size: 13px; color: var(--c-grey-500); margin-bottom: 6px; font-weight: 500; }
.kpi .val { font-size: 34px; font-weight: 700; color: var(--c-primary-dark); line-height: 1.1; margin-bottom: 6px; }
.kpi .delta { font-size: 12px; color: var(--c-grey-500); display:flex; align-items:center; gap: 4px; }
.kpi .delta.up { color: var(--c-success); }
.kpi .delta.down { color: var(--c-error); }
.kpi .icon {
  position: absolute; top: 18px; right: 18px;
  width: 38px; height: 38px; border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
}
.kpi .icon svg { width: 20px; height: 20px; }
.kpi.accent-orange .icon { background: #ffe7d4; color: var(--c-secondary); }
.kpi.accent-blue .icon { background: #d8edfb; color: var(--c-primary); }
.kpi.accent-green .icon { background: var(--c-success-light); color: #036b00; }
.kpi.accent-red .icon { background: var(--c-error-light); color: var(--c-error); }

/* === Two col layout === */
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* === Table === */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th { text-align: left; padding: 12px 14px; color: var(--c-grey-500); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--c-grey-200); }
.tbl td { padding: 14px; border-bottom: 1px solid var(--c-grey-100); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.row { cursor: pointer; transition: background .12s ease; }
.tbl tr.row:hover { background: var(--c-grey-50); }
.tbl .ref { font-weight: 700; color: var(--c-primary-dark); }
.tbl .addr { color: var(--c-grey-700); }
.tbl .meta { color: var(--c-grey-500); font-size: 12px; }

/* === Avatar === */
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { border: 2px solid #fff; margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* === SLA bar === */
.sla {
  display:inline-flex; align-items:center; gap:8px; font-size: 13px; font-weight: 600;
}
.sla-bar { width: 80px; height: 6px; border-radius: 90px; background: var(--c-grey-200); position: relative; overflow: hidden; }
.sla-bar i { position:absolute; left:0; top:0; bottom:0; border-radius: 90px; }

/* === Login page === */
.login-wrap { min-height: 100vh; display:grid; grid-template-columns: 1fr 1fr; }
.login-left {
  background: var(--c-primary-dark); color: #fff;
  padding: 60px 70px; display:flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-left::before {
  content: ''; position: absolute; right: -180px; bottom: -180px;
  width: 540px; height: 540px; border-radius: 50%;
  background: var(--c-secondary); opacity: .25;
}
.login-left::after {
  content: ''; position: absolute; right: 80px; top: 200px;
  width: 220px; height: 220px; border-radius: 50%;
  background: var(--c-primary); opacity: .55;
}
.login-left .quote { font-size: 32px; font-weight: 700; line-height: 1.2; max-width: 460px; position: relative; z-index: 2; }
.login-left .quote span { background: var(--c-secondary); color: #fff; padding: 2px 10px; border-radius: 12px; display:inline-block; transform: rotate(-1deg); }
.login-left .footnote { font-size: 14px; color: #b8d3e3; position: relative; z-index: 2; }
.login-right { padding: 60px 70px; display:flex; flex-direction: column; justify-content: center; background: #fff; }
.login-form { max-width: 380px; }
.form-row { margin-bottom: 16px; }
.form-row label { display:block; margin-bottom: 6px; font-weight: 600; font-size: 13px; color: var(--c-grey-700); }
.form-row input {
  width: 100%; padding: 12px 16px; border: 1px solid var(--c-grey-300); border-radius: 10px;
  font-family: var(--font); font-size: 15px; outline: none; transition: border-color .15s ease;
}
.form-row input:focus { border-color: var(--c-primary); }

/* === Banner / hero === */
.hero {
  border-radius: 24px; padding: 32px;
  background: linear-gradient(135deg, var(--c-primary-dark) 0%, var(--c-primary) 100%);
  color: #fff; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: center;
}
.hero::before { content: ''; position:absolute; top:-80px; right:120px; width:200px; height:200px; border-radius:50%; background: var(--c-secondary); opacity: .85; }
.hero h2 { font-size: 24px; font-weight: 700; margin: 0 0 8px; position: relative; z-index: 2; }
.hero p { margin: 0 0 16px; opacity: .9; max-width: 480px; position: relative; z-index: 2; }
.hero .actions { display:flex; gap:10px; position: relative; z-index: 2; }
.hero img { border-radius: 16px; max-height: 160px; object-fit: cover; transform: rotate(-2deg); position: relative; z-index: 2; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); }

/* === Timeline === */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 2px; background: var(--c-grey-200); }
.timeline .ev { position: relative; padding-bottom: 18px; }
.timeline .ev::before {
  content: ''; position: absolute; left: -28px; top: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--c-primary);
}
.timeline .ev.done::before { background: var(--c-primary); }
.timeline .ev.now::before { background: var(--c-secondary); border-color: var(--c-secondary); animation: pulse 2s infinite; }
.timeline .ev .when { font-size: 12px; color: var(--c-grey-500); }
.timeline .ev .what { font-weight: 600; color: var(--c-primary-dark); margin: 2px 0 4px; }
.timeline .ev .who { font-size: 13px; color: var(--c-grey-500); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(238,113,42,.5); }
  50% { box-shadow: 0 0 0 8px rgba(238,113,42,0); }
}

/* === Photo gallery === */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photo-grid img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 10px; cursor: pointer; transition: transform .2s ease;
}
.photo-grid img:hover { transform: scale(1.05) rotate(-2deg); }

/* === Video player mock === */
.video-mock {
  position: relative; width: 100%; aspect-ratio: 16/10;
  border-radius: 16px; overflow: hidden; cursor: pointer;
  background: #000;
}
.video-mock img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video-mock .play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 70px; height: 70px; border-radius: 50%;
  background: var(--c-secondary); display:flex; align-items:center; justify-content:center;
  box-shadow: 0 0 0 8px rgba(238,113,42,.25);
}
.video-mock .play svg { width: 28px; height: 28px; color: #fff; margin-left: 4px; }
.video-mock .meta {
  position: absolute; bottom: 12px; left: 14px; color: #fff;
  font-size: 12px; font-weight: 600;
  background: rgba(0,0,0,.55); padding: 4px 10px; border-radius: 90px;
}

/* === Inspection scrubber (faux timeline) === */
.scrubber {
  height: 56px; background: var(--c-grey-100); border-radius: 12px;
  position: relative; padding: 8px 12px;
  display:flex; align-items:center; gap: 6px; overflow: hidden;
}
.scrubber-track { flex:1; height: 6px; background: var(--c-grey-300); border-radius: 90px; position: relative; }
.scrubber-track i { position:absolute; top:0; bottom:0; border-radius: 90px; }
.scrubber-track i.scan { left: 0; right: 22%; background: linear-gradient(90deg, var(--c-primary), var(--c-secondary)); }
.scrubber-track .pin {
  position: absolute; top: -5px; width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.scrubber-track .pin.warn { background: var(--c-warn); }
.scrubber-track .pin.err { background: var(--c-error); }
.scrubber-track .pin.ok { background: var(--c-success); }
.scrubber .time { font-size: 12px; font-weight: 700; color: var(--c-grey-700); }

/* === AI badge === */
.ai-pill {
  display:inline-flex; align-items:center; gap: 6px;
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-secondary) 100%);
  color: #fff; padding: 4px 10px; border-radius: 90px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}

/* === Responsive === */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-left { padding: 40px 30px; min-height: 220px; }
  .login-right { padding: 40px 30px; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .main { padding: 20px; }
  .three-col { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
}

/* === Helpers === */
.flex { display:flex; }
.flex-1 { flex: 1; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-16 { margin-top: 16px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.muted { color: var(--c-grey-500); }
.text-blue { color: var(--c-primary-dark); }
.text-orange { color: var(--c-secondary); }
.bold { font-weight: 700; }

/* === Demo banner === */
.demo-banner {
  position: fixed; bottom: 16px; right: 16px; z-index: 50;
  background: var(--c-primary-dark); color: #fff;
  padding: 10px 16px; border-radius: 90px; font-size: 12px; font-weight: 600;
  box-shadow: 0 6px 20px -6px rgba(0,0,0,.3);
  display:flex; align-items:center; gap: 8px;
}
.demo-banner b { color: var(--c-secondary); }
