@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
  --ink: #17231f;
  --muted: #6f7772;
  --line: #deded7;
  --canvas: #f4f3ee;
  --surface: #ffffff;
  --forest: #19352f;
  --forest-2: #24483f;
  --mint: #d9eee4;
  --mint-strong: #74b494;
  --gold: #f4c55d;
  --gold-soft: #fff1cb;
  --red: #cf5b52;
  --red-soft: #fce7e4;
  --blue: #5178a2;
  --blue-soft: #e7eef8;
  --shadow: 0 18px 50px rgba(33, 47, 42, 0.09);
  --radius: 18px;
  --sidebar: 254px;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--canvas); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, [role='button'] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(244, 197, 93, .65);
  outline-offset: 2px;
}

h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-family: 'Manrope', sans-serif; letter-spacing: -.035em; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

[hidden] { display: none !important; }

.brand, .login-art__brand, .mobile-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font: 800 20px/1 'Manrope', sans-serif;
  letter-spacing: -.04em;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: var(--forest);
  background: var(--gold);
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark--light { color: var(--forest); }
.werksamen-brand { width: fit-content; display: flex; align-items: center; gap: 14px; }
.werksamen-brand__mark {
  position: relative;
  isolation: isolate;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.werksamen-brand__mark::before, .werksamen-brand__mark::after {
  content: '';
  position: absolute;
  inset: 4px;
  z-index: -1;
  border-radius: 14px 10px 14px 10px;
}
.werksamen-brand__mark::before { background: var(--gold); transform: rotate(-7deg); }
.werksamen-brand__mark::after { inset: 0 0 8px 8px; border: 2px solid var(--mint-strong); transform: rotate(8deg); }
.werksamen-brand__mark > span { color: var(--forest); font: 800 23px/1 'Manrope', sans-serif; letter-spacing: -.08em; }
.werksamen-brand__copy { display: grid; gap: 5px; }
.werksamen-brand__copy strong { color: var(--forest); font: 800 27px/.9 'Manrope', sans-serif; letter-spacing: -.065em; }
.werksamen-brand__copy strong > span { color: #a77a1c; }
.werksamen-brand__copy small { color: #68746f; font-size: 7px; font-weight: 800; letter-spacing: .2em; }
.werksamen-brand--light .werksamen-brand__copy strong { color: white; }
.werksamen-brand--light .werksamen-brand__copy strong > span { color: var(--gold); }
.werksamen-brand--light .werksamen-brand__copy small { color: #c7d5d0; }
.official-brand { display: flex; flex-direction: column; align-items: stretch; gap: 5px; padding: 8px 10px; border-radius: 10px; color: white; background: #222b30; }
.official-brand img { display: block; width: 100%; max-width: 215px; height: auto; }
.official-brand small { color: #c9d2d5; font-size: 7px; font-weight: 800; letter-spacing: .2em; text-align: right; }
.portal-logo-fallback { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--portal-color); font: 800 12px/1 'Manrope', sans-serif; }
.portal-company-name { overflow: hidden; color: white; font-size: 11px; font-weight: 800; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.official-brand--open { width: fit-content; padding: 0; background: transparent; }
.official-brand--open img { width: 270px; max-width: 100%; }
.official-brand--open small { padding-right: 5px; }
.eyebrow { color: #987527; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.eyebrow--light { color: #f2d37b; }

/* Login */
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(430px, 1.05fr) minmax(440px, .95fr);
  background: #f8f7f3;
}

.login-art {
  position: relative;
  min-height: 100vh;
  padding: 46px clamp(48px, 7vw, 104px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 86% 8%, rgba(132, 186, 157, .24), transparent 30%),
    radial-gradient(circle at 12% 92%, rgba(244, 197, 93, .13), transparent 36%),
    var(--forest);
}

.login-art::before, .login-art::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
}
.login-art::before { width: 560px; height: 560px; right: -290px; top: 60px; }
.login-art::after { width: 420px; height: 420px; right: -212px; top: 130px; }
.login-art__brand { position: relative; z-index: 1; }
.login-art__copy { position: relative; z-index: 1; max-width: 590px; padding: 90px 0 48px; }
.login-art__copy h1 { margin: 15px 0 20px; font-size: clamp(42px, 5.4vw, 70px); line-height: 1.03; }
.login-art__copy p { max-width: 510px; margin: 0; color: #c8d6d1; font-size: 18px; line-height: 1.65; }

.login-preview {
  position: relative;
  z-index: 1;
  max-width: 520px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 20px;
  background: rgba(255, 255, 255, .075);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .15);
  backdrop-filter: blur(10px);
}
.login-preview__top { display: flex; justify-content: space-between; margin-bottom: 18px; color: #ecf1ef; font-weight: 700; }
.live-dot { color: #bed3ca; font-size: 12px; font-weight: 500; }
.live-dot::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #70bf97; }
.preview-job { display: grid; grid-template-columns: 48px 3px 1fr; gap: 14px; align-items: center; padding: 11px 0; }
.preview-time { color: #b6c8c1; font-size: 12px; }
.preview-line { width: 3px; height: 39px; border-radius: 3px; }
.preview-line--gold { background: var(--gold); }
.preview-line--mint { background: #7fbea0; }
.preview-job strong, .preview-job small { display: block; }
.preview-job strong { margin-bottom: 4px; color: #fff; font-size: 13px; }
.preview-job small { color: #aabdb6; font-size: 11px; }

.login-panel { min-height: 100vh; display: grid; place-items: center; padding: 50px; }
.login-box { width: min(100%, 430px); }
.mobile-brand { display: none; margin-bottom: 56px; }
.login-box h2 { margin: 9px 0 7px; font-size: 38px; }
.login-box > .muted { margin-bottom: 34px; }
.form-stack { display: grid; gap: 20px; }
.form-stack label, .field label, .form-grid > label { display: grid; gap: 8px; color: #4b5651; font-size: 12px; font-weight: 700; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 16px; width: 18px; color: #89918d; pointer-events: none; }
.input-wrap input { width: 100%; padding-left: 46px; padding-right: 44px; }
input, textarea, select {
  width: 100%;
  min-height: 49px;
  border: 1px solid #d9dad5;
  border-radius: 11px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  transition: border-color .16s, box-shadow .16s;
}
input:hover, textarea:hover, select:hover { border-color: #bdc3bf; }
input:focus, textarea:focus, select:focus { border-color: #729b89; box-shadow: 0 0 0 4px rgba(114, 155, 137, .12); outline: none; }
textarea { min-height: 95px; resize: vertical; }
.password-toggle { position: absolute; right: 8px; }
.form-error { padding: 11px 13px; border-radius: 9px; color: #8f312c; background: var(--red-soft); font-size: 13px; }
.permission-note { display: grid; grid-template-columns: 90px 1fr; gap: 7px 12px; padding: 13px 14px; border-radius: 11px; color: #4f5e58; background: #f1f5f2; font-size: 10px; line-height: 1.5; }
.permission-note strong { color: var(--forest); }
.text-button { display: block; margin: 18px auto; border: 0; color: #365d50; background: none; font-size: 13px; font-weight: 700; cursor: pointer; }
.demo-note { display: flex; gap: 10px; padding: 13px 15px; border-radius: 10px; color: #6e654a; background: #f4efe0; font-size: 12px; }
.demo-note svg { width: 17px; flex: 0 0 auto; }

/* Shell & navigation */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 27px 19px 20px;
  border-right: 1px solid #e3e2dc;
  background: #fbfaf7;
}
.sidebar .brand { padding: 0 12px 29px; }
.sidebar .official-brand { margin: 0 0 25px; padding: 8px 9px; }
.main-nav { display: grid; gap: 5px; }
.nav-item {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  color: #68716d;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  transition: .16s ease;
}
.nav-item:hover { color: var(--forest); background: #eeeee8; }
.nav-item.is-active { color: white; background: var(--forest); box-shadow: 0 8px 20px rgba(25, 53, 47, .12); }
.nav-item svg { width: 19px; height: 19px; }
.nav-badge { min-width: 21px; height: 21px; display: inline-grid; place-items: center; margin-left: auto; border-radius: 11px; color: #47675a; background: #d9e9e1; font-size: 10px; }
.nav-item.is-active .nav-badge { color: var(--forest); background: #edf4f1; }
.nav-badge--accent { color: #7e5b15; background: var(--gold-soft); }
.sidebar-bottom { display: grid; gap: 13px; margin-top: auto; }
.profile-card { display: grid; grid-template-columns: 38px 1fr 32px; gap: 10px; align-items: center; padding: 14px 8px 5px; border-top: 1px solid var(--line); }
.profile-card__text { min-width: 0; }
.profile-card__text strong, .profile-card__text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-card__text strong { font-size: 12px; }
.profile-card__text small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.avatar {
  flex: 0 0 auto;
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--forest);
  font-size: 11px;
  font-weight: 800;
}
.avatar--gold { color: #4b3b15; background: var(--gold); }
.avatar--mint { color: #214d3e; background: #b9dfcd; }
.avatar--blue { color: white; background: #6e8bab; }
.avatar--button { border: 0; cursor: pointer; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; border-radius: 9px; color: #737c77; background: transparent; cursor: pointer; }
.icon-button:hover { background: #ecece6; }
.icon-button svg { width: 18px; height: 18px; }
.mobile-header, .bottom-nav { display: none; }
.content { min-height: 100vh; margin-left: var(--sidebar); padding: 34px clamp(30px, 4vw, 68px) 50px; }
.view { display: none; max-width: 1280px; margin: 0 auto; animation: rise .24s ease; }
.view.is-active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* Shared components */
.page-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 30px; }
.page-header h1 { margin: 4px 0 7px; font-size: clamp(28px, 3.3vw, 40px); }
.page-header p { margin: 0; color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.portal-context-button { min-height: 42px; display: flex; align-items: center; gap: 9px; max-width: 260px; padding: 6px 11px; border: 1px solid #dce5e0; border-radius: 11px; color: var(--forest); background: #f7faf8; text-align: left; cursor: pointer; }
.portal-context-button:hover { border-color: #b9cfc4; background: #eef5f1; }
.portal-context-button > svg { width: 18px; flex: 0 0 auto; color: #477864; }
.portal-context-button > span { min-width: 0; display: grid; gap: 2px; }
.portal-context-button small { color: #8a7650; font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.portal-context-button strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.notification-button { position: relative; width: 44px; height: 44px; border: 1px solid var(--line); background: white; }
.notification-button::after { content: ''; position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border: 2px solid white; border-radius: 50%; background: #d8655d; }
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.button:hover { transform: translateY(-1px); }
.button svg { width: 17px; height: 17px; }
.button--primary { color: white; background: var(--forest); box-shadow: 0 8px 20px rgba(25, 53, 47, .14); }
.button--primary:hover { background: var(--forest-2); }
.button--accent { color: #4c3911; background: var(--gold); }
.button--secondary { border-color: var(--line); color: #53605a; background: white; }
.button--danger { color: white; background: var(--red); }
.button--ghost { color: #53605a; background: transparent; }
.button--full { width: 100%; }
.button:disabled { opacity: .52; transform: none; cursor: not-allowed; }
.card { border: 1px solid #e3e2dd; border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 28px rgba(48, 58, 54, .035); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px 17px; }
.card-header h2, .card-header h3 { margin: 0; font-size: 17px; }
.link-button { border: 0; color: #486e5f; background: none; font-size: 12px; font-weight: 700; cursor: pointer; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { position: relative; min-height: 132px; padding: 22px; overflow: hidden; }
.stat-card__icon { position: absolute; top: 20px; right: 20px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; }
.stat-card__icon svg { width: 18px; }
.stat-card__icon--mint { color: #467461; background: var(--mint); }
.stat-card__icon--gold { color: #97711c; background: var(--gold-soft); }
.stat-card__icon--blue { color: var(--blue); background: var(--blue-soft); }
.stat-card__icon--red { color: var(--red); background: var(--red-soft); }
.stat-card small { display: block; margin-bottom: 13px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.stat-card strong { display: block; font: 800 31px/1 'Manrope', sans-serif; }
.stat-card span:last-child { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .85fr); gap: 20px; }
.schedule-card, .orders-card { min-width: 0; }
.date-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; padding: 0 20px 19px; border-bottom: 1px solid #efefea; }
.date-pill { min-height: 62px; display: grid; place-items: center; align-content: center; gap: 5px; border: 0; border-radius: 11px; color: #6d7671; background: transparent; cursor: pointer; }
.date-pill small { font-size: 9px; font-weight: 800; text-transform: uppercase; }
.date-pill strong { font: 700 15px/1 'Manrope', sans-serif; }
.date-pill.is-active { color: white; background: var(--forest); }
.timeline { padding: 8px 22px 18px; }
.timeline-row { display: grid; grid-template-columns: 52px 4px 1fr auto; gap: 13px; align-items: center; min-height: 76px; padding: 8px 0; }
.timeline-time { color: #737c77; font-size: 11px; font-weight: 600; }
.timeline-bar { width: 4px; height: 48px; border-radius: 4px; background: var(--mint-strong); }
.timeline-bar--gold { background: var(--gold); }
.timeline-bar--blue { background: #7491b0; }
.timeline-main { min-width: 0; }
.timeline-main strong, .timeline-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-main strong { margin-bottom: 5px; font-size: 13px; }
.timeline-main small { color: var(--muted); font-size: 10px; }
.mini-assignee { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.mini-assignee .avatar { width: 27px; height: 27px; border-radius: 8px; font-size: 8px; }
.order-list { padding: 2px 20px 16px; }
.order-list-item { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 17px 4px; border: 0; border-bottom: 1px solid #eeeeea; text-align: left; background: none; cursor: pointer; }
.order-list-item:last-child { border-bottom: 0; }
.order-list-item:hover strong { color: #3c6857; }
.order-list-item strong, .order-list-item small { display: block; }
.order-list-item strong { font-size: 12px; }
.order-list-item small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.order-list-item time { color: var(--muted); font-size: 10px; }
.status { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin-top: 9px; padding: 5px 8px; border-radius: 99px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--open { color: #47715f; background: var(--mint); }
.status--pending { color: #987323; background: var(--gold-soft); }
.status--signed { color: #4c7097; background: var(--blue-soft); }
.status--cancelled { color: #a74b44; background: var(--red-soft); }
.empty-state { padding: 46px 24px; color: var(--muted); text-align: center; }
.empty-state svg { width: 32px; height: 32px; margin-bottom: 12px; }

/* Calendar */
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.calendar-month-nav { display: flex; align-items: center; gap: 8px; }
.calendar-month-nav h2 { min-width: 180px; margin: 0 6px; font-size: 19px; text-align: center; }
.segmented { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.segmented button { min-height: 33px; padding: 0 12px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.segmented button.is-active { color: white; background: var(--forest); }
.month-card { overflow: hidden; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-weekdays { border-bottom: 1px solid var(--line); background: #fafaf7; }
.calendar-weekdays span { padding: 13px; color: var(--muted); font-size: 10px; font-weight: 800; text-align: center; text-transform: uppercase; }
.calendar-cell { min-height: 118px; padding: 9px; border-right: 1px solid #ecece7; border-bottom: 1px solid #ecece7; background: #fff; }
.calendar-cell:nth-child(7n) { border-right: 0; }
.calendar-cell.is-outside { color: #b2b6b3; background: #fafaf8; }
.calendar-cell.is-today .day-number { color: white; background: var(--forest); }
.day-number { width: 28px; height: 28px; display: grid; place-items: center; margin-bottom: 6px; border-radius: 9px; font-size: 11px; font-weight: 700; }
.calendar-event { display: block; width: 100%; margin: 4px 0; padding: 5px 7px; overflow: hidden; border: 0; border-radius: 6px; color: #35604f; background: #e1f0e8; font-size: 9px; font-weight: 700; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.calendar-event--gold { color: #765a1b; background: #fff0c7; }
.calendar-event--blue { color: #486986; background: #e5edf6; }
.calendar-event:hover { filter: brightness(.97); }
.agenda-list { display: none; }

/* Work orders */
.filter-row { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.customer-count { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 700; }
.customer-building-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #3e6e5b; background: var(--mint); }
.customer-building-icon svg { width: 17px; }
.search-box { position: relative; flex: 1; max-width: 420px; }
.search-box svg { position: absolute; left: 14px; top: 14px; width: 17px; color: var(--muted); }
.search-box input { padding-left: 42px; background: white; }
.select-compact { width: auto; min-width: 150px; }
.workorder-mailbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 12px 14px 12px 18px; border: 1px solid #deded7; border-radius: 14px; background: #fff; transition: border-color .16s, background .16s; }
.workorder-mailbar.has-selection { border-color: #d8c17e; background: #fffaf0; }
.workorder-mailbar__count { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 6px; color: #4e5954; font-size: 11px; }
.workorder-mailbar__count strong { color: var(--forest); font: 800 18px/1 'Manrope', sans-serif; }
.workorder-mailbar__count small { grid-column: 1 / -1; margin-top: 4px; color: var(--muted); font-size: 9px; }
.workorder-mailbar__actions { display: flex; align-items: center; gap: 8px; }
.table-card { overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 13px 18px; color: var(--muted); background: #fafaf7; font-size: 9px; font-weight: 800; text-align: left; text-transform: uppercase; letter-spacing: .08em; }
.data-table td { padding: 17px 18px; border-top: 1px solid #ecece7; font-size: 12px; }
.data-table tbody tr { cursor: pointer; transition: background .14s; }
.data-table tbody tr:hover { background: #fbfbf8; }
.data-table tbody tr.is-selected { background: #fff9e9; }
.workorder-check-cell { width: 54px; padding-right: 4px !important; text-align: center !important; }
.workorder-check { position: relative; display: inline-grid; width: 24px; height: 24px; place-items: center; cursor: pointer; }
.workorder-check input, .mobile-workorder-check input { position: absolute; opacity: 0; pointer-events: none; }
.workorder-check span { width: 20px; height: 20px; display: block; border: 2px solid #aeb6b1; border-radius: 6px; background: #fff; transition: border-color .15s, background .15s; }
.workorder-check input:checked + span { border-color: var(--forest); background: var(--forest); box-shadow: inset 0 0 0 4px #fff; }
.workorder-check input:focus-visible + span, .mobile-workorder-check input:focus-visible + span { outline: 3px solid rgba(244, 197, 93, .65); outline-offset: 2px; }
.table-primary strong, .table-primary small { display: block; }
.table-primary strong { margin-bottom: 4px; }
.table-primary small { color: var(--muted); }
.table-assignee { display: flex; align-items: center; gap: 9px; }
.table-assignee .avatar { width: 29px; height: 29px; border-radius: 9px; font-size: 8px; }
.mobile-order-cards { display: none; }
.email-order-summary { display: grid; gap: 8px; margin-bottom: 18px; }
.email-order-summary > span { display: grid; grid-template-columns: 105px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid #e2e3de; border-radius: 10px; background: #fafaf7; font-size: 10px; }
.email-order-summary > span > strong { font-size: 11px; }
.unsigned-email-note { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 18px; padding: 13px 14px; border-radius: 11px; color: #755a23; background: #fff4d9; font-size: 10px; line-height: 1.5; }
.unsigned-email-note svg { width: 18px; flex: 0 0 auto; }
.unsigned-email-note strong, .unsigned-email-note span { display: block; }

/* Team & settings */
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 16px; }
.team-card { padding: 22px; }
.team-card__top { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.team-card__top .avatar { width: 45px; height: 45px; border-radius: 14px; }
.team-card__top h3 { margin: 0 0 4px; font-size: 14px; }
.team-card__top p { margin: 0; color: var(--muted); font-size: 10px; }
.role-tag { margin-left: auto; padding: 5px 8px; border-radius: 7px; color: #5c695f; background: #efefe9; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.team-meta { display: grid; gap: 10px; margin-bottom: 18px; color: var(--muted); font-size: 11px; }
.team-meta span { display: flex; align-items: center; gap: 8px; }
.team-meta svg { width: 15px; }
.team-card__footer { display: flex; justify-content: space-between; align-items: center; padding-top: 15px; border-top: 1px solid #ecece7; }
.availability { display: flex; align-items: center; gap: 7px; color: #47705e; font-size: 10px; font-weight: 700; }
.availability::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #67a887; }
.availability--off { color: var(--muted); }
.availability--off::before { background: #a9afac; }
.settings-layout { display: grid; grid-template-columns: 230px 1fr; gap: 20px; }
.settings-menu { align-self: start; padding: 10px; }
.settings-menu button { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 0; border-radius: 9px; color: var(--muted); background: none; font-size: 12px; font-weight: 700; cursor: pointer; }
.settings-menu button.is-active { color: var(--forest); background: #edf2ee; }
.settings-menu svg { width: 17px; }
.settings-panel { padding: 26px; }
.settings-panel h2 { margin-bottom: 6px; font-size: 19px; }
.settings-panel > p { margin-bottom: 26px; color: var(--muted); font-size: 12px; }
.company-settings { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.company-settings > p { padding: 0; background: transparent; }
.company-logo-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 22px; }
.company-logo-editor > small { width: 100%; color: var(--muted); font-size: 9px; }
.company-logo-preview { width: 245px; min-height: 63px; display: grid; place-items: center; padding: 8px 10px; border-radius: 9px; background: #222b30; }
.company-logo-preview img { display: block; width: 100%; max-height: 55px; object-fit: contain; }
.company-logo-preview > span { width: 47px; height: 47px; display: grid; place-items: center; border-radius: 12px; color: white; background: var(--portal-color); font-weight: 800; }
.company-upload-button { position: relative; }
.portal-manager { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.portal-manager__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.portal-manager__header h4 { margin-bottom: 7px; }
.portal-manager__header p { max-width: 650px; margin-bottom: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.portal-list { display: grid; gap: 11px; margin-top: 18px; }
.portal-upgrade-note { display: flex; align-items: flex-start; gap: 11px; margin-top: 18px; padding: 13px 14px; border: 1px solid #ead8a6; border-radius: 11px; color: #715d2e; background: #fff8e3; font-size: 10px; line-height: 1.5; }
.portal-upgrade-note > svg { width: 18px; flex: 0 0 auto; margin-top: 1px; }
.portal-upgrade-note span, .portal-upgrade-note strong { display: block; }
.portal-upgrade-note strong { margin-bottom: 2px; color: #5e4a1e; }
.portal-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 15px; border: 1px solid #e4e6e1; border-radius: 13px; background: #fbfbf8; }
.portal-card.is-current { border-color: #9fc3b1; background: #f1f7f3; box-shadow: inset 3px 0 0 var(--mint-strong); }
.portal-card.is-archived { border-style: dashed; background: #f3f3f0; }
.portal-card__logo { width: 58px; height: 48px; display: grid; place-items: center; overflow: hidden; padding: 5px; border-radius: 10px; background: #222b30; }
.portal-card__logo img { display: block; width: 100%; max-height: 38px; object-fit: contain; }
.portal-card__logo > span { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--portal-color); font-size: 10px; font-weight: 800; }
.portal-card__content { min-width: 0; }
.portal-card__status { display: block; margin-bottom: 4px; color: #87713e; font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.portal-card h5 { margin: 0 0 4px; overflow: hidden; font: 800 13px/1.2 'Manrope', sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.portal-card p { margin: 0 0 8px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.portal-card__stats { display: flex; flex-wrap: wrap; gap: 12px; color: #66716c; font-size: 8px; }
.portal-card__stats strong { color: var(--forest); }
.portal-card__actions { min-width: 132px; display: grid; gap: 6px; }
.portal-card__actions .button { min-height: 35px; padding: 0 11px; font-size: 9px; }
.portal-delete-button { border: 0; color: #a23e38; background: transparent; }
.portal-delete-button:hover { color: white; background: var(--red); }
.portal-delete-button svg { width: 14px; }
.protected-portal { max-width: 132px; color: #7a837f; font-size: 8px; line-height: 1.35; text-align: center; }
.protected-admin { color: #8a7650; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.danger-summary { display: grid; gap: 5px; margin-bottom: 18px; padding: 14px; border: 1px solid #efc4c0; border-radius: 11px; color: #7e302c; background: var(--red-soft); font-size: 11px; line-height: 1.5; }
.danger-summary strong { font-size: 12px; }
.profile-settings { display: grid; grid-template-columns: 90px 1fr; gap: 28px; }
.profile-settings .avatar { width: 80px; height: 80px; border-radius: 23px; font-size: 21px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 19px; border-top: 1px solid var(--line); }
.toggle-row { display: flex; justify-content: space-between; gap: 20px; padding: 17px 0; border-bottom: 1px solid #ecece7; }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { margin-bottom: 5px; font-size: 12px; }
.toggle-row small { color: var(--muted); font-size: 10px; }
.switch { position: relative; width: 43px; height: 24px; flex: 0 0 auto; border: 0; border-radius: 13px; background: #cfd2cf; cursor: pointer; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.17); transition: left .18s; }
.switch.is-on { background: #4f876e; }
.switch.is-on::after { left: 22px; }

/* Modals */
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(14, 27, 23, .5); backdrop-filter: blur(3px); animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(100%, 640px); max-height: min(90vh, 850px); overflow: auto; border-radius: 20px; background: white; box-shadow: 0 25px 80px rgba(0,0,0,.22); animation: pop .2s ease; }
.modal--large { width: min(100%, 760px); }
.modal--workorder { width: min(96vw, 1180px); max-height: 94vh; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.modal__header { position: sticky; z-index: 2; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 17px; border-bottom: 1px solid #ecece7; background: white; }
.modal__header h2 { margin: 2px 0 4px; font-size: 21px; }
.modal__header p { margin: 0; color: var(--muted); font-size: 11px; }
.modal__body { padding: 23px 26px 26px; }
.modal__footer { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 17px 26px; border-top: 1px solid #ecece7; background: #fff; }
.detail-hero { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid #ecece7; }
.detail-hero h3 { margin-bottom: 7px; }
.detail-hero p { color: var(--muted); font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-bottom: 21px; }
.detail-item { padding: 14px; border-radius: 11px; background: #f6f6f2; }
.detail-item small, .detail-item strong { display: block; }
.detail-item small { margin-bottom: 7px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.detail-item strong { font-size: 12px; }
.detail-section { margin-top: 21px; }
.detail-section h4 { margin-bottom: 10px; font-size: 12px; }
.detail-section p { padding: 15px; border-radius: 11px; color: #55615c; background: #f7f7f3; font-size: 11px; line-height: 1.7; }

/* Digitale werkbon */
.workorder-editor, .workorder-viewer { padding: 20px; background: #e9ebe7; }
.digital-workorder { overflow: hidden; border: 1px solid #c9cec9; border-radius: 8px; color: #17201c; background: #fff; box-shadow: 0 8px 24px rgba(26, 37, 32, .07); }
.workorder-letterhead { min-height: 105px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 20px 24px; border-bottom: 3px solid var(--forest); }
.workorder-company { display: flex; align-items: center; gap: 15px; min-width: 0; }
.workorder-official-logo { width: 315px; flex: 0 0 auto; padding: 9px 12px; border-radius: 6px; background: #222b30; }
.workorder-official-logo img { display: block; width: 100%; height: auto; }
.workorder-logo-fallback { min-height: 66px; display: grid; place-items: center; border-radius: 5px; color: white; background: var(--portal-color); font: 800 24px/1 'Manrope', sans-serif; }
.workorder-company address { min-width: 185px; color: #4d5853; font-size: 8px; font-style: normal; line-height: 1.42; }
.workorder-company address strong, .workorder-company address span { display: block; }
.workorder-company address strong { margin-bottom: 3px; color: #202b26; font-size: 9px; }
.workorder-logo { display: flex; align-items: center; gap: 13px; }
.workorder-logo__mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50% 50% 48% 45%; color: white; background: var(--forest); box-shadow: inset -10px -8px 0 var(--gold); font: 800 22px/1 'Manrope', sans-serif; }
.workorder-logo strong, .workorder-logo small { display: block; }
.workorder-logo strong { font: 800 22px/1.1 'Manrope', sans-serif; letter-spacing: -.04em; text-transform: uppercase; }
.workorder-logo small { margin-top: 5px; color: #68716c; font-size: 8px; font-weight: 800; letter-spacing: .22em; }
.workorder-number { display: flex; align-items: flex-end; gap: 12px; }
.workorder-number label { display: grid; gap: 5px; color: #59635e; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.workorder-number input { min-height: 39px; width: 145px; border-radius: 6px; }
.workorder-number > span { display: block; min-width: 120px; text-align: right; }
.workorder-number > span small, .workorder-number > span strong { display: block; }
.workorder-number > span small { margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.workorder-number > span strong { font-size: 15px; }
.workorder-party-grid { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #6f7773; }
.paper-fields { padding: 15px 20px; }
.paper-fields + .paper-fields, .paper-summary + .paper-summary { border-left: 1px solid #6f7773; }
.paper-fields label { min-height: 47px; display: grid; grid-template-columns: 135px 1fr; align-items: center; color: #28332e; font-size: 11px; font-weight: 800; }
.paper-fields input, .paper-fields select, .paper-fields textarea { min-height: 38px; padding: 7px 9px; border: 0; border-bottom: 1px solid #9da49f; border-radius: 0; background: transparent; font-size: 12px; }
.paper-fields textarea { min-height: 48px; }
.customer-paper-field small { grid-column: 2; margin-top: -5px; padding-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 500; }
.workorder-assignment { min-height: 70px; display: grid; grid-template-columns: 135px 1fr; align-items: start; padding: 13px 20px; border-bottom: 1px solid #6f7773; font-size: 11px; }
.workorder-assignment strong { padding-top: 11px; }
.workorder-assignment textarea { min-height: 55px; border: 0; border-bottom: 1px solid #9da49f; border-radius: 0; background: transparent; }
.paper-summary { margin: 0; padding: 15px 20px; }
.paper-summary > div { min-height: 43px; display: grid; grid-template-columns: 135px 1fr; align-items: center; border-bottom: 1px solid #c4c7c4; }
.paper-summary > div:last-child { border-bottom: 0; }
.paper-summary dt { font-size: 10px; font-weight: 800; }
.paper-summary dd { margin: 0; font-size: 11px; white-space: pre-wrap; }
.paper-assignment { min-height: 64px; display: grid; grid-template-columns: 135px 1fr; align-items: start; padding: 13px 20px; border-bottom: 1px solid #6f7773; }
.paper-assignment strong { font-size: 10px; }
.paper-assignment p { margin: 0; white-space: pre-wrap; font-size: 11px; line-height: 1.5; }
.workorder-section-title { display: grid; grid-template-columns: 1fr 1fr; padding: 9px 20px; border-bottom: 1px solid #222; background: #f1f2ef; font-size: 12px; font-weight: 800; text-align: center; }
.worktable-scroll { overflow-x: auto; }
.work-sheet-table { width: 100%; min-width: 850px; border-collapse: collapse; table-layout: fixed; }
.work-sheet-table th, .work-sheet-table td { height: 42px; padding: 5px; border-right: 1px solid #79807c; border-bottom: 1px solid #79807c; font-size: 10px; text-align: center; }
.work-sheet-table th { height: 44px; background: #f3f3f0; font-weight: 800; }
.work-sheet-table th:nth-child(1), .work-sheet-table th:nth-child(2), .work-sheet-table th:nth-child(3), .work-sheet-table th:nth-child(4) { width: 10%; }
.work-sheet-table th:nth-child(5) { width: 19%; }
.work-sheet-table th:nth-child(6) { width: 19%; }
.work-sheet-table th:nth-child(7) { width: 13%; }
.work-sheet-table tr > *:last-child { border-right: 0; }
.work-sheet-table input { min-height: 34px; padding: 5px 6px; border: 0; border-radius: 4px; background: #f8faf8; font-size: 11px; text-align: center; }
.work-sheet-table input:focus { background: #fff; }
.workline-action { width: 42px !important; }
.workline-action .icon-button { width: 30px; height: 30px; color: #9a625d; }
.add-workline { margin: 10px 14px; min-height: 36px; font-size: 10px; }
.workorder-extras { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #6f7773; border-bottom: 1px solid #6f7773; }
.extras-checks { display: grid; grid-template-columns: 1fr 1fr; padding: 10px 14px; }
.extras-checks label { min-height: 38px; display: flex; align-items: center; gap: 9px; padding: 6px; border-bottom: 1px solid #d5d8d4; font-size: 10px; cursor: pointer; }
.extras-checks input { width: 18px; height: 18px; min-height: 18px; flex: 0 0 auto; accent-color: var(--forest); }
.extras-text { padding: 10px 14px; border-left: 1px solid #6f7773; }
.extras-text label { min-height: 38px; display: grid; grid-template-columns: 165px 1fr; align-items: center; gap: 8px; border-bottom: 1px solid #d5d8d4; font-size: 10px; font-weight: 700; }
.extras-text input { min-height: 31px; padding: 4px 6px; border: 0; border-bottom: 1px solid #aab0ac; border-radius: 0; background: transparent; font-size: 10px; }
.workorder-extras--view { padding: 13px 17px; gap: 20px; }
.workorder-extras--view > div + div { padding-left: 20px; border-left: 1px solid #aeb4b0; }
.workorder-extras--view h4 { margin: 0 0 9px; font-size: 10px; }
.workorder-extras--view small { color: var(--muted); font-size: 9px; }
.workorder-extras--view p { margin: 4px 0; font-size: 9px; }
.checked-extra { display: inline-flex; align-items: center; gap: 5px; margin: 2px 10px 2px 0; font-size: 9px; }
.checked-extra svg { width: 13px; height: 13px; color: #44725e; }
.workorder-hours { border-bottom: 1px solid #6f7773; }
.hours-head { min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 7px 17px; border-bottom: 1px solid #a6aba8; background: #f3f3f0; }
.hours-head strong { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.hours-head label { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 700; }
.hours-head input { width: 70px; min-height: 30px; padding: 4px 7px; }
.hours-grid { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(6, 1fr); }
.hours-grid label { display: grid; gap: 5px; padding: 9px; border-right: 1px solid #aeb4b0; font-size: 9px; font-weight: 800; text-align: center; }
.hours-grid label:last-child { border-right: 0; }
.hours-grid input { min-height: 34px; padding: 4px 6px; text-align: center; }
.hours-grid .worker-name input { text-align: left; }
.hours-view { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(6, 1fr) 1fr; }
.hours-view > span { min-height: 55px; display: grid; place-items: center; align-content: center; gap: 5px; border-right: 1px solid #aeb4b0; }
.hours-view > span:last-child { border-right: 0; }
.hours-view small, .workorder-completion--view small { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.hours-view strong { font-size: 11px; }
.hours-total { background: #f6f0dc; }
.workorder-completion { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 14px; padding: 14px 17px; }
.workorder-completion label { display: grid; gap: 6px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.workorder-completion input, .workorder-completion select { min-height: 37px; }
.workorder-completion--view > span { display: grid; gap: 7px; padding: 9px 12px; border-radius: 7px; background: #f5f5f1; }
.workorder-completion--view strong { font-size: 12px; }
.workorder-completion--view .status { margin-top: 0; }
.workorder-viewer > .signature-section { max-width: 760px; margin: 20px auto 0; }
.signature-section { padding: 20px; border: 1px solid #dce5e0; border-radius: 16px; background: #f7faf8; }
.signature-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.signature-title h4 { margin: 0 0 4px; font-size: 14px; }
.signature-title small { color: var(--muted); font-size: 10px; }
.signature-device { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 8px; color: #376452; background: var(--mint); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.signature-device svg { width: 14px; height: 14px; }
.signature-box { position: relative; overflow: hidden; min-height: 230px; border: 2px solid #7e9d90; border-radius: 13px; background: repeating-linear-gradient(0deg, #fff 0, #fff 31px, #f1f4f2 32px); box-shadow: inset 0 1px 4px rgba(25, 53, 47, .06); }
.signature-box::after { content: ''; position: absolute; right: 24px; bottom: 41px; left: 24px; height: 1px; background: #9caaa4; pointer-events: none; }
.signature-box__label { position: absolute; z-index: 1; top: 13px; left: 15px; padding: 4px 7px; border-radius: 5px; color: #4f655c; background: #edf3f0; font-size: 8px; font-weight: 800; letter-spacing: .1em; pointer-events: none; }
.signature-canvas { position: relative; z-index: 2; display: block; width: 100%; height: 230px; touch-action: none; cursor: crosshair; }
.signature-hint { position: absolute; z-index: 1; inset: 48px 20px 45px; display: grid; place-items: center; color: #89968f; font-size: 12px; font-weight: 600; text-align: center; pointer-events: none; }
.signature-line-label { position: absolute; z-index: 3; right: 25px; bottom: 20px; color: #87928d; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; pointer-events: none; }
.signature-box.has-signature .signature-hint { display: none; }
.signature-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.signature-actions .button--small { min-height: 36px; padding: 0 11px; font-size: 10px; }
.signer-field { display: grid; gap: 7px; margin-top: 18px; color: #4b5651; font-size: 11px; font-weight: 700; }
.signature-consent { padding: 13px; border-radius: 10px; background: #fff; }
.signed-preview { padding: 18px; border: 1px solid #dfe8e3; border-radius: 13px; background: #f6fbf8; }
.signed-preview img { display: block; max-width: 240px; height: 75px; object-fit: contain; margin: 3px 0 8px; mix-blend-mode: multiply; }
.signed-preview small { color: var(--muted); font-size: 9px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.check-row input { width: 16px; min-height: 16px; margin-top: 1px; }
.toast-region { position: fixed; z-index: 200; right: 22px; top: 22px; display: grid; gap: 10px; pointer-events: none; }
.toast { min-width: 270px; display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-radius: 12px; color: white; background: var(--forest); box-shadow: var(--shadow); font-size: 12px; animation: toast-in .24s ease; }
.toast svg { width: 18px; color: var(--gold); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-7px); } }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  :root { --radius: 15px; }
  .login-screen { display: block; }
  .login-art { display: none; }
  .login-panel { padding: 28px 24px; }
  .mobile-brand { display: flex; }
  .mobile-brand.werksamen-brand { gap: 12px; }
  .mobile-brand .werksamen-brand__mark { width: 44px; height: 44px; }
  .mobile-brand .werksamen-brand__copy strong { font-size: 24px; }
  .portal-context-button { width: 42px; padding: 0; justify-content: center; }
  .portal-context-button > span { display: none; }
  .sidebar { display: none; }
  .app-shell { padding-top: 68px; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .mobile-header { position: fixed; z-index: 30; inset: 0 0 auto 0; height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; border-bottom: 1px solid #e2e2dc; background: rgba(251, 250, 247, .96); backdrop-filter: blur(12px); }
  .mobile-header .brand { font-size: 17px; }
  .mobile-header .official-brand { width: 174px; padding: 6px 8px; }
  .mobile-header .official-brand img { max-width: 158px; }
  .mobile-header .brand-mark { width: 33px; height: 33px; border-radius: 10px; font-size: 15px; }
  .content { min-height: calc(100vh - 140px); margin-left: 0; padding: 22px 16px 30px; }
  .bottom-nav { position: fixed; z-index: 40; inset: auto 0 0; height: calc(70px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(6, 1fr); align-items: start; padding: 7px 3px env(safe-area-inset-bottom); border-top: 1px solid #deded8; background: rgba(251, 250, 247, .98); backdrop-filter: blur(14px); }
  .bottom-nav__item { min-width: 0; min-height: 56px; display: grid; place-items: center; align-content: center; gap: 4px; padding-inline: 1px; border: 0; color: #7e8581; background: transparent; font-size: 7px; font-weight: 700; }
  .bottom-nav__item svg { width: 20px; height: 20px; }
  .bottom-nav__item.is-active { color: var(--forest); }
  .bottom-nav__add { position: relative; top: -23px; width: 54px; height: 54px; justify-self: center; display: grid; place-items: center; border: 5px solid var(--canvas); border-radius: 50%; color: var(--forest); background: var(--gold); box-shadow: 0 8px 16px rgba(62, 54, 31, .18); }
  .bottom-nav__add svg { width: 22px; height: 22px; stroke-width: 2.4; }
  .page-header { margin-bottom: 22px; }
  .page-header h1 { font-size: 27px; }
  .page-header p { font-size: 12px; }
  .header-actions .button span { display: none; }
  .header-actions .button { width: 44px; padding: 0; }
  .notification-button { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 118px; padding: 17px; }
  .stat-card__icon { top: 15px; right: 15px; width: 32px; height: 32px; }
  .stat-card small { max-width: 75px; margin-bottom: 13px; font-size: 9px; }
  .stat-card strong { font-size: 27px; }
  .stat-card span:last-child { font-size: 9px; }
  .card-header { padding: 19px 18px 14px; }
  .date-strip { padding: 0 12px 15px; gap: 3px; }
  .date-pill { min-height: 54px; }
  .timeline { padding: 7px 16px 14px; }
  .timeline-row { grid-template-columns: 45px 3px 1fr; gap: 10px; }
  .mini-assignee { display: none; }
  .orders-card { display: none; }
  .calendar-toolbar { align-items: stretch; flex-direction: column; }
  .calendar-month-nav { justify-content: space-between; }
  .calendar-month-nav h2 { min-width: 0; font-size: 17px; }
  .segmented { align-self: flex-start; }
  .month-card { display: none; }
  .agenda-list { display: grid; gap: 11px; }
  .agenda-day { margin-top: 9px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
  .agenda-event { width: 100%; display: grid; grid-template-columns: 46px 4px 1fr auto; gap: 11px; align-items: center; padding: 15px; border: 1px solid #e4e4de; border-radius: 13px; text-align: left; background: white; }
  .agenda-event .avatar { width: 28px; height: 28px; border-radius: 8px; font-size: 8px; }
  .filter-row { flex-wrap: wrap; }
  .search-box { min-width: 100%; max-width: none; }
  .select-compact { flex: 1; min-width: 120px; }
  .table-card { display: none; }
  .mobile-order-cards { display: grid; gap: 11px; }
  .workorder-mailbar { align-items: stretch; flex-direction: column; padding: 14px; }
  .workorder-mailbar__actions { display: grid; grid-template-columns: auto 1fr; }
  .workorder-mailbar__actions .button { padding-inline: 12px; font-size: 9px; }
  .mobile-order { position: relative; display: grid; gap: 9px; padding: 12px; border: 1px solid #e2e2dc; border-radius: 14px; text-align: left; background: white; }
  .mobile-order.is-selected { border-color: #d8c17e; background: #fffaf0; }
  .mobile-workorder-check { width: fit-content; display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 7px; color: #56625c; background: #f1f2ee; font-size: 9px; font-weight: 800; cursor: pointer; }
  .mobile-workorder-check::before { content: ''; width: 16px; height: 16px; border: 2px solid #aeb6b1; border-radius: 5px; background: white; }
  .mobile-workorder-check:has(input:checked) { color: white; background: var(--forest); }
  .mobile-workorder-check:has(input:checked)::before { border-color: white; background: var(--gold); box-shadow: inset 0 0 0 3px var(--forest); }
  .mobile-order__open { width: 100%; display: grid; gap: 13px; padding: 5px; border: 0; text-align: left; background: transparent; cursor: pointer; }
  .mobile-order__top { display: flex; justify-content: space-between; gap: 12px; }
  .mobile-order h3 { margin: 0 0 5px; font-size: 13px; }
  .mobile-order p { margin: 0; color: var(--muted); font-size: 10px; }
  .mobile-order__meta { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid #eeeeea; color: var(--muted); font-size: 9px; }
  .team-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-menu { display: flex; overflow-x: auto; }
  .settings-menu button { flex: 0 0 auto; width: auto; }
  .settings-panel { padding: 20px; }
  .portal-manager__header { flex-direction: column; }
  .portal-manager__header .button { width: 100%; }
  .portal-card { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
  .portal-card__logo { width: 48px; height: 44px; }
  .portal-card__actions { grid-column: 1 / -1; width: 100%; }
  .protected-portal { max-width: none; }
  .profile-settings { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; }
  .modal--workorder { max-height: 95vh; }
  .modal__header { padding: 21px 20px 15px; }
  .modal__body { padding: 20px; }
  .modal__footer { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); }
  .email-order-summary > span { grid-template-columns: 88px minmax(0, 1fr); }
  .email-order-summary .status { grid-column: 1 / -1; width: fit-content; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .workorder-editor, .workorder-viewer { padding: 10px; }
  .workorder-letterhead { min-height: 88px; padding: 15px; gap: 12px; }
  .workorder-company { display: grid; gap: 8px; }
  .workorder-official-logo { width: min(54vw, 245px); padding: 7px 9px; }
  .workorder-company address { min-width: 0; font-size: 7px; }
  .workorder-company address strong { font-size: 8px; }
  .workorder-logo__mark { width: 40px; height: 40px; font-size: 17px; }
  .workorder-logo strong { max-width: 135px; font-size: 15px; }
  .workorder-logo small { letter-spacing: .13em; }
  .workorder-number { display: grid; gap: 6px; }
  .workorder-number input { width: 126px; min-height: 35px; }
  .workorder-number > span { min-width: 95px; }
  .workorder-party-grid { grid-template-columns: 1fr; }
  .paper-fields + .paper-fields, .paper-summary + .paper-summary { border-top: 1px solid #6f7773; border-left: 0; }
  .paper-fields, .paper-summary { padding: 11px 13px; }
  .paper-fields label, .paper-summary > div { grid-template-columns: 115px 1fr; }
  .customer-paper-field small { grid-column: 2; }
  .workorder-assignment, .paper-assignment { grid-template-columns: 105px 1fr; padding: 11px 13px; }
  .workorder-section-title { display: block; padding: 8px 10px; }
  .workorder-section-title span { display: none; }
  .work-sheet-table { min-width: 0; }
  .work-sheet-table thead { display: none; }
  .work-sheet-table tbody { display: grid; gap: 10px; padding: 10px; background: #edf0ed; }
  .work-sheet-table tr { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid #b9bfbb; border-radius: 10px; background: white; }
  .work-sheet-table td { width: auto !important; min-height: 57px; height: auto; display: grid; gap: 5px; padding: 8px; border-right: 1px solid #d9dcd9; border-bottom: 1px solid #d9dcd9; text-align: left; }
  .work-sheet-table td::before { content: attr(data-label); color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
  .work-sheet-table td:nth-child(2n) { border-right: 0; }
  .work-sheet-table td.workline-action { display: grid; grid-column: 1 / -1; place-items: center; min-height: 39px; }
  .work-sheet-table input { text-align: left; }
  .workorder-extras { grid-template-columns: 1fr; }
  .extras-checks { grid-template-columns: 1fr 1fr; padding: 8px; }
  .extras-text { padding: 8px 12px; border-top: 1px solid #6f7773; border-left: 0; }
  .extras-text label { grid-template-columns: 145px 1fr; }
  .workorder-extras--view > div + div { padding: 12px 0 0; border-top: 1px solid #aeb4b0; border-left: 0; }
  .hours-grid { grid-template-columns: repeat(3, 1fr); }
  .hours-grid .worker-name { grid-column: 1 / -1; }
  .hours-view { grid-template-columns: repeat(4, 1fr); }
  .hours-view .worker-hours { grid-column: 1 / -1; }
  .workorder-completion { grid-template-columns: 1fr 1fr; }
  .workorder-completion label:last-child, .workorder-completion--view > span:last-child { grid-column: 1 / -1; }
  .signature-section { margin-inline: -4px; padding: 15px; }
  .signature-title { align-items: center; }
  .signature-device { max-width: 116px; }
  .signature-box, .signature-canvas { min-height: 245px; height: 245px; }
  .signature-actions { align-items: flex-start; gap: 10px; }
  .signature-actions small { max-width: 150px; text-align: right; }
  .toast-region { inset: 14px 14px auto; }
  .toast { min-width: 0; }
}

@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card__icon { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .login-box h2 { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
