/* Logo Studio Clean Operations v107
   Visual overlay only. Workflow, permissions, field names and data logic stay untouched. */
:root {
  --ops-navy: #10233f;
  --ops-blue: #1769c2;
  --ops-blue-soft: #eaf3ff;
  --ops-teal: #0d8c82;
  --ops-teal-soft: #e9f8f5;
  --ops-ink: #14263d;
  --ops-muted: #607189;
  --ops-line: #d9e3ee;
  --ops-surface: #ffffff;
  --ops-bg: #f2f6fa;
  --ops-shadow: 0 8px 24px rgba(20, 49, 82, .07);
  font-family: "Leelawadee UI", "Noto Sans Thai", Tahoma, sans-serif;
}

body {
  color: var(--ops-ink);
  background: var(--ops-bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.app-shell { grid-template-columns: 260px minmax(0, 1fr); }

.sidebar {
  padding: 22px 16px;
  border-right: 1px solid var(--ops-line);
  background: #fff;
  color: var(--ops-ink);
  box-shadow: 8px 0 30px rgba(24, 52, 84, .05);
}

.sidebar .brand {
  padding: 0 8px 20px;
  border-bottom-color: var(--ops-line);
}
.sidebar .brand b { color: var(--ops-navy); font-size: 17px; }
.sidebar .brand small { color: var(--ops-muted); font-size: 11px; letter-spacing: .08em; }
.sidebar nav { gap: 6px; margin-top: 18px; }
.sidebar nav button {
  display: flex;
  min-height: 48px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #40546d;
  font-size: 15px;
  font-weight: 750;
}
.sidebar nav button i {
  display: grid;
  width: 34px;
  height: 34px;
  margin-right: 9px;
  place-items: center;
  border-radius: 10px;
  background: #eef4fa;
  color: var(--ops-blue);
  font-size: 16px;
}
.sidebar nav button:hover {
  border-color: #cfe1f5;
  background: #f5f9fe;
  color: var(--ops-navy);
}
.sidebar nav button.active {
  border-color: #bad7f5;
  background: var(--ops-blue-soft);
  color: #0b579e;
  box-shadow: inset 4px 0 0 var(--ops-blue);
}
.sidebar nav button.active i { background: var(--ops-blue); color: #fff; }
.sidebar .nav-count { margin-left: auto; background: #d92945; color: #fff; }
.back-link {
  margin-top: 15px;
  padding: 11px 12px;
  border: 1px solid var(--ops-line);
  border-radius: 11px;
  color: #315675;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 750;
}
.online-note { border: 1px solid #cce9df; background: var(--ops-teal-soft); }
.online-note b { color: #0b675f; }
.online-note small { color: #4c756f; font-size: 11px; }

.app-shell > main { padding: 0 30px 48px; background: var(--ops-bg); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 32;
  min-height: 92px;
  margin: 0 -30px 24px;
  padding: 0 30px;
  border-bottom: 1px solid var(--ops-line);
  background: rgba(255,255,255,.94);
  box-shadow: 0 5px 18px rgba(29, 57, 90, .04);
  backdrop-filter: blur(14px);
}
.topbar p { color: var(--ops-teal); font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.topbar h1 { margin-top: 3px; color: var(--ops-navy); font-size: 28px; font-weight: 900; letter-spacing: -.02em; }
.top-actions { gap: 8px; }
.top-actions input,
.top-actions select,
.toolbar input,
.toolbar select {
  min-height: 44px;
  border-color: #cfdbe7;
  border-radius: 11px;
  background: #fff;
  color: var(--ops-ink);
  font-size: 14px;
  font-weight: 650;
}

.primary,
.secondary,
.mini,
.danger {
  min-height: 42px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
}
.primary { border-color: var(--ops-blue); background: var(--ops-blue); box-shadow: 0 6px 14px rgba(23,105,194,.18); }
.primary:hover { background: #0f5da9; }
.secondary,.mini { border-color: #cfdbe7; background: #fff; color: #27405d; }

.hero {
  padding: 26px 28px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(118deg, #0e4367 0%, #0b7782 55%, #16a190 100%);
  box-shadow: 0 14px 34px rgba(12, 86, 107, .17);
}
.hero h2 { font-size: 28px; font-weight: 900; }
.hero p { color: #d9f2f0; font-size: 14px; }
.hero-score b { font-size: 38px; }

.kpi-grid { gap: 12px; margin: 15px 0 18px; }
.kpi,
.panel,
.job-day-group,
.production-day,
.shipping-day-group,
.completed-day-group {
  border-color: var(--ops-line);
  background: var(--ops-surface);
  box-shadow: var(--ops-shadow);
}
.kpi {
  min-height: 112px;
  padding: 17px 18px;
  border-radius: 16px;
  border-top: 4px solid #b9cbe0;
}
.kpi.good { border-top-color: #20a36d; }
.kpi.warn { border-top-color: #e59a19; }
.kpi.bad { border-top-color: #dc4259; }
.kpi span,.kpi small { color: var(--ops-muted); font-size: 12px; }
.kpi b { margin: 4px 0; color: var(--ops-navy); font-size: 29px; font-weight: 900; }

.panel { padding: 22px; border-radius: 18px; }
.panel-head { margin-bottom: 18px; }
.panel-head h2 { color: var(--ops-navy); font-size: 23px; font-weight: 900; }
.panel-head p { color: var(--ops-muted); font-size: 13px; }
.eyebrow { color: var(--ops-teal); font-size: 11px; font-weight: 900; letter-spacing: .13em; }
.count { padding: 7px 11px; background: #eef4fa; color: #3c5571; font-size: 12px; font-weight: 800; }

.workflow-stage-cards { gap: 10px; }
.workflow-stage-card {
  min-height: 112px;
  padding: 15px 17px;
  border: 1px solid var(--ops-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: none;
}
.workflow-stage-card:hover { transform: translateY(-1px); box-shadow: var(--ops-shadow); }
.workflow-stage-card small { color: var(--ops-muted); font-size: 11px; }
.workflow-stage-card span { color: #243b55; font-size: 15px; font-weight: 800; }
.workflow-stage-card b { color: var(--ops-navy); font-size: 28px; }
.workflow-stage-card em { color: var(--ops-muted); font-size: 11px; }
.workflow-stage-card.active { border-width: 2px; background: #f6fbff; }

.design-current-stage,
.production-current-stage,
.shipping-current-stage {
  border: 1px solid #cbddeb;
  border-radius: 13px;
  background: #eef6fc;
  color: #244a68;
}

.table-wrap { border: 1px solid var(--ops-line); border-radius: 14px; background: #fff; }
table { color: var(--ops-ink); }
th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px;
  border-bottom: 1px solid var(--ops-line);
  background: #eef4fa;
  color: #42566f;
  font-size: 12px;
  font-weight: 850;
}
td { padding: 13px 12px; border-bottom-color: #e8eef4; }
tbody tr:nth-child(even) { background: #fbfcfe; }
tbody tr:hover { background: #f2f7fc; }
.jobs-table { font-size: 14px; }
.job-day-heading,
.production-day-head,
.shipping-day-head {
  min-height: 50px;
  padding: 12px 16px;
  border-bottom-color: var(--ops-line);
  background: #eaf2f9;
  color: var(--ops-navy);
}

.production-card,
.shipping-card,
.shipping-compact-row {
  border-color: var(--ops-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(26, 52, 82, .05);
}
.production-card summary,
.shipping-row-summary { min-height: 76px; font-size: 14px; }
.production-info,
.shipping-info,
.address-preview,
.delivery-proof { color: #314860; font-size: 13px; line-height: 1.55; }
.shipping-actions,
.production-actions { gap: 8px; }

.payment-summary { border-radius: 11px; font-size: 13px; }
.payment-summary.paid { border-color: #9edcc0; background: #ebf8f1; color: #087348; }
.payment-summary.outstanding,
.payment-required { border-color: #f0b7bf; background: #fff1f3; color: #a9283d; }
.pill,
.shipping-state,
.shipping-priority-badge,
.production-stage { font-size: 11px; font-weight: 850; }

.modal-backdrop { background: rgba(16,35,63,.58); backdrop-filter: blur(4px); }
.modal {
  border: 1px solid var(--ops-line);
  border-radius: 21px;
  box-shadow: 0 30px 90px rgba(9, 27, 49, .28);
}
.modal-head { padding-bottom: 13px; border-bottom: 1px solid #e4ebf2; }
.modal-head h2 { color: var(--ops-navy); font-size: 25px; }
.modal label { color: #334a63; font-size: 14px; }
.modal input,
.modal select,
.modal textarea {
  min-height: 45px;
  border: 1px solid #cbd8e5 !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: var(--ops-ink) !important;
  font-size: 15px !important;
}
.modal input:focus,
.modal select:focus,
.modal textarea:focus { border-color: var(--ops-blue) !important; box-shadow: 0 0 0 3px rgba(23,105,194,.12); outline: 0; }

.graphic-login { background: radial-gradient(circle at 15% 0, #d8ecff, transparent 40%), #eef4f8; }
.graphic-login-card { border-color: var(--ops-line); border-radius: 22px; box-shadow: 0 24px 70px rgba(19,51,81,.15); }
.graphic-login-card h1 { font-size: 31px; }

.compact-work-alerts,
.stage-late-alert,
.todo-overdue-alert,
.customer-followup-summary { border-radius: 16px; box-shadow: 0 6px 18px rgba(64,41,8,.08); }
.toast { font-size: 14px; font-weight: 800; }

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 220px minmax(0,1fr); }
  .sidebar nav button { font-size: 14px; }
  .app-shell > main { padding-inline: 20px; }
  .topbar { margin-inline: -20px; padding-inline: 20px; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 45;
    height: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--ops-line);
  }
  .sidebar .brand { padding: 0 4px 9px; }
  .sidebar nav { display: flex; gap: 6px; margin-top: 8px; padding-bottom: 4px; overflow-x: auto; }
  .sidebar nav button { min-height: 42px; padding: 5px 10px; white-space: nowrap; }
  .sidebar nav button i { width: 28px; height: 28px; margin-right: 6px; }
  .app-shell > main { padding: 0 12px 36px; }
  .topbar {
    position: relative;
    min-height: 0;
    margin: 0 -12px 16px;
    padding: 16px 12px;
  }
  .topbar h1 { font-size: 24px; }
  .top-actions > * { flex: 1 1 140px; }
  .panel { padding: 16px; }
  .panel-head h2 { font-size: 20px; }
  .hero { padding: 21px 18px; }
  .hero h2 { font-size: 23px; }
  .workflow-stage-cards { grid-template-columns: 1fr; }
  .workflow-stage-card { min-height: 84px; }
  .modal { padding: 18px; border-radius: 17px; }
}

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