:root {
  color-scheme: light;
  --bg: #f5f8f7;
  --surface: #ffffff;
  --surface-muted: #eef5f2;
  --ink: #162523;
  --muted: #6b7f7b;
  --line: #d9e5e1;
  --brand: #176b68;
  --brand-strong: #0f5553;
  --brand-soft: #dff3ef;
  --gold: #f5b84b;
  --blue: #2f6fdd;
  --rose: #cc4b68;
  --green: #168455;
  --shadow: 0 18px 42px rgba(18, 43, 40, 0.12);
  --radius: 8px;
  --font: "Cairo";
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(23, 107, 104, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(245, 184, 75, 0.14), transparent 42%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  min-height: 100vh;
}

body.auth-mode {
  align-items: center;
  display: grid;
  min-height: 100vh;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  background: #103d3d;
  color: #eefcf8;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  min-height: 48px;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(145deg, #e9fff8, #f5b84b);
  border-radius: 8px;
  color: #0f5553;
  display: inline-flex;
  font-size: 23px;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.4;
}

.brand span:not(.brand-mark) {
  color: #a9d2cb;
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #dcefed;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 45px;
  padding: 6px 10px;
  text-align: right;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  width: 100%;
}

.nav-button:hover,
.nav-button.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.nav-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.nav-count {
  background: #f5b84b;
  border-radius: 999px;
  color: #163431;
  font-size: 12px;
  font-weight: 800;
  min-width: 25px;
  padding: 3px 7px;
  text-align: center;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.main {
  min-width: 0;
  padding: 22px;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.eyebrow {
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 4px;
}

h1 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0;
}

h2,
h3,
p {
  margin-top: 0;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.user-session {
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 10px;
  min-height: 42px;
  padding: 6px 8px 6px 12px;
}

.user-session strong,
.user-session span {
  display: block;
}

.user-session strong {
  font-size: 13px;
  line-height: 1.2;
}

.user-session span {
  color: var(--muted);
  font-size: 12px;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  padding: 18px;
  place-items: center;
}

.login-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
  max-width: 440px;
  padding: 24px;
  width: min(440px, calc(100vw - 36px));
}

.login-brand .brand-mark {
  background: linear-gradient(145deg, var(--brand), var(--gold));
  color: #fff;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-hints {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 5px;
  padding-top: 12px;
}

.form-error {
  background: #ffe8ec;
  border: 1px solid #ffc8d4;
  border-radius: var(--radius);
  color: #9f2945;
  font-size: 14px;
  margin: 0;
  padding: 9px 10px;
}

.search-box input,
.field input,
.field select,
.field textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  min-height: 42px;
  outline: none;
  padding: 9px 12px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  width: 100%;
}

.search-box input {
  min-width: min(360px, 38vw);
}

.search-box input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 107, 104, 0.12);
}

.icon-button,
.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  align-items: center;
  border: 0;
  border-radius: var(--radius);
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
}

.icon-button {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  min-width: 42px;
  position: relative;
}

.icon-button small {
  background: var(--rose);
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  min-width: 20px;
  padding: 2px 5px;
  position: absolute;
  right: -7px;
  top: -7px;
}

.primary-button {
  background: var(--brand);
  color: #fff;
}

.primary-button:hover {
  background: var(--brand-strong);
}

.secondary-button {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #eefcf8;
}

.danger-button {
  background: #ffe8ec;
  color: #a8324d;
}

.full-width {
  width: 100%;
}

.view {
  display: grid;
  gap: 18px;
}

.ops-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(23, 107, 104, 0.96), rgba(16, 61, 61, 0.96)),
    #103d3d;
  border-radius: 10px;
  box-shadow: var(--shadow);
  color: #fff;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 132px;
  overflow: hidden;
  padding: 22px;
  position: relative;
}

.ops-hero::after {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.13)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 18px);
  content: "";
  inset: 0;
  opacity: 0.45;
  pointer-events: none;
  position: absolute;
}

.ops-hero > * {
  position: relative;
  z-index: 1;
}

.ops-hero .eyebrow {
  color: #f8d792;
}

.ops-hero h2 {
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: 0;
  line-height: 1.35;
  margin: 0;
  max-width: 780px;
}

.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.metric-grid,
.panel-grid {
  display: grid;
  gap: 14px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.metric-card,
.panel,
.list-card,
.conversation-card,
.employee-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(217, 229, 225, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.metric-card {
  min-height: 116px;
  padding: 16px;
}

.metric-card span {
  color: var(--muted);
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
}

.metric-card strong {
  display: block;
  font-size: 32px;
  line-height: 1;
}

.metric-card small {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 12px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

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

.mini-stat {
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 12px;
}

.mini-stat strong {
  color: var(--brand-strong);
  font-size: 24px;
  line-height: 1;
}

.mini-stat span {
  color: var(--muted);
  font-size: 13px;
}

.panel-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-header h2,
.panel-header h3 {
  font-size: 18px;
  margin: 0;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  padding: 12px 10px;
  text-align: right;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

td {
  color: var(--ink);
}

tbody tr:hover {
  background: #f7fbfa;
}

.badge,
.priority,
.channel-chip {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 25px;
  padding: 4px 9px;
  white-space: nowrap;
}

.badge.new,
.badge.pending {
  background: #fff3d6;
  color: #81540e;
}

.badge.assigned,
.badge.scheduled,
.badge.in-progress {
  background: #ddeafe;
  color: #244d91;
}

.badge.complete {
  background: #ddf5e8;
  color: #17633f;
}

.badge.delayed,
.badge.cancelled {
  background: #ffe5eb;
  color: #9f2945;
}

.priority.high {
  background: #ffe5eb;
  color: #9f2945;
}

.priority.medium {
  background: #fff3d6;
  color: #7d550d;
}

.priority.low {
  background: #e7f2ff;
  color: #285ca8;
}

.row-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-button {
  background: #f2f6f5;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  min-height: 32px;
  padding: 6px 10px;
}

.mini-button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.mini-button.warn {
  background: #fff3d6;
  border-color: #f2d596;
  color: #725010;
}

.mini-button.danger {
  background: #ffe8ec;
  border-color: #ffc8d4;
  color: #9f2945;
}

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

.automation-strip {
  align-items: center;
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 12px;
}

.switch-row {
  align-items: center;
  color: #344946;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
}

.switch-row input {
  accent-color: var(--brand);
  height: 18px;
  width: 18px;
}

.inline-field {
  align-items: center;
  grid-template-columns: auto 90px;
}

.field {
  display: grid;
  gap: 7px;
}

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

.field label {
  color: #344946;
  font-size: 14px;
  font-weight: 800;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.import-button {
  cursor: pointer;
  position: relative;
}

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

.stack {
  display: grid;
  gap: 12px;
}

.schedule-toolbar {
  align-items: center;
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 12px;
}

.segmented-control {
  background: #eaf3f0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: inline-flex;
  gap: 4px;
  padding: 4px;
}

.segment-button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #395451;
  font-size: 14px;
  font-weight: 800;
  min-height: 34px;
  padding: 7px 12px;
}

.segment-button.active {
  background: var(--surface);
  box-shadow: 0 1px 6px rgba(16, 61, 61, 0.12);
  color: var(--brand-strong);
}

.date-range-filter {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-field {
  min-width: 150px;
}

.compact-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.schedule-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.maintenance-grid {
  display: grid;
  gap: 12px;
}

.list-card,
.employee-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.list-card-header,
.employee-card-header {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.list-card h3,
.employee-card h3 {
  font-size: 17px;
  margin: 0 0 4px;
}

.meta-list {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px 14px;
}

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

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

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

.endpoint-code {
  background: #102f2f;
  border-radius: var(--radius);
  color: #e8fff8;
  direction: ltr;
  display: block;
  font-size: 13px;
  overflow-x: auto;
  padding: 10px 12px;
  text-align: left;
}

.user-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 250, 0.92));
}

.maintenance-card {
  background:
    linear-gradient(90deg, rgba(23, 107, 104, 0.08), transparent 38%),
    rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 229, 225, 0.95);
  border-radius: var(--radius);
  display: grid;
  gap: 14px;
  grid-template-columns: 86px minmax(0, 1fr);
  padding: 14px;
}

.maintenance-date {
  align-content: center;
  background: #103d3d;
  border-radius: var(--radius);
  color: #fff;
  display: grid;
  min-height: 92px;
  place-items: center;
}

.maintenance-date strong {
  font-size: 30px;
  line-height: 1;
}

.maintenance-date span {
  color: #f5d492;
  font-size: 13px;
  font-weight: 800;
}

.maintenance-content {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.maintenance-topline {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.maintenance-topline h3 {
  font-size: 18px;
  margin: 0 0 6px;
}

.maintenance-status {
  align-items: end;
  display: grid;
  gap: 7px;
  justify-items: end;
}

.due-chip {
  background: #f2f6f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
  white-space: nowrap;
}

.maintenance-info-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.maintenance-info-grid div {
  background: #f7fbfa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px;
}

.maintenance-info-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.maintenance-info-grid strong {
  color: var(--ink);
  font-size: 14px;
}

.avatar {
  align-items: center;
  background: var(--brand-soft);
  border-radius: 8px;
  color: var(--brand-strong);
  display: inline-flex;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.split-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: 340px minmax(0, 1fr);
}

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

.conversation-card {
  border: 1px solid var(--line);
  cursor: pointer;
  padding: 12px;
  text-align: right;
}

.conversation-card.active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.conversation-card h3 {
  font-size: 15px;
  margin-bottom: 5px;
}

.chat-window {
  background: #f6fbfa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  min-height: 480px;
  padding: 14px;
}

.messages {
  align-content: start;
  display: grid;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-left: 6px;
}

.message {
  border-radius: 8px;
  max-width: min(560px, 86%);
  padding: 10px 12px;
}

.message.customer {
  background: #ffffff;
  border: 1px solid var(--line);
  justify-self: start;
}

.message.agent {
  background: #dff3ef;
  border: 1px solid #baded7;
  justify-self: end;
}

.message small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 5px;
}

.message .message-error {
  color: var(--rose);
  line-height: 1.5;
}

.reply-box {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.reply-box textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 58px;
  padding: 10px 12px;
  resize: vertical;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  border-right: 3px solid var(--brand);
  padding: 4px 12px 7px 0;
}

.timeline-item strong {
  display: block;
  font-size: 15px;
}

.timeline-item span {
  color: var(--muted);
  font-size: 13px;
}

.notification-row {
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.notification-row.unread {
  border-color: #f0c979;
  box-shadow: inset 4px 0 0 #f5b84b;
}

.channel-chip {
  background: #f2f6f5;
  color: var(--muted);
}

.dialog {
  border: 0;
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-width: min(720px, calc(100vw - 28px));
  padding: 0;
  width: 720px;
}

.dialog::backdrop {
  background: rgba(9, 31, 30, 0.45);
}

.dialog-body {
  background: #fff;
  border-radius: 10px;
  padding: 22px;
  position: relative;
}

.close-dialog {
  left: 16px;
  position: absolute;
  top: 16px;
}

.toast-stack {
  bottom: 18px;
  display: grid;
  gap: 10px;
  left: 18px;
  position: fixed;
  width: min(360px, calc(100vw - 36px));
  z-index: 20;
}

.toast {
  background: #103d3d;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: #fff;
  padding: 12px 14px;
}

.toast strong {
  display: block;
  margin-bottom: 4px;
}

.sr-only {
  clip: rect(0 0 0 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 1180px) {
  .metric-grid,
  .employee-grid,
  .permission-grid,
  .integration-endpoints,
  .schedule-summary,
  .customer-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  .ops-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    position: static;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main {
    padding: 16px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .search-box,
  .search-box input {
    min-width: 0;
    width: 100%;
  }

  .schedule-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control,
  .date-range-filter {
    width: 100%;
  }

  .date-range-filter {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
  }
}

@media (max-width: 640px) {
  .metric-grid,
  .employee-grid,
  .permission-grid,
  .integration-endpoints,
  .schedule-summary,
  .maintenance-info-grid,
  .customer-summary,
  .form-grid,
  .nav-list {
    grid-template-columns: 1fr;
  }

  .segmented-control,
  .date-range-filter {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    display: grid;
  }

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

  .maintenance-date {
    min-height: 76px;
  }

  .maintenance-topline,
  .maintenance-status {
    align-items: stretch;
    justify-items: stretch;
  }

  .maintenance-topline {
    flex-direction: column;
  }

  .reply-box {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .list-card-header,
  .employee-card-header,
  .notification-row {
    align-items: stretch;
    flex-direction: column;
  }

  .row-actions {
    display: grid;
  }
}

/* Naqaa professional design refresh */
:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-muted: #f7faf9;
  --ink: #101828;
  --muted: #667085;
  --line: #e3e9e7;
  --brand: #0f766e;
  --brand-strong: #0b4f4a;
  --brand-soft: #e7f6f2;
  --gold: #d7a542;
  --sidebar: #0b3b38;
  --sidebar-ink: #f2fbf8;
  --sidebar-muted: #9fc5bf;
  --shadow: 0 20px 48px rgba(16, 24, 40, 0.08);
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.05);
}

body { background: var(--bg); }
.app-shell { grid-template-columns: 292px minmax(0, 1fr); }
.sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%), var(--sidebar);
  color: var(--sidebar-ink);
  gap: 18px;
  padding: 20px 16px;
}
.brand { gap: 11px; min-height: 56px; padding: 4px 4px 16px; }
.brand-logo {
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(4, 39, 36, 0.2);
  display: block;
  flex: 0 0 auto;
  height: 46px;
  width: 46px;
}
.brand span { color: var(--sidebar-muted); }
.nav-list { gap: 5px; }
.nav-button {
  color: #d6ece8;
  padding: 6px 9px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.nav-button:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.12); color: #fff; }
.nav-button.active { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.2); color: #fff; transform: translateX(-2px); }
.nav-count { background: #e9bd56; }
.main { padding: 24px 28px 30px; }
.topbar { margin-bottom: 18px; min-height: 58px; }
.eyebrow { color: var(--muted); }
h1 { font-size: 28px; letter-spacing: 0; }
.user-session { background: var(--surface); box-shadow: var(--shadow-soft); }
.login-screen { background: linear-gradient(180deg, rgba(11, 79, 74, 0.08), transparent 44%), var(--bg); }
.login-panel { background: rgba(255,255,255,.98); border-radius: 14px; padding: 26px; }
.login-brand { border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.login-brand .brand-logo { box-shadow: 0 14px 28px rgba(11, 79, 74, 0.16); }
.login-brand span { color: var(--muted); }
.search-box input:focus, .field input:focus, .field select:focus, .field textarea:focus { box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13); }
.icon-button, .primary-button, .secondary-button, .ghost-button, .danger-button { transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
.icon-button { box-shadow: var(--shadow-soft); }
.primary-button { background: var(--brand); box-shadow: 0 10px 20px rgba(15, 118, 110, 0.18); }
.primary-button:hover { background: var(--brand-strong); transform: translateY(-1px); }
.secondary-button { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-soft); color: var(--brand-strong); }
.view { gap: 16px; }
.ops-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  min-height: 108px;
  padding: 18px;
}
.ops-hero::after { background: linear-gradient(90deg, rgba(15, 118, 110, 0.08), transparent 46%); opacity: 1; }
.ops-hero .eyebrow { color: var(--brand); }
.ops-hero h2 { font-size: 24px; letter-spacing: 0; }
.metric-grid, .panel-grid { gap: 16px; }
.metric-card, .panel, .list-card, .conversation-card, .employee-card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.metric-card { min-height: 112px; position: relative; }
.metric-card::before { background: var(--brand); border-radius: 999px; content: ""; height: 4px; inset-inline-start: 16px; position: absolute; top: 14px; width: 28px; }
.metric-card span { margin-bottom: 14px; padding-top: 10px; }
.metric-card strong { font-size: 30px; }
.panel { padding: 18px; }
th { background: var(--surface-muted); }
tbody tr:hover { background: #f8fbfa; }
.badge.new, .badge.pending { background: #fff6df; color: #7a520e; }
.badge.assigned, .badge.scheduled, .badge.in-progress { background: #e8f0ff; color: #244d91; }
.badge.complete { background: #e2f6ec; color: #17633f; }
.mini-button { background: #fff; transition: background 150ms ease, border-color 150ms ease, color 150ms ease; }
.mini-button:hover { background: var(--surface-muted); border-color: #cfdad7; }
.automation-strip, .segmented-control, .maintenance-info-grid div, .channel-chip { background: var(--surface-muted); }
.schedule-toolbar { background: var(--surface); box-shadow: var(--shadow-soft); }
.segment-button { color: #344946; }
.segment-button.active { box-shadow: 0 1px 6px rgba(16, 24, 40, 0.08); }
.list-card, .employee-card { padding: 15px; transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
.list-card:hover, .employee-card:hover, .conversation-card:hover { border-color: #cbd8d4; box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06); }
.endpoint-code { background: #0c2f2d; }
.user-card { background: var(--surface); }
.maintenance-card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-soft); transition: border-color 150ms ease, box-shadow 150ms ease; }
.maintenance-card:hover { border-color: #cbd8d4; box-shadow: 0 14px 30px rgba(16, 24, 40, 0.07); }
.maintenance-date { background: linear-gradient(180deg, var(--brand), var(--brand-strong)); }
.maintenance-date span { color: #f2d891; }
.due-chip { background: var(--brand-soft); }
.conversation-card.active { box-shadow: inset 0 0 0 1px var(--brand), 0 10px 24px rgba(15, 118, 110, 0.08); }
.chat-window { background: var(--surface-muted); }
.message { box-shadow: var(--shadow-soft); }
.message.agent { background: #e4f7f2; border-color: #b9e4db; }
.notification-row { box-shadow: var(--shadow-soft); }
.notification-row.unread { box-shadow: inset 4px 0 0 var(--gold), var(--shadow-soft); }
.dialog, .dialog-body { border-radius: 14px; }
.toast { background: var(--brand-strong); }

@media (max-width: 640px) {
  h1 { font-size: 26px; }
  .ops-hero h2 { font-size: 22px; }
}


/* Zid integration panel */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 10px 0 6px;
  font-size: 0.92rem;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

details.stack {
  margin-top: 14px;
}

details.stack > summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 8px;
}
