:root {
  color-scheme: light;
  --ink: #18223a;
  --muted: #667086;
  --line: #dde3ee;
  --panel: #ffffff;
  --page: #f4f6fa;
  --nav: #1e2b67;
  --blue: #26336f;
  --blue-soft: #eef2ff;
  --gold: #f9b23c;
  --gold-soft: #fff3dc;
  --green: #1f7a5d;
  --amber: #af7a18;
  --red: #b43b3b;
  --teal: #23747a;
  --shadow: 0 18px 44px rgba(29, 42, 78, 0.1);
  --shadow-soft: 0 8px 24px rgba(29, 42, 78, 0.07);
}

.security-session-notice {
  position: fixed;
  z-index: 10000;
  top: 16px;
  left: 50%;
  width: min(620px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 12px 18px;
  border: 1px solid #d89a1b;
  border-radius: 10px;
  background: #fff7df;
  color: #5d4200;
  box-shadow: 0 10px 30px rgba(23, 38, 69, 0.18);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f7f9fd 0, var(--page) 260px),
    var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 31px;
  line-height: 1.1;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 16px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 292px;
  padding: 22px;
  color: #f7f8ff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 220px),
    linear-gradient(180deg, #202a64 0%, #26336f 55%, #17204d 100%);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 4px;
}

.brand-mark {
  width: 72px;
  height: 52px;
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-mark img {
  width: 90px;
  height: auto;
  display: block;
}

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

.brand span {
  margin-top: 4px;
  color: #c7d0f2;
  font-size: 12px;
}

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

.nav-item {
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 11px 12px;
  color: #e5e8ff;
  background: transparent;
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-left: 3px solid var(--gold);
}

.nav-item:hover {
  transform: translateX(2px);
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-footer span,
.sidebar-footer strong {
  display: block;
}

.sidebar-footer span {
  color: #d5dcff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-footer strong {
  margin-top: 6px;
  line-height: 1.45;
}

.app-shell {
  margin-left: 292px;
  padding: 26px 28px 34px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  position: sticky;
  top: 0;
  z-index: 30;
  margin: -26px -28px 22px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(221, 227, 238, 0.82);
  background: rgba(247, 249, 253, 0.92);
  backdrop-filter: blur(14px);
}

.system-status {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  max-width: min(720px, 100%);
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #d8e0ed;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.system-status strong {
  color: var(--ink);
  font-size: 12px;
}

.system-status small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(175, 122, 24, 0.12);
}

.status-light.green {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 122, 93, 0.12);
}

.status-light.red {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(180, 59, 59, 0.12);
}

.copy-link-action {
  min-height: 28px;
  border: 1px solid #ccd6e7;
  border-radius: 7px;
  padding: 0 10px;
  color: var(--blue);
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.topbar-actions > .topbar-logout {
  flex: 0 0 auto;
}

.select-label,
.control-form label,
.login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.select-label {
  min-width: 190px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #9aa9d8;
  box-shadow: 0 0 0 3px rgba(38, 51, 111, 0.12);
}

input,
select {
  min-height: 39px;
  padding: 0 10px;
}

select:disabled,
input:disabled {
  background: #edf1f8;
  color: #58657a;
}

.touch-select {
  font-weight: 800;
  background: #ffffff;
}

textarea {
  min-height: 96px;
  padding: 10px;
  resize: vertical;
}

.primary-action,
.secondary-action {
  min-height: 39px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 14px;
  font-weight: 900;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-action {
  color: #ffffff;
  background: var(--blue);
}

.primary-action:hover {
  background: #1b2558;
  box-shadow: 0 10px 22px rgba(38, 51, 111, 0.18);
}

.primary-action:hover,
.secondary-action:hover,
.danger-action:hover,
.file-add-action:hover {
  transform: translateY(-1px);
}

.secondary-action {
  color: var(--blue);
  background: #ffffff;
  border-color: #cbd4e5;
}

.panel-actions,
.report-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.report-filter label {
  display: grid;
  gap: 5px;
  min-width: 300px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-download-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 14px 16px;
  background: #ffffff;
}

.report-download-bar strong {
  display: block;
  margin-top: 4px;
}

.download-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.download-controls select {
  min-width: 120px;
}

.report-chart {
  display: grid;
  gap: 10px;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(110px, 160px) 1fr minmax(100px, auto);
  gap: 10px;
  align-items: center;
}

.chart-row span {
  color: var(--muted);
  font-weight: 900;
}

.chart-row strong {
  text-align: right;
}

.chart-track {
  height: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef7;
}

.chart-fill {
  height: 100%;
  width: var(--chart-width);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.ethiopian-date-select {
  display: grid;
  grid-template-columns: 72px minmax(150px, 1fr) 92px;
  gap: 8px;
}

.ethiopian-date-select select {
  min-height: 48px;
  border: 1px solid #d5deed;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 900;
}

.ethiopian-date-select.dark select {
  min-height: 52px;
  color: #ffffff;
  border-color: #263847;
  background: #0c1823;
}

.danger-action {
  min-height: 39px;
  border: 1px solid #e2b8b8;
  border-radius: 7px;
  padding: 0 14px;
  color: #8a2323;
  background: #fff6f6;
  font-weight: 900;
}

.link-action {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.disabled-link {
  opacity: 0.55;
  pointer-events: none;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lead,
.section-note,
.meta {
  color: var(--muted);
}

.lead,
.section-note {
  line-height: 1.55;
}

.meta {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.office-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
}

.access-panel,
.panel,
.project-card,
.pipeline-card,
.document-card,
.control-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.access-panel,
.panel,
.control-form {
  padding: 18px;
}

.login-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 22px;
  padding: 15px;
  border: 1px solid #dfe5f0;
  border-radius: 8px;
  background: #f8fbff;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.role-card {
  min-height: 148px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.role-card:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.role-card span,
.pipeline-card span,
.document-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.role-card strong,
.role-card small {
  display: block;
}

.role-card strong {
  margin-top: 8px;
  font-size: 16px;
}

.role-card small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.control-map-panel {
  overflow: hidden;
  position: relative;
  padding: 24px;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(145deg, #24306c 0%, #26336f 48%, #ffffff 48%, #ffffff 100%);
  box-shadow: var(--shadow);
}

.control-map-panel::after {
  content: "MELOSTIC";
  position: absolute;
  right: -18px;
  bottom: 6px;
  color: rgba(38, 51, 111, 0.06);
  font-size: 78px;
  font-weight: 900;
}

.control-map-panel .eyebrow {
  color: #ffd381;
}

.control-map-panel h2 {
  max-width: 430px;
  font-size: 30px;
  line-height: 1.15;
}

.control-flow {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.control-flow article {
  padding: 15px;
  border: 1px solid #dfe5f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
}

.control-flow span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #7b560e;
  background: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
}

.control-flow strong {
  display: block;
  margin-top: 9px;
}

.control-flow p {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.office-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.office-metrics div {
  padding: 12px;
  border: 1px solid #dfe5f0;
  border-radius: 8px;
  background: #ffffff;
}

.office-metrics span,
.office-metrics strong {
  display: block;
}

.office-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.office-metrics strong {
  margin-top: 5px;
  color: var(--blue);
}

.password-admin-panel {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafd;
}

.password-admin-panel .control-form {
  margin-top: 0;
}

.command-strip,
.main-grid,
.report-grid,
.meeting-layout,
.dashboard-hub-grid {
  display: grid;
  gap: 18px;
}

.command-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.command-strip div {
  padding: 16px;
  border: 1px solid #dfe5f0;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.command-strip span,
.command-strip strong {
  display: block;
}

.command-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-strip strong {
  margin-top: 6px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kpi strong {
  display: block;
  margin-top: 9px;
  font-size: 28px;
  line-height: 1.05;
}

.main-grid {
  grid-template-columns: minmax(0, 1.22fr) minmax(330px, 0.78fr);
  margin-bottom: 18px;
}

.report-grid,
.meeting-layout,
.dashboard-hub-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.assistant-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.assistant-project-list {
  display: grid;
  gap: 14px;
}

.worker-report-panel {
  margin: 18px 0;
}

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

.worker-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.worker-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(29, 42, 78, 0.12);
}

.worker-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.worker-stats span {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.worker-stats strong {
  color: var(--ink);
  font-size: 18px;
}

#assistantProjects .section-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.assistant-project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.assistant-project-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(250, 172, 47, 0.16);
}

.assistant-project-card:hover {
  transform: translateY(-2px);
  border-color: #c9d4e6;
  box-shadow: var(--shadow-soft);
}

.assistant-project-card p {
  margin: 8px 0 12px;
  color: var(--muted);
}

.assistant-project-detail {
  margin-bottom: 14px;
}

.project-desk-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.project-desk-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.assistant-new-project {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.assistant-new-project:not(.hidden) {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 0;
  width: auto !important;
  max-height: none !important;
  overflow: auto;
  transform: none !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    linear-gradient(180deg, #f7f9fd 0%, #eef2f7 100%) !important;
  box-shadow: none !important;
}

.assistant-new-project:not(.hidden) > * {
  width: auto;
  margin-right: 0;
  margin-left: 0;
}

.assistant-new-project:not(.hidden) label,
.assistant-new-project:not(.hidden) .form-message {
  display: block;
  width: 100%;
}

.assistant-new-project:not(.hidden) label,
.assistant-new-project:not(.hidden) .form-grid {
  padding: 0;
}

.assistant-new-project:not(.hidden) .form-grid {
  width: 100%;
}

.assistant-new-project:not(.hidden) label {
  margin-top: 16px;
}

.assistant-new-project:not(.hidden) input,
.assistant-new-project:not(.hidden) select,
.assistant-new-project:not(.hidden) textarea {
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(13, 28, 61, 0.03);
}

.assistant-new-project:not(.hidden) textarea {
  min-height: 116px;
}

.assistant-new-project:not(.hidden) .form-actions {
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  margin: 22px -28px -28px;
  padding: 18px 28px 20px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 32%);
}

.assistant-create-card {
  align-self: start;
  width: min(980px, calc(100% - 48px));
  margin: 32px auto;
  padding: 28px;
  border: 1px solid #d7dfed;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(18, 34, 82, 0.16);
}

.fullscreen-form-header,
.workspace-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.assistant-new-project:not(.hidden) .fullscreen-form-header {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 34px 28px;
  border-radius: 0;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 220px),
    linear-gradient(160deg, #253276, #101d4b);
  box-shadow: 12px 0 36px rgba(18, 34, 82, 0.18);
}

.assistant-new-project:not(.hidden) .fullscreen-form-header .eyebrow {
  color: var(--gold);
}

.assistant-new-project:not(.hidden) .fullscreen-form-header h2 {
  max-width: 260px;
  color: #ffffff;
  font-size: 34px;
  line-height: 1.08;
}

.assistant-new-project:not(.hidden) .fullscreen-form-header span {
  display: block;
  max-width: 250px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.assistant-new-project:not(.hidden) .fullscreen-form-header .secondary-action {
  margin-top: auto;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.assistant-create-card .panel-header {
  margin: -28px -28px 22px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: #f8fafd;
}

.assistant-create-card .panel-header h2 {
  font-size: 24px;
}

.assistant-workspace-modal {
  position: fixed;
  inset: 0;
  z-index: 125;
  overflow: auto;
  padding: 0;
  background:
    linear-gradient(180deg, #f9fbff 0, #edf2f8 210px, #e9eef6 100%);
}

.assistant-workspace-shell {
  min-height: 100vh;
  padding: 0 clamp(18px, 3vw, 48px) 34px;
}

.assistant-workspace-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  width: min(1280px, 100%);
  margin: 0 auto;
}

.workspace-header {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 0 calc(clamp(18px, 3vw, 48px) * -1) 22px;
  padding: 22px clamp(18px, 3vw, 48px);
  color: #ffffff;
  background: linear-gradient(135deg, #253276, #12205a);
  box-shadow: 0 18px 42px rgba(18, 34, 82, 0.2);
}

.workspace-header h2 {
  color: #ffffff;
}

.workspace-header .eyebrow {
  color: var(--gold);
}

.workspace-header .secondary-action {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

.workspace-main,
.workspace-side {
  display: grid;
  gap: 16px;
}

.workspace-side {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
}

.workspace-side > .control-form,
.workspace-files-panel,
.workspace-history-panel,
.workspace-main > .inner-panel,
.workspace-overview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.workspace-side > .control-form,
.workspace-files-panel,
.workspace-history-panel,
.workspace-main > .inner-panel {
  padding: 22px;
}

.assistant-workspace-modal .form-grid {
  align-items: start;
}

.workspace-main > .inner-panel > .panel-header,
.workspace-files-panel > .panel-header,
.workspace-history-panel > .panel-header {
  margin: -22px -22px 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #f8fafd;
}

.workspace-side > .control-form {
  border-top: 4px solid var(--gold);
  align-self: start;
}

.workspace-files-panel {
  border-top: 4px solid var(--blue);
}

.workspace-history-panel {
  border-top: 4px solid var(--green);
}

.assistant-step-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.assistant-step-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.assistant-step-card:hover {
  border-color: #cbd7e8;
  box-shadow: var(--shadow-soft);
}

.assistant-step-card p {
  margin: 0;
  color: var(--muted);
}

.assistant-step-form {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.upload-field {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #c7d2e3;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: inset 4px 0 0 var(--gold);
}

.upload-field span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.upload-field strong {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.native-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-add-action {
  justify-self: start;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(38, 51, 111, 0.12);
}

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

.pending-file-count {
  padding: 9px 11px;
  border-radius: 7px;
  color: #17684c;
  background: #e7f4ef;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pending-file-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #d8e0ed;
  border-radius: 8px;
  background: #ffffff;
}

.pending-file-row span {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 900;
}

.pending-file-row strong,
.pending-file-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.pending-file-empty {
  padding: 10px 12px;
  border: 1px dashed #c7d2e3;
  border-radius: 8px;
  background: #ffffff;
}

.workspace-side textarea {
  min-height: 112px;
}

.workspace-side label {
  min-width: 0;
}

.workspace-side .form-actions {
  justify-content: flex-end;
  padding-top: 4px;
}

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

.workspace-file-card {
  display: grid;
  gap: 5px;
  min-height: 96px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f8fafc;
  text-decoration: none;
}

.workspace-file-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.workspace-file-card strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.workspace-file-card small {
  color: var(--blue);
  font-weight: 900;
}

.file-empty-state {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px dashed #b7c4d8;
  border-radius: 8px;
  color: var(--muted);
  background: #f8fafc;
}

.file-empty-state strong {
  color: var(--ink);
}

.assistant-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.file-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid #d4ddec;
  border-radius: 999px;
  color: var(--blue);
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.file-pill span {
  color: var(--muted);
  font-weight: 800;
}

.dashboard-meeting-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 12, 32, 0.55);
}

.modal-panel {
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 20px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(5, 17, 45, 0.28);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.report-detail-grid {
  margin-bottom: 14px;
}

.modal-progress {
  margin-bottom: 16px;
}

.modal-actions {
  margin-top: 16px;
}

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

.health-list,
.compact-list,
.card-stack,
.rhythm-list {
  display: grid;
  gap: 10px;
}

.health-row,
.list-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.agenda-row h3 {
  line-height: 1.25;
}

.danger-text {
  color: #8a2323;
}

.success-text {
  color: var(--green);
  border-color: #b8ddce;
  background: #eef9f4;
}

.restricted-note {
  padding: 16px;
  border: 1px solid #d7deeb;
  border-radius: 8px;
  background: #f8fbff;
}

.restricted-note strong,
.restricted-note span {
  display: block;
}

.restricted-note span {
  margin-top: 6px;
  color: var(--muted);
}

.health-row:first-child,
.list-row:first-child {
  border-top: 0;
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--teal);
}

.status-dot.green {
  background: var(--green);
}

.status-dot.amber {
  background: var(--amber);
}

.status-dot.red {
  background: var(--red);
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.tag.green {
  color: #17684c;
  background: #e7f4ef;
}

.tag.amber {
  color: #7b560e;
  background: var(--gold-soft);
}

.tag.red {
  color: #922b2b;
  background: #fae4e4;
}

.tag.blue {
  color: #234075;
  background: #e8eefb;
}

.section-heading {
  margin-bottom: 16px;
}

.project-card {
  display: grid;
  gap: 12px;
  padding: 15px;
}

.business-tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(9, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 246, 250, 0.94);
  backdrop-filter: blur(14px);
}

.business-tab {
  min-height: 38px;
  border: 1px solid #d4ddec;
  border-radius: 7px;
  color: var(--blue);
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.business-tab:hover,
.business-tab.active {
  color: #ffffff;
  border-color: var(--blue);
  background: var(--blue);
}

.business-view {
  display: none;
}

.business-view.active {
  display: block;
}

.yene-unit-heading {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.92)),
    radial-gradient(circle at 8% 15%, rgba(251, 45, 126, 0.12), transparent 28%),
    radial-gradient(circle at 98% 20%, rgba(0, 118, 205, 0.12), transparent 30%);
  box-shadow: var(--shadow);
}

.yene-brand-lockup {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #f0d8e4;
  border-radius: 8px;
  background: #ffffff;
}

.yene-brand-lockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.yene-four-tabs {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.yene-erp-shell {
  overflow: hidden;
}

.yene-erp-frame {
  display: block;
  width: 100%;
  min-height: 860px;
  border: 0;
  background: #f6f8fb;
}

.yene-fullscreen-exit {
  display: none;
}

/* Secure Yene full-screen workspace. The parent application still owns the
   authenticated session; only its surrounding navigation chrome is hidden. */
body.yene-fullscreen-mode:not(.login-screen) {
  overflow: hidden;
  background: #f6f8fb;
}

body.yene-fullscreen-mode:not(.login-screen) > .sidebar,
body.yene-fullscreen-mode:not(.login-screen) .app-shell > .topbar,
body.yene-fullscreen-mode:not(.login-screen) #babyProducts > .section-heading,
body.yene-fullscreen-mode:not(.login-screen) #babyProducts > .business-tabs,
body.yene-fullscreen-mode:not(.login-screen) #babyErp .yene-erp-shell > .panel-header,
body.yene-fullscreen-mode:not(.login-screen) #melosLauncher,
body.yene-fullscreen-mode:not(.login-screen) #melosPanel {
  display: none !important;
}

body.yene-fullscreen-mode:not(.login-screen) .app-shell {
  min-height: 100vh;
  margin-left: 0;
  padding: 0;
}

body.yene-fullscreen-mode:not(.login-screen) .view {
  display: none !important;
}

body.yene-fullscreen-mode:not(.login-screen) #babyProducts {
  display: block !important;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body.yene-fullscreen-mode:not(.login-screen) #babyProducts .business-view {
  display: none !important;
}

body.yene-fullscreen-mode:not(.login-screen) #babyProducts #babyErp {
  display: block !important;
}

body.yene-fullscreen-mode:not(.login-screen) .yene-erp-shell {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.yene-fullscreen-mode:not(.login-screen) .yene-erp-frame {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
}

body.yene-fullscreen-mode:not(.login-screen) .yene-fullscreen-exit {
  position: fixed;
  top: 14px;
  right: 190px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #cbd9e8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: #17345d;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(20, 48, 82, 0.12);
}

body.yene-fullscreen-mode:not(.login-screen) .yene-fullscreen-exit:hover {
  background: #ffffff;
  border-color: #92acc8;
}

body.yene-shop-seller-parent .yene-fullscreen-exit {
  display: none !important;
}

@media (max-width: 720px) {
  body.yene-fullscreen-mode:not(.login-screen) .yene-fullscreen-exit {
    top: 10px;
    right: 12px;
    min-height: 38px;
    padding: 0 12px;
    font-size: 12px;
  }
}

#babyBatches .kpi-grid {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

#babyBatches .batch-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

#babyBatches .batch-card,
#babyBatches .panel {
  min-width: 0;
}

#babyBatches .import-switcher-panel,
#babyBatches .import-detail-panel {
  margin-bottom: 18px;
}

#babyBatches .import-alert-panel {
  margin-top: 18px;
}

#babyBatches .import-batch-strip .project-card {
  min-height: 0;
}

#babyBatches .batch-edit-card {
  gap: 18px;
}

#babyBatches .batch-edit-card textarea {
  min-height: 96px;
  resize: vertical;
}

.process-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.process-timeline span {
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  color: var(--muted);
  background: #f8fbff;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.process-timeline span.done {
  color: #ffffff;
  border-color: var(--blue);
  background: var(--blue);
}

.import-summary-card {
  border-top: 4px solid var(--blue);
}

.import-file-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f7faff);
}

.import-file-hero h3 {
  margin: 4px 0 6px;
  font-size: 26px;
  line-height: 1.15;
}

.import-file-hero p {
  max-width: 850px;
  color: var(--muted);
}

.import-stage-pill {
  min-width: 138px;
  padding: 14px;
  border: 1px solid #dce4f1;
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
}

.import-stage-pill span,
.import-stage-pill strong {
  display: block;
}

.import-stage-pill span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.import-stage-pill strong {
  margin-top: 6px;
  color: var(--blue);
  font-size: 30px;
}

.import-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.import-section-title > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
}

.import-section-title h3 {
  margin: 2px 0 0;
}

.mini-open-action {
  justify-self: start;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  color: var(--blue);
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.batch-card:hover .mini-open-action {
  color: #ffffff;
  background: var(--blue);
}

.marketing-control-panel {
  border-top: 4px solid var(--blue);
}

.compact-kpis {
  margin-bottom: 18px;
}

.marketing-task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.marketing-task-card {
  display: grid;
  gap: 14px;
  min-height: 320px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.marketing-task-card:hover {
  transform: translateY(-2px);
  border-color: rgba(38, 51, 111, 0.38);
  box-shadow: 0 16px 32px rgba(22, 34, 72, 0.12);
}

.marketing-task-card p {
  color: var(--muted);
  line-height: 1.45;
}

.marketing-task-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  overflow: auto;
  background: linear-gradient(180deg, #f8fbff 0%, #edf2f8 100%);
}

.marketing-task-shell {
  min-height: 100vh;
  padding: 0 clamp(18px, 3vw, 48px) 34px;
}

.marketing-modal-header {
  margin: 0 calc(clamp(18px, 3vw, 48px) * -1) 24px;
}

.marketing-task-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 18px;
  width: min(1360px, 100%);
  margin: 0 auto;
  align-items: start;
}

.marketing-task-form,
.marketing-review-panel .inner-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.marketing-task-form {
  padding: 22px;
  border-top: 4px solid var(--gold);
}

.marketing-review-panel {
  display: grid;
  gap: 16px;
}

.marketing-review-panel .inner-panel {
  padding: 20px;
}

.marketing-review-panel .panel-header {
  margin: -20px -20px 18px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fafd;
}

.compact-desk {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.compact-file-grid {
  margin-top: 12px;
}

.file-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.file-card-actions a,
.file-card-actions button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.file-card-actions button {
  color: #ba3030;
}

.alert-open-row {
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.alert-open-row:hover {
  background: #f8fbff;
}

.alert-open-row > strong {
  color: var(--blue);
  font-size: 12px;
}

.alert-open-row .status-dot.red {
  background: var(--red);
}

.baby-upload-field {
  margin-top: 4px;
}

.baby-upload-field .form-grid {
  align-items: end;
  padding: 0;
}

.baby-document-card {
  position: relative;
}

.baby-document-card a {
  display: grid;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}

.baby-document-card .icon-action {
  justify-self: start;
  margin-top: 4px;
}

.attention-highlight {
  outline: 3px solid rgba(250, 174, 49, 0.42);
  box-shadow: 0 0 0 7px rgba(250, 174, 49, 0.12);
  transition: outline 0.2s ease, box-shadow 0.2s ease;
}

.batch-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 14px;
}

.batch-card {
  cursor: pointer;
}

.batch-card:hover {
  border-color: var(--blue);
  background: #fbfcff;
}

.compact-select {
  min-width: 320px;
}

.batch-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.batch-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.record-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.record-card h3 {
  line-height: 1.35;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.detail-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbff;
}

.detail-grid span,
.detail-grid strong {
  display: block;
}

.detail-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-grid strong {
  margin-top: 4px;
}

.detail-text {
  line-height: 1.5;
}

.detail-label {
  margin-top: 8px;
}

.document-check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
}

.checkbox-label {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: none;
}

.checkbox-label input {
  width: auto;
  min-height: auto;
}

.card-top,
.card-meta,
.card-actions,
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.card-top {
  justify-content: space-between;
}

.project-card p {
  color: var(--muted);
  line-height: 1.5;
}

.progress-track,
.bar-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e7ecf5;
}

.progress-fill {
  width: var(--progress);
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.card-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  flex-wrap: wrap;
}

.next-box,
.risk-box {
  padding: 11px;
  border-radius: 7px;
  line-height: 1.45;
}

.next-box {
  background: #f5f8fd;
}

.risk-box {
  background: #fff7e8;
  color: #6d5017;
}

.rhythm-list div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.rhythm-list strong,
.rhythm-list span {
  display: block;
}

.rhythm-list span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: #2a386d;
  background: #edf1fa;
  font-size: 12px;
  text-transform: uppercase;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: #f8fbff;
}

.pipeline-grid,
.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 14px;
}

.pipeline-card,
.document-card {
  padding: 16px;
}

.pipeline-card h3,
.document-card strong {
  display: block;
  margin-top: 8px;
}

.pipeline-card p,
.document-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.pipeline-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.pipeline-card em {
  font-style: normal;
  color: var(--teal);
  font-weight: 900;
}

.pipeline-card em.amber {
  color: var(--amber);
}

.pipeline-card em.red {
  color: var(--red);
}

.bar-chart {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.bar-label strong {
  color: var(--ink);
}

.bar-fill {
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.control-form {
  display: grid;
  gap: 14px;
}

.control-form.bare {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.form-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.form-message {
  min-height: 22px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #f4f7fb;
  color: var(--muted);
  font-weight: 900;
}

.form-message:empty {
  display: none;
}

.form-message.success {
  background: #e7f4ef;
  color: #17684c;
}

.form-message.error {
  background: #fae4e4;
  color: #922b2b;
}

.save-status {
  display: inline-flex;
  align-items: center;
  min-height: 39px;
  border: 1px solid #d7dfec;
  border-radius: 7px;
  padding: 0 12px;
  color: var(--muted);
  background: #f8fafd;
  font-size: 13px;
  font-weight: 900;
}

.save-status.success {
  border-color: #b7ddcd;
  color: #17684c;
  background: #e7f4ef;
}

.save-status.error {
  border-color: #e2b8b8;
  color: #922b2b;
  background: #fae4e4;
}

.icon-action {
  min-height: 32px;
  border: 1px solid #cbd4e5;
  border-radius: 7px;
  padding: 0 10px;
  color: var(--blue);
  background: #ffffff;
  font-weight: 900;
}

.icon-action:hover {
  background: var(--blue-soft);
}

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

.mini-action {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue);
  border-radius: 7px;
  padding: 8px 10px;
  font-weight: 900;
  cursor: pointer;
}

.mini-action:hover {
  background: var(--blue-soft);
}

.mini-action.danger {
  color: #9b1c1c;
  background: #fff5f5;
  border-color: #f1c4c4;
}

.report-section {
  margin-top: 18px;
}

.bakery-command {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.bakery-date-strip {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.bakery-date-strip .select-label {
  min-width: 240px;
}

.bakery-date-strip span,
.bakery-date-strip strong {
  display: block;
}

.bakery-date-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.bakery-date-strip strong {
  margin-top: 6px;
  font-size: 22px;
}

.bakery-command div {
  padding: 16px;
  border: 1px solid #dfe5f0;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.bakery-command span,
.bakery-command strong {
  display: block;
}

.bakery-command span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.bakery-command strong {
  margin-top: 6px;
  line-height: 1.45;
}

.bakery-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.bakery-erp-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(9, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 246, 250, 0.94);
  backdrop-filter: blur(14px);
}

.bakery-tab {
  min-height: 38px;
  border: 1px solid #d4ddec;
  border-radius: 7px;
  color: var(--blue);
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.bakery-tab:hover,
.bakery-tab.active {
  color: #ffffff;
  border-color: var(--blue);
  background: var(--blue);
}

.bakery-view {
  display: none;
}

.bakery-view.active {
  display: block;
}

.bakery-module {
  min-width: 0;
}

.compact-table table {
  min-width: 780px;
}

.bakery-operation-screen {
  margin: -2px -2px 0;
  padding: 22px;
  border-radius: 8px;
  color: #f1fbff;
  background: #061016;
}

.bakery-operation-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid #20313c;
}

.bakery-operation-top .eyebrow,
.bakery-accounting-panel .eyebrow,
.bakery-operation-actions label,
.bakery-operation-screen th {
  color: #9fb0bc;
}

.bakery-operation-top h2 {
  margin-top: 6px;
  color: #f3fbff;
  font-size: 38px;
  line-height: 1;
}

.bakery-operation-actions {
  display: flex;
  gap: 14px;
  align-items: end;
}

.bakery-operation-actions .select-label {
  min-width: 236px;
}

.bakery-operation-actions input,
.bakery-accounting-table input,
.bakery-accounting-table select {
  border-color: #20313c;
  color: #ffffff;
  background: #0c1823;
}

.bakery-operation-actions input {
  min-height: 52px;
  font-weight: 900;
}

.bakery-logout,
.bakery-add-product {
  min-height: 54px;
  border: 1px solid #75b843;
  border-radius: 8px;
  padding: 0 20px;
  color: #061016;
  background: #aaff57;
  font-size: 18px;
  font-weight: 900;
}

.bakery-logout {
  color: #aaff57;
  background: #122113;
}

.bakery-accounting-panel {
  padding: 24px;
  border: 1px solid #20313c;
  border-radius: 8px;
  background: #101b25;
}

.bakery-accounting-panel .section-note {
  color: #9fb0bc;
  font-size: 17px;
}

.bakery-accounting-panel .panel-header {
  margin-bottom: 22px;
}

.daily-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.daily-summary-strip article {
  min-height: 76px;
  border: 1px solid #263847;
  border-radius: 8px;
  padding: 13px 14px;
  background: #0c1823;
}

.daily-summary-strip span {
  display: block;
  margin-bottom: 8px;
  color: #9fb0bc;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-summary-strip strong {
  color: #ffffff;
  font-size: 22px;
}

.bakery-closing-strip {
  margin-top: -6px;
}

.bakery-reconciliation-panel {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid #33495a;
  border-radius: 14px;
  background: #101b25;
}

.bakery-reconciliation-panel h3 {
  margin: 2px 0 6px;
  color: #fff;
}

.bakery-reconciliation-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.bakery-reconciliation-field span {
  display: block;
  min-height: 32px;
  margin-bottom: 6px;
  color: #9fb0bc;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.bakery-reconciliation-panel .bakery-reconciliation-field input {
  width: 100%;
  min-height: 48px;
  border: 2px solid #b8c7d4 !important;
  border-radius: 8px;
  padding: 10px;
  color: #102a43 !important;
  -webkit-text-fill-color: #102a43 !important;
  background: #ffffff !important;
  font-size: 17px;
  font-weight: 800;
  opacity: 1 !important;
}

.bakery-reconciliation-panel .bakery-reconciliation-field input[readonly] {
  color: #075a42 !important;
  -webkit-text-fill-color: #075a42 !important;
  background: #f4fbf8 !important;
  border-color: #7eb8a4 !important;
  opacity: 1 !important;
}

.bakery-reconciliation-field small {
  display: block;
  margin-top: 6px;
  color: #7f93a2;
  font-size: 11px;
  font-weight: 800;
}

.bakery-payment-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #d8e1ef;
  border-radius: 12px;
  background: #f7f9fd;
}

.bakery-payment-form label {
  color: #52617a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.bakery-payment-form input,
.bakery-payment-form select {
  width: 100%;
  min-height: 48px;
  margin-top: 7px;
  border: 1px solid #cbd7ea;
  border-radius: 8px;
  padding: 10px 12px;
  color: #102349;
  background: #fff;
  font-size: 16px;
  font-weight: 700;
}

.bakery-payment-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.bakery-expense-form {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  border-left: 4px solid #d99a24;
  background: #fbfcfe;
}

.bakery-expense-form select,
.bakery-expense-form input {
  color: #14213d;
  background: #fff;
}

.bakery-expense-form .bakery-expense-custom:not(.hidden) {
  display: block;
}

.bakery-dashboard-reconciliation {
  margin-bottom: 18px;
  border-left: 4px solid #ffb21a;
}

.dashboard-reconciliation-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.dashboard-reconciliation-title h2 {
  margin: 3px 0 0;
}

.dashboard-reconciliation-equation {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.dashboard-reconciliation-equation span {
  min-width: 132px;
  padding: 12px;
  border: 1px solid #d8e1ef;
  border-radius: 10px;
  background: #f7f9fd;
}

.dashboard-reconciliation-equation span.result {
  border-color: #ffb21a;
  background: #fff8e8;
}

.dashboard-reconciliation-equation small {
  display: block;
  margin-bottom: 7px;
  color: #6d7890;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-reconciliation-equation strong {
  color: #102349;
  white-space: nowrap;
}

.dashboard-reconciliation-equation b {
  align-self: center;
  color: #263879;
  font-size: 22px;
}

.dashboard-reconciliation-note {
  margin: 8px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  color: #30425f;
  background: #eef3fb;
  line-height: 1.6;
}

.colorful-chart .chart-row:nth-child(5n + 1) .chart-fill {
  background: linear-gradient(90deg, #263879, #4d6ee8);
}

.colorful-chart .chart-row:nth-child(5n + 2) .chart-fill {
  background: linear-gradient(90deg, #058b7b, #46c6a9);
}

.colorful-chart .chart-row:nth-child(5n + 3) .chart-fill {
  background: linear-gradient(90deg, #e89116, #ffc44f);
}

.colorful-chart .chart-row:nth-child(5n + 4) .chart-fill {
  background: linear-gradient(90deg, #a53b75, #e774ae);
}

.colorful-chart .chart-row:nth-child(5n + 5) .chart-fill {
  background: linear-gradient(90deg, #66717f, #aab5c2);
}

.bakery-product-revenue-wrap {
  margin-top: 18px;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  background: #fff;
}

.bakery-product-revenue-table {
  min-width: 760px;
}

.bakery-product-revenue-table th {
  color: #46536a;
  background: #f5f7fb;
}

.bakery-product-revenue-table td {
  color: #26354d;
}

.bakery-product-revenue-table td:nth-child(3),
.bakery-product-revenue-table td:nth-child(4),
.bakery-product-revenue-table td:nth-child(5),
.bakery-product-revenue-table td:nth-child(6) {
  text-align: right;
  white-space: nowrap;
}

.bakery-category-name {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  color: #263879;
  background: #edf1ff;
  font-weight: 800;
}

#bakeryProductRows td:first-child strong,
#bakeryReportProductRows td:first-child strong {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 6px;
  color: #263879;
  background: #edf1ff;
  white-space: nowrap;
}

.bakery-infographic-report {
  margin: 18px 0;
  padding: 20px;
  border: 1px solid #d9e2ef;
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 8%, rgba(239, 75, 35, 0.12), transparent 24%),
    radial-gradient(circle at 6% 96%, rgba(47, 128, 237, 0.12), transparent 25%),
    #f8fafc;
}

.bakery-infographic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 14px;
}

.bakery-info-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 16px;
  border: 1px solid #dce4ef;
  border-top: 5px solid var(--info-color);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 35, 73, 0.07);
}

.bakery-info-card::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -35px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--info-color) 10%, transparent);
}

.bakery-info-card-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: center;
}

.bakery-info-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--info-color) 16%, white);
  font-size: 25px;
}

.bakery-info-card-head > div:nth-child(2) > span,
.bakery-info-card-head small {
  display: block;
  color: #6c7890;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.bakery-info-card-head > div:nth-child(2) > strong {
  display: block;
  margin: 4px 0;
  color: #102349;
  font-size: 20px;
}

.bakery-info-donut {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--info-color) calc(var(--info-percent) * 1%), #e7edf5 0);
}

.bakery-info-donut::before {
  content: "";
  grid-area: 1 / 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
}

.bakery-info-donut b {
  z-index: 1;
  grid-area: 1 / 1;
  color: #102349;
  font-size: 13px;
}

.bakery-info-rows {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.bakery-info-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid #edf1f6;
}

.bakery-info-rows span {
  color: #6d7890;
}

.bakery-info-rows strong {
  color: #102349;
  text-align: right;
}

@media (max-width: 1180px) {
  .bakery-infographic-grid {
    grid-template-columns: repeat(2, minmax(230px, 1fr));
  }
}

@media (max-width: 700px) {
  .bakery-infographic-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) {
  .bakery-payment-form {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

.bakery-reconciliation-formula {
  margin: 14px 0 0;
  padding: 12px;
  border-left: 4px solid #ffb21a;
  border-radius: 6px;
  color: #d8ecff;
  background: #0c1823;
  line-height: 1.7;
}

@media (max-width: 1100px) {
  .bakery-reconciliation-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

.bakery-accounting-table tr.calculation-error td {
  background: #fff0f0;
  color: #8a1f2d;
}

.bakery-accounting-table {
  border-color: #263847;
  background: #101b25;
  box-shadow: none;
}

.bakery-accounting-table table {
  min-width: 1160px;
}

.bakery-accounting-table th {
  border-bottom-color: #263847;
  background: #101b25;
}

.bakery-accounting-table td {
  border-bottom-color: #263847;
  color: #ffffff;
  background: #101b25;
}

.bakery-accounting-table input,
.bakery-accounting-table select {
  min-height: 54px;
  border-radius: 8px;
  font-size: 18px;
}

.bakery-accounting-table select {
  min-width: 170px;
  border-color: #75b843;
}

.bakery-accounting-table select option {
  color: #f3fbff;
  background: #0c1823;
}

.bakery-accounting-panel .secondary-action {
  min-height: 54px;
  color: #d8ecff;
  border-color: #33495a;
  background: #0c1823;
}

.bakery-accounting-panel .save-status {
  min-height: 54px;
  color: #9fb0bc;
  border-color: #33495a;
  background: #0c1823;
}

.bakery-accounting-panel .save-status.success {
  color: #aaff57;
  border-color: #75b843;
  background: #122113;
}

.bakery-accounting-panel .save-status.error {
  color: #ff7186;
  border-color: #763146;
  background: #2b1721;
}

.bakery-finance-kpis {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  margin-bottom: 14px;
}

.bakery-finance-kpis .kpi {
  min-height: 92px;
  box-shadow: none;
}

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

.quality-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.quality-row:first-child {
  border-top: 0;
}

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

/* Finished Projects Archive */
.archive-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px;
  border: 1px solid #d9e2ef;
  border-left: 5px solid var(--green);
  border-radius: 14px;
  background: linear-gradient(120deg, #ffffff 0%, #f2fbf7 100%);
  box-shadow: var(--shadow-soft);
}

.archive-lock-badge {
  flex: 0 0 auto;
  padding: 10px 16px;
  color: #176246;
  border: 1px solid #b8ddce;
  border-radius: 999px;
  background: #e8f7f0;
  font-weight: 800;
}

.archive-kpis {
  margin: 18px 0;
}

.archive-filter-panel {
  margin-bottom: 18px;
}

.archive-export-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.archive-table td {
  vertical-align: top;
}

.archive-record-counts {
  display: grid;
  gap: 3px;
  min-width: 110px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.archive-result {
  min-width: 190px;
  max-width: 320px;
  white-space: normal;
}

.archive-modal-panel {
  width: min(820px, calc(100vw - 32px));
}

.compact-archive-modal {
  width: min(620px, calc(100vw - 32px));
}

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

.archive-check-summary > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faff;
}

.archive-check-summary span,
.archive-check-summary strong {
  display: block;
}

.archive-check-summary span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.archive-check-summary strong {
  color: var(--ink);
  font-size: 17px;
}

.archive-closure-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #b8ddce;
  border-radius: 12px;
  background: #f1faf6;
}

.archive-closure-card h3 {
  margin-bottom: 12px;
  color: #176246;
}

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

.archive-closure-grid div {
  padding: 12px;
  border-radius: 9px;
  background: #ffffff;
}

.archive-closure-grid span,
.archive-closure-grid strong {
  display: block;
}

.archive-closure-grid span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 800px) {
  .archive-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .archive-check-summary,
  .archive-closure-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .archive-check-summary,
  .archive-closure-grid {
    grid-template-columns: 1fr;
  }
}

.report-mini-card {
  min-height: 120px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.report-mini-card span,
.report-mini-card strong {
  display: block;
}

.report-mini-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-mini-card strong {
  margin-top: 8px;
  line-height: 1.45;
}

.yene-download-card {
  display: grid;
  gap: 14px;
  align-content: start;
  background: #ffffff;
}

.report-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.report-download-actions button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #cfd8e8;
  border-radius: 7px;
  color: var(--blue);
  background: #f8fbff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.report-download-actions button:first-child {
  color: #ffffff;
  border-color: var(--blue);
  background: var(--blue);
}

.report-download-actions button:hover {
  border-color: var(--gold);
  box-shadow: 0 10px 22px rgba(22, 34, 72, 0.1);
}

.production-type-grid,
.store-guide-light {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.store-guide-light {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.store-primary-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.store-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.store-summary-card {
  min-height: 106px;
  border: 1px solid #d9e2ef;
  border-left: 5px solid #26336f;
  border-radius: 10px;
  padding: 16px;
  background: #ffffff;
}

.store-summary-card.warning {
  border-left-color: #f0a51b;
  background: #fffaf0;
}

.store-summary-card.danger {
  border-left-color: #c53d3d;
  background: #fff5f5;
}

.store-summary-card span,
.store-summary-card strong,
.store-summary-card small {
  display: block;
}

.store-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.store-summary-card strong {
  margin-top: 7px;
  color: var(--ink);
  font-size: clamp(19px, 1.8vw, 28px);
  overflow-wrap: anywhere;
}

.store-summary-card small {
  margin-top: 5px;
  color: var(--muted);
}

.store-entry-panel {
  margin: 18px 0;
}

.store-daily-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin: 14px 0 18px;
  padding: 13px 15px;
  border: 1px solid #d7e1ef;
  border-radius: 9px;
  background: #f7faff;
  color: #52617a;
  font-size: 13px;
}

.store-daily-guide strong {
  color: var(--ink);
}

.store-primary-actions a.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.store-entry-form {
  border: 1px solid #d4deed;
  border-left: 5px solid var(--gold);
  border-radius: 10px;
  padding: 20px;
  background: #f8faff;
}

.store-form-heading,
.store-form-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.store-form-heading {
  margin-bottom: 16px;
}

.store-form-heading h3 {
  margin-top: 4px;
  color: var(--ink);
}

.store-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 14px;
}

.store-form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.store-form-grid input,
.store-form-grid select {
  min-height: 48px;
}

.store-form-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.store-balance-table td {
  vertical-align: middle;
}

.store-balance-table .store-balance-value {
  font-size: 17px;
  font-weight: 900;
}

.store-balance-table tr.store-row-low {
  background: #fffaf0;
}

.store-balance-table tr.store-row-out {
  background: #fff1f1;
}

.store-activity-panel {
  margin-top: 18px;
}

.store-movement-type {
  display: inline-flex;
  min-width: 76px;
  justify-content: center;
}

.production-type-grid article,
.store-guide-light article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.production-type-grid span,
.production-type-grid strong,
.production-type-grid small,
.store-guide-light strong,
.store-guide-light span {
  display: block;
}

.production-type-grid span,
.store-guide-light span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.production-type-grid strong {
  margin-top: 7px;
  font-size: 24px;
}

.production-type-grid small {
  margin-top: 3px;
  color: var(--muted);
}

.inner-panel {
  box-shadow: none;
}

/* Melostic classic rebrand layer */
body {
  position: relative;
  overflow-x: hidden;
  color: #101936;
  background:
    linear-gradient(180deg, #fbfcff 0, #f2f5fa 250px, #edf2f8 100%),
    #edf2f8;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 0 292px;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(38, 51, 111, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(249, 178, 60, 0.038) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.75;
}

body::after {
  content: "";
  position: fixed;
  right: 34px;
  bottom: 28px;
  z-index: 0;
  width: min(430px, 36vw);
  height: 270px;
  pointer-events: none;
  background: url("assets/melostic_logo.jpg") center / contain no-repeat;
  opacity: 0.035;
  filter: saturate(0.8);
}

.sidebar,
.app-shell {
  position: relative;
  z-index: 1;
}

.sidebar {
  position: fixed;
  padding: 26px 24px;
  background:
    linear-gradient(180deg, rgba(249, 178, 60, 0.08), transparent 260px),
    #202a64;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 18px 0 50px rgba(16, 25, 54, 0.14);
}

.sidebar::before {
  content: "";
  position: absolute;
  right: -72px;
  bottom: 72px;
  width: 230px;
  height: 230px;
  pointer-events: none;
  background: url("assets/melostic_logo.jpg") center / contain no-repeat;
  opacity: 0.05;
  filter: grayscale(1) brightness(1.8);
}

.brand {
  position: relative;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  width: 66px;
  height: 66px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.16);
}

.brand-mark img {
  width: 105px;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0;
}

.brand span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  line-height: 1.35;
}

.nav-list {
  gap: 7px;
}

.nav-item {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 15px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  font-weight: 700;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.105);
  border-color: rgba(255, 255, 255, 0.12);
  border-left: 4px solid var(--gold);
}

.sidebar-footer {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.085);
}

.sidebar-footer::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -36px;
  width: 110px;
  height: 110px;
  border: 18px solid rgba(249, 178, 60, 0.12);
  border-radius: 50%;
}

.app-shell {
  padding: 30px 34px 40px;
}

.topbar {
  margin: -30px -34px 26px;
  padding: 26px 34px 20px;
  border-bottom: 1px solid #d9e0ec;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 254, 0.94)),
    #ffffff;
  box-shadow: 0 12px 28px rgba(16, 25, 54, 0.055);
}

h1 {
  color: #081839;
  font-size: clamp(30px, 2.7vw, 42px);
  letter-spacing: 0;
}

h2 {
  color: #111d38;
  letter-spacing: 0;
}

.eyebrow {
  color: #667087;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.section-note,
.lead,
.meta,
.detail-text {
  color: #5f6f8b;
}

input,
select,
textarea {
  min-height: 46px;
  border-color: #d5deeb;
  border-radius: 7px;
  background: #ffffff;
  color: #101936;
}

textarea {
  line-height: 1.45;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #bdc9dc;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #26336f;
  box-shadow: 0 0 0 3px rgba(249, 178, 60, 0.18);
}

.primary-action,
.secondary-action,
.danger-action,
.icon-action,
.file-add-action,
.bakery-logout,
.bakery-add-product {
  border-radius: 7px;
  letter-spacing: 0;
}

.primary-action,
.file-add-action {
  background: #26336f;
  box-shadow: 0 12px 22px rgba(38, 51, 111, 0.16);
}

.primary-action:hover,
.file-add-action:hover {
  background: #1d285d;
}

.secondary-action,
.icon-action {
  color: #26336f;
  background: #ffffff;
  border-color: #cad5e5;
}

.secondary-action:hover,
.icon-action:hover {
  background: #fff7e8;
  border-color: #f9b23c;
}

.danger-action {
  color: #9c2f2f;
  background: #fff8f8;
  border-color: #e1b9b9;
}

.access-panel,
.panel,
.project-card,
.pipeline-card,
.document-card,
.control-form,
.kpi,
.role-card,
.worker-card,
.assistant-project-card,
.project-desk-card,
.workspace-side > .control-form,
.workspace-files-panel,
.workspace-history-panel,
.workspace-main > .inner-panel,
.workspace-overview-card,
.report-mini-card,
.modal-panel {
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(16, 25, 54, 0.07);
}

.panel,
.access-panel,
.control-form {
  padding: 22px;
}

.panel-header {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f6;
}

.kpi {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 18px;
}

.kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--gold);
}

.kpi strong {
  color: #081839;
  font-size: 31px;
}

.command-strip div,
.bakery-command div,
.report-download-bar {
  border-color: #d8e0ec;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(16, 25, 54, 0.06);
}

.control-map-panel {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 210px),
    #26336f;
}

.control-map-panel::before {
  content: "";
  position: absolute;
  right: -58px;
  top: -52px;
  width: 240px;
  height: 240px;
  background: url("assets/melostic_logo.jpg") center / contain no-repeat;
  opacity: 0.08;
  filter: grayscale(1) brightness(2);
}

.control-map-panel::after {
  color: rgba(255, 255, 255, 0.06);
}

.control-flow article,
.office-metrics div {
  border-color: rgba(255, 255, 255, 0.82);
}

.business-tabs,
.bakery-erp-nav {
  position: sticky;
  top: 98px;
  border-color: #d8e0ec;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(16, 25, 54, 0.06);
}

.business-tab,
.bakery-tab {
  min-height: 42px;
  border-radius: 7px;
  color: #26336f;
  background: #ffffff;
  border-color: #d4deed;
}

.business-tab:hover,
.business-tab.active,
.bakery-tab:hover,
.bakery-tab.active {
  color: #ffffff;
  background: #26336f;
  border-color: #26336f;
}

.table-wrap {
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 #ffffff;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  color: #26336f;
  background: #f1f5fb;
  border-bottom: 1px solid #d8e0ec;
}

td {
  border-bottom: 1px solid #e7edf5;
}

tbody tr:hover td {
  background: #fffaf0;
}

.tag {
  color: #26336f;
  background: #eef2ff;
}

.tag.green {
  color: #17684c;
  background: #e7f4ef;
}

.tag.amber {
  color: #8a5f0e;
  background: #fff5df;
}

.tag.red {
  color: #9c2f2f;
  background: #fff0f0;
}

.progress-track,
.chart-track {
  background: #e7edf5;
}

.progress-fill,
.chart-fill {
  background: linear-gradient(90deg, #26336f, #f9b23c);
}

.login-form {
  background: #f8fafc;
}

.role-card:hover,
.worker-card:hover,
.assistant-project-card:hover {
  border-color: #f9b23c;
  background: #fffaf0;
  box-shadow: 0 16px 34px rgba(16, 25, 54, 0.1);
}

.assistant-project-card.active {
  border-color: #f9b23c;
  box-shadow: 0 0 0 3px rgba(249, 178, 60, 0.18);
}

.assistant-new-project:not(.hidden) {
  background:
    linear-gradient(180deg, #fbfcff 0%, #eef3f9 100%) !important;
}

.assistant-new-project:not(.hidden)::after,
.assistant-workspace-modal::after {
  content: "";
  position: fixed;
  right: 38px;
  bottom: 24px;
  width: min(390px, 32vw);
  height: 230px;
  pointer-events: none;
  background: url("assets/melostic_logo.jpg") center / contain no-repeat;
  opacity: 0.035;
}

.assistant-new-project:not(.hidden) .fullscreen-form-header,
.workspace-header {
  background:
    linear-gradient(180deg, rgba(249, 178, 60, 0.1), transparent 260px),
    #202a64;
}

.assistant-create-card {
  border-color: #d8e0ec;
  background: #ffffff;
  box-shadow: 0 28px 72px rgba(16, 25, 54, 0.14);
}

.assistant-create-card .panel-header,
.workspace-main > .inner-panel > .panel-header,
.workspace-files-panel > .panel-header,
.workspace-history-panel > .panel-header {
  background: #f8fafc;
}

.workspace-side > .control-form,
.workspace-files-panel,
.workspace-history-panel {
  border-top-width: 3px;
}

.upload-field {
  border-color: #cfd9e9;
  background: #fbfdff;
  box-shadow: inset 4px 0 0 #f9b23c;
}

.pending-file-row,
.workspace-file-card,
.file-empty-state,
.restricted-note {
  background: #f8fafc;
}

.workspace-file-card:hover {
  border-color: #f9b23c;
  background: #fffaf0;
}

.bakery-operation-screen {
  color: #101936;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #d8e0ec;
}

.bakery-operation-top {
  border-bottom-color: #d8e0ec;
}

.bakery-operation-top .eyebrow,
.bakery-accounting-panel .eyebrow,
.bakery-operation-actions label,
.bakery-operation-screen th {
  color: #667087;
}

.bakery-operation-top h2 {
  color: #081839;
}

.bakery-operation-actions input,
.bakery-accounting-table input,
.bakery-accounting-table select,
.bakery-accounting-table td,
.bakery-accounting-table th {
  color: #101936;
  background: #ffffff;
  border-color: #d8e0ec;
}

.bakery-accounting-panel {
  background: #ffffff;
  border-color: #d8e0ec;
}

.bakery-accounting-panel .section-note {
  color: #5f6f8b;
}

.daily-summary-strip article {
  background: #f8fafc;
  border-color: #d8e0ec;
}

.daily-summary-strip span {
  color: #667087;
}

.daily-summary-strip strong {
  color: #081839;
}

.bakery-accounting-table {
  background: #ffffff;
  border-color: #d8e0ec;
  max-height: calc(100vh - 210px);
  overflow: auto;
}

.bakery-accounting-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f1f5fb;
  box-shadow: 0 1px 0 #d8e0ec;
}

.bakery-accounting-table select {
  border-color: #f9b23c;
}

.bakery-accounting-table select option {
  color: #101936;
  background: #ffffff;
}

.bakery-logout,
.bakery-add-product {
  min-height: 48px;
  color: #ffffff;
  border-color: #26336f;
  background: #26336f;
  font-size: 16px;
}

.bakery-add-product {
  color: #101936;
  border-color: #f9b23c;
  background: #f9b23c;
}

.bakery-accounting-panel .secondary-action,
.bakery-accounting-panel .save-status {
  min-height: 46px;
  color: #26336f;
  border-color: #cad5e5;
  background: #ffffff;
}

.bakery-accounting-panel .save-status.success {
  color: #17684c;
  border-color: #b7d8cb;
  background: #e7f4ef;
}

.bakery-accounting-panel .save-status.error {
  color: #9c2f2f;
  border-color: #e1b9b9;
  background: #fff0f0;
}

.report-mini-card,
.production-type-grid article,
.store-guide-light article {
  background: #fbfdff;
}

.system-status {
  background: rgba(255, 255, 255, 0.92);
}

/* Cleaner executive pass: reduce visual noise and give the ERP room to breathe. */
body {
  background:
    linear-gradient(180deg, #fbfcff 0, #f7f9fc 310px, #eef2f7 100%),
    #eef2f7;
}

body::before {
  inset: 0 0 0 268px;
  background:
    linear-gradient(90deg, rgba(38, 51, 111, 0.018) 1px, transparent 1px),
    linear-gradient(180deg, rgba(38, 51, 111, 0.014) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.45;
}

body::after {
  right: 42px;
  bottom: 34px;
  width: min(360px, 28vw);
  opacity: 0.022;
}

.sidebar {
  width: 268px;
  padding: 28px 22px;
  gap: 26px;
  background:
    linear-gradient(180deg, rgba(249, 178, 60, 0.055), transparent 300px),
    #1f2a63;
  box-shadow: 12px 0 34px rgba(16, 25, 54, 0.12);
}

.sidebar::before {
  right: -86px;
  bottom: 120px;
  width: 200px;
  height: 200px;
  opacity: 0.035;
}

.brand {
  gap: 13px;
  padding-bottom: 20px;
}

.brand-mark {
  width: 58px;
  height: 58px;
}

.brand-mark img {
  width: 92px;
}

.brand strong {
  font-size: 16px;
}

.brand span {
  font-size: 12px;
}

.nav-list {
  gap: 5px;
}

.nav-item {
  min-height: 44px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  font-weight: 650;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.085);
  border-left-width: 3px;
}

.sidebar-footer {
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.065);
}

.sidebar-footer strong {
  font-size: 14px;
}

.app-shell {
  margin-left: 268px;
  padding: 34px 42px 44px;
}

.topbar {
  align-items: center;
  margin: -34px -42px 32px;
  padding: 28px 42px 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 26px rgba(16, 25, 54, 0.045);
}

.toolbar {
  gap: 9px;
}

.select-label {
  min-width: 176px;
}

.topbar .select-label {
  min-width: 172px;
}

.topbar .primary-action,
.topbar .secondary-action {
  min-width: 86px;
}

.system-status {
  margin-top: 12px;
  padding: 6px 9px;
  border-color: #e2e8f2;
  background: #ffffff;
  box-shadow: none;
}

.system-status strong,
.system-status small {
  font-size: 11px;
}

h1 {
  font-size: clamp(32px, 2.35vw, 40px);
}

h2 {
  font-size: 19px;
}

.section-heading {
  max-width: 980px;
  margin-bottom: 22px;
}

.office-layout {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  gap: 22px;
}

.access-panel,
.panel,
.control-form {
  padding: 24px;
}

.access-panel,
.panel,
.project-card,
.pipeline-card,
.document-card,
.control-form,
.kpi,
.role-card,
.worker-card,
.assistant-project-card,
.project-desk-card,
.workspace-side > .control-form,
.workspace-files-panel,
.workspace-history-panel,
.workspace-main > .inner-panel,
.workspace-overview-card,
.report-mini-card,
.modal-panel {
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 10px 24px rgba(16, 25, 54, 0.052);
}

.panel-header {
  margin-bottom: 20px;
}

.command-strip,
.main-grid,
.report-grid,
.meeting-layout,
.dashboard-hub-grid,
.kpi-grid,
.bakery-module-grid {
  gap: 20px;
}

.command-strip div,
.bakery-command div {
  padding: 18px 20px;
  box-shadow: 0 8px 20px rgba(16, 25, 54, 0.045);
}

.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.kpi {
  min-height: 96px;
  padding: 18px 20px;
  box-shadow: 0 8px 20px rgba(16, 25, 54, 0.045);
}

.kpi::before {
  width: 3px;
}

.kpi strong {
  font-size: 29px;
}

.business-tabs,
.bakery-erp-nav {
  top: 106px;
  gap: 7px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 20px rgba(16, 25, 54, 0.045);
}

.business-tab,
.bakery-tab {
  min-height: 40px;
}

.control-map-panel {
  min-height: 100%;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 240px),
    #24306c;
}

.control-map-panel h2 {
  font-size: 28px;
}

.control-flow {
  gap: 12px;
  margin-top: 24px;
}

.control-flow article {
  padding: 16px;
}

.office-metrics {
  grid-template-columns: 1fr;
  gap: 8px;
}

.role-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.role-card {
  min-height: 128px;
}

.table-wrap {
  overflow: auto;
  box-shadow: none;
}

th,
td {
  padding-top: 14px;
  padding-bottom: 14px;
}

tbody tr:hover td {
  background: #fffdfa;
}

input,
select,
textarea {
  min-height: 44px;
}

.primary-action,
.secondary-action,
.danger-action,
.file-add-action {
  min-height: 42px;
}

.assistant-workspace-shell {
  padding: 0 clamp(24px, 4vw, 56px) 42px;
}

.assistant-workspace-layout {
  width: min(1180px, 100%);
  gap: 22px;
}

.workspace-header {
  margin-bottom: 26px;
  padding-top: 24px;
  padding-bottom: 24px;
  box-shadow: 0 14px 36px rgba(16, 25, 54, 0.14);
}

.workspace-side {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  gap: 18px;
}

.upload-field {
  padding: 18px;
  box-shadow: inset 3px 0 0 #f9b23c;
}

.assistant-create-card {
  width: min(900px, calc(100% - 56px));
  box-shadow: 0 22px 54px rgba(16, 25, 54, 0.12);
}

.assistant-new-project:not(.hidden) .fullscreen-form-header h2 {
  font-size: 30px;
}

.bakery-operation-screen {
  padding: 24px;
}

.bakery-operation-top {
  margin-bottom: 22px;
  padding-bottom: 20px;
}

.bakery-operation-top h2 {
  font-size: 34px;
}

.daily-summary-strip {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.report-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Professional login screen */
.login-screen {
  background:
    linear-gradient(135deg, #f8fafc 0%, #eef3f9 55%, #f7f9fc 100%),
    #f7f9fc;
}

/* Fail closed: Melos is invisible unless app.js has positively identified
   the current ERP session as the administrator account. */
body:not(.melos-admin-authorized) #melosLauncher,
body:not(.melos-admin-authorized) #melosPanel {
  display: none !important;
}

.login-screen::before {
  inset: 0 0 0 268px;
  background: none;
}

.login-screen::after {
  right: 6vw;
  bottom: 8vh;
  width: min(420px, 30vw);
  height: 280px;
  opacity: 0.026;
}

.login-screen .topbar {
  display: none;
}

.login-screen .app-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 44px;
}

.login-screen .office-layout {
  width: min(520px, 100%);
  margin: 0 auto;
  display: block;
}

.login-screen .access-panel {
  position: relative;
  overflow: hidden;
  padding: 38px;
  border-color: #d7dfeb;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 70px rgba(16, 25, 54, 0.12);
}

.login-screen .access-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #26336f, #f9b23c);
}

.login-brand-block {
  display: grid;
  justify-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.login-brand-block img {
  width: 116px;
  height: 82px;
  object-fit: cover;
  object-position: center 36%;
  margin-bottom: 18px;
  border: 1px solid #e3e9f2;
  border-radius: 8px;
  background: #ffffff;
}

.login-brand-block .eyebrow {
  margin-bottom: 7px;
  color: #8b96aa;
}

.login-brand-block h2 {
  font-size: 28px;
  line-height: 1.12;
}

.login-brand-block .lead {
  margin-top: 8px;
  font-size: 15px;
}

.login-brand-block.compact {
  margin: 6px 0 22px;
}

.password-recovery-panel {
  border-top: 1px solid #e6ecf5;
  margin-top: 20px;
  padding-top: 20px;
}

.password-recovery-panel .secondary-action {
  width: 100%;
  min-height: 46px;
}

.login-screen .login-form {
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.login-screen .login-form label {
  font-size: 11px;
}

.login-screen .login-form input {
  min-height: 50px;
  padding: 0 14px;
  background: #fbfcff;
  font-size: 15px;
}

.login-screen .login-form input:-webkit-autofill {
  box-shadow: 0 0 0 1000px #fbfcff inset;
}

.login-screen .login-form .primary-action {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  font-size: 16px;
}

.login-screen .form-message {
  margin-top: 16px;
  text-align: center;
}

.login-screen .role-grid,
.login-screen .control-map-panel {
  display: none;
}

.login-screen .sidebar-footer {
  display: none;
}

.login-screen .sidebar {
  background: #202a64;
}

.login-screen .nav-list {
  margin-top: 10px;
}

/* CEO dashboard refinement */
#ceo .command-strip {
  margin-bottom: 22px;
}

#ceo .command-strip div {
  min-height: 96px;
  border-left-width: 3px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
}

#ceo .kpi-grid {
  margin-bottom: 22px;
}

#ceo .kpi {
  min-height: 92px;
}

#ceo .kpi span {
  color: #778299;
}

#ceo .kpi strong {
  font-size: 28px;
}

#ceo .worker-report-panel {
  margin: 0 0 22px;
}

#ceo .worker-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

#ceo .worker-card {
  box-shadow: none;
}

#ceo .dashboard-hub-grid,
#ceo .main-grid {
  margin-bottom: 22px;
}

#ceo .password-admin-panel {
  margin: 0 0 22px;
  background: #fbfcff;
  box-shadow: none;
}

#ceo .password-admin-panel .control-form {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#ceo .password-admin-panel .panel-header {
  margin-bottom: 12px;
}

#ceo .user-admin-layout {
  display: grid;
  gap: 18px;
}

#ceo .user-admin-layout > .control-form {
  padding: 0 0 18px;
  border-bottom: 1px solid #e7ebf0;
  border-radius: 0;
}

#ceo .user-admin-layout > .control-form:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

#ceo .user-admin-layout h3 {
  margin-bottom: 12px;
  color: #253451;
  font-size: 15px;
  font-weight: 700;
}

#ceo .user-create-form .form-message {
  margin-top: 10px;
}

#ceo .report-mini-card {
  min-height: 108px;
  background: #ffffff;
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .sidebar::before {
    display: none;
  }

  body::before {
    inset: 0;
  }

  .app-shell {
    margin-left: 0;
  }

  .office-layout,
  .command-strip,
  .bakery-command,
  .bakery-date-strip,
  .bakery-module-grid,
  .bakery-erp-nav,
  .business-tabs,
  .batch-card-grid,
  .batch-detail-layout,
  .detail-grid,
  .document-check-grid,
  .dashboard-hub-grid,
  .main-grid,
  .report-grid,
  .assistant-workspace-grid,
  .assistant-workspace-layout,
  .worker-grid,
  .meeting-layout,
  .kpi-grid,
  .bakery-finance-kpis,
  .pipeline-grid,
  .document-grid,
  .report-card-grid,
  .production-type-grid,
  .store-guide-light,
  .form-grid.two,
  .form-grid.three,
  .form-grid.four {
    grid-template-columns: 1fr;
  }

  .yene-unit-heading {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .yene-brand-lockup {
    width: 72px;
    height: 72px;
  }

  .yene-four-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yene-erp-frame {
    min-height: 760px;
  }

  #babyBatches .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .import-file-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .import-stage-pill {
    width: 100%;
  }

  .topbar {
    flex-direction: column;
  }

  .toolbar {
    width: 100%;
    justify-content: stretch;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .topbar-actions > .topbar-logout {
    margin-left: auto;
  }

  .select-label {
    min-width: 100%;
  }

  .workspace-side {
    position: static;
    grid-template-columns: 1fr;
  }

  .marketing-task-layout {
    grid-template-columns: 1fr;
  }

  .assistant-new-project:not(.hidden),
  .assistant-workspace-shell,
  .marketing-task-shell {
    padding: 20px;
  }

  .assistant-new-project:not(.hidden) {
    display: block;
  }

  .assistant-new-project:not(.hidden) .fullscreen-form-header {
    position: static;
    min-height: auto;
    padding: 22px;
  }

  .assistant-new-project:not(.hidden) .fullscreen-form-header .secondary-action {
    margin-top: 18px;
  }

  .assistant-create-card {
    width: calc(100% - 28px);
    margin: 14px auto;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 18px;
  }

  .yene-unit-heading,
  .yene-four-tabs {
    grid-template-columns: 1fr;
  }

  .yene-brand-lockup {
    width: 84px;
    height: 84px;
  }

  #babyBatches .kpi-grid {
    grid-template-columns: 1fr;
  }

  .process-timeline {
    grid-template-columns: 1fr;
  }

  body::after,
  .sidebar::before,
  .assistant-new-project:not(.hidden)::after,
  .assistant-workspace-modal::after {
    display: none;
  }

  h1 {
    font-size: 25px;
  }

  .login-form,
  .role-grid,
  .office-metrics {
    grid-template-columns: 1fr;
  }
}

/* Aryam bilingual tablet production registers */
.production-register-hero {
  border-top: 4px solid #ffb326;
  background:
    radial-gradient(circle at 92% 16%, rgba(255, 179, 38, 0.16), transparent 26%),
    #fff;
}

.production-register-hero .production-type-grid {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.production-dashboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 12px;
}

.production-dashboard-heading h3 {
  margin: 3px 0 0;
  color: #10204a;
  font-size: 1.05rem;
}

.production-mini-dashboard article {
  min-height: 112px;
}

.production-bulk-approval {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.production-bulk-approval .primary-action {
  min-height: 44px;
  padding: 10px 16px;
}

.production-ingredient-totals {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #172654;
  color: #fff;
}

.production-ingredient-totals > div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.production-ingredient-totals span {
  display: inline-flex;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #eef4ff;
}

.production-entry-panel {
  border: 1px solid #cfdaf0;
  box-shadow: 0 18px 42px rgba(25, 45, 89, 0.09);
}

.production-register-form {
  display: grid;
  gap: 24px;
}

.production-default-panel,
.production-output-section {
  display: grid;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid #d7e1f1;
  border-radius: 14px;
  background: #fff;
}

.production-default-panel {
  grid-template-columns: minmax(280px, 1.4fr) minmax(260px, 1fr) auto;
  align-items: end;
  background: #fffaf0;
  border-color: #eed6a0;
}

.production-default-panel h3,
.production-output-section h3 {
  margin: 4px 0 0;
  color: #10204a;
}

.production-default-panel .secondary-action {
  min-height: 52px;
}

.production-output-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.production-output-rows {
  display: grid;
  gap: 10px;
}

.production-output-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(170px, 0.7fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d9e3f2;
  border-radius: 12px;
  background: #f8faff;
}

.production-output-row .tag,
.production-output-row .mini-action {
  margin-bottom: 5px;
}

.production-register-grid,
.production-ingredient-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.production-register-form label {
  display: grid;
  gap: 8px;
  color: #26376d;
  font-weight: 800;
  line-height: 1.35;
}

.production-register-form input,
.production-register-form select,
.handover-return-input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid #bfcee8;
  border-radius: 11px;
  background: #fff;
  color: #101e40;
  font: inherit;
  font-weight: 750;
}

.production-register-form input:focus,
.production-register-form select:focus,
.handover-return-input:focus {
  outline: 3px solid rgba(255, 179, 38, 0.28);
  border-color: #f4a514;
}

.production-register-form .production-auto-batch input[readonly] {
  background: #eef4ff;
  border-color: #a9bee8;
  color: #182d70;
  cursor: not-allowed;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.production-auto-batch small {
  color: #63708a;
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
}

.handover-difference {
  color: #b42318 !important;
  font-weight: 800;
}

.bakery-role-workspace-message {
  margin: 10px 0 0;
  color: #263b73;
  font-weight: 800;
  line-height: 1.45;
}

.production-register-hero.seller-focused-workspace .production-type-grid,
.production-register-hero.seller-focused-workspace .production-dashboard-heading,
.production-register-hero.seller-focused-workspace .production-ingredient-totals {
  display: none;
}

.production-ingredient-section {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid #d7e1f1;
  border-left: 5px solid #ffb326;
  border-radius: 14px;
  background: #f8faff;
}

.production-ingredient-section h3 {
  margin: 4px 0 0;
  color: #10204a;
}

.production-confirmation {
  grid-template-columns: 28px minmax(0, 1fr) !important;
  align-items: center;
  padding: 16px 18px;
  border-radius: 12px;
  background: #eef5ff;
}

.production-confirmation input {
  min-height: 22px;
  width: 22px;
}

.production-control-table th {
  white-space: nowrap;
}

.production-control-table td {
  vertical-align: top;
  min-width: 118px;
}

.production-control-table td small {
  display: block;
  margin-top: 5px;
  color: #69758d;
  line-height: 1.35;
}

.production-control-table .ingredient-cell {
  min-width: 240px;
  max-width: 340px;
  line-height: 1.45;
}

.mini-action.approve {
  border-color: #8fd2ad;
  background: #eaf9f0;
  color: #08743a;
}

.seller-handover-panel {
  border-top: 4px solid #1a9a68;
}

.handover-return-input {
  min-width: 90px;
}

@media (max-width: 1180px) {
  .production-register-hero .production-type-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .store-summary-grid,
  .store-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-register-grid,
  .production-ingredient-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-default-panel {
    grid-template-columns: 1fr 1fr;
  }

  .production-default-panel > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .production-register-hero .production-type-grid {
    grid-template-columns: 1fr;
  }

  .production-default-panel,
  .production-output-row {
    grid-template-columns: 1fr;
  }

  .production-output-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .production-register-grid,
  .production-ingredient-grid {
    grid-template-columns: 1fr;
  }

  .store-summary-grid,
  .store-form-grid {
    grid-template-columns: 1fr;
  }

  .store-primary-actions,
  .store-primary-actions button {
    width: 100%;
  }

  .production-register-form input,
  .production-register-form select {
    min-height: 58px;
    font-size: 16px;
  }
}

/* v48: classic, compact Aryam Bakery workspace */
body.bakery-workspace-active .topbar {
  margin-bottom: 16px;
  padding-top: 16px;
  padding-bottom: 14px;
  min-height: 82px;
}

body.bakery-workspace-active .topbar h1 {
  font-size: clamp(26px, 2.5vw, 36px);
  line-height: 1.05;
}

body.bakery-workspace-active .topbar .eyebrow {
  margin-bottom: 4px;
}

body.bakery-workspace-active .system-status {
  margin-top: 8px;
}

body.bakery-workspace-active .toolbar {
  gap: 8px;
}

body.bakery-workspace-active .toolbar select,
body.bakery-workspace-active .toolbar button {
  min-height: 38px;
  padding-top: 8px;
  padding-bottom: 8px;
}

#bakeryErp .bakery-section-heading {
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
  padding: 0 2px;
}

#bakeryErp .bakery-section-heading h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

#bakeryErp .bakery-section-heading .eyebrow {
  margin-bottom: 3px;
}

#bakeryErp .bakery-section-heading .section-note {
  margin-top: 4px;
  font-size: 13px;
}

.bakery-fullscreen-action {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid #c9d5e8;
  border-radius: 8px;
  background: #fff;
  color: #17275c;
  font-weight: 800;
  cursor: pointer;
}

.bakery-fullscreen-action:hover {
  border-color: #273778;
  background: #f5f7fc;
}

#bakeryErp .bakery-date-strip {
  min-height: 0;
  margin-bottom: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  box-shadow: none;
}

#bakeryErp .bakery-date-strip .select-label {
  gap: 5px;
  font-size: 12px;
}

#bakeryErp .bakery-date-strip select {
  min-height: 38px;
  padding-top: 7px;
  padding-bottom: 7px;
}

#bakeryErp .bakery-date-strip > div:last-child strong {
  font-size: 20px;
}

#bakeryErp .bakery-daily-motivation {
  display: block;
  margin-bottom: 11px;
}

#bakeryErp .bakery-daily-motivation .bakery-motivation-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 11px 18px;
  border: 1px solid rgba(28, 49, 94, .14);
  border-left: 4px solid #f4ad31;
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 0%, rgba(244, 173, 49, .18), transparent 28%),
    linear-gradient(112deg, #f8faff 0%, #fffaf0 52%, #fff 100%);
  box-shadow: 0 8px 22px rgba(20, 33, 63, .07);
}

#bakeryErp .bakery-daily-motivation strong {
  color: #14213f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

body.bakery-workspace-active #bakeryErp .bakery-erp-nav {
  position: sticky;
  top: 78px;
  z-index: 48;
  margin-bottom: 14px;
  padding: 7px;
  overflow-x: auto;
  flex-wrap: nowrap;
  border: 1px solid #d7e0ed;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 8px 22px rgba(29, 46, 82, .11);
  backdrop-filter: blur(12px);
}

body.bakery-workspace-active #bakeryErp .bakery-erp-nav .bakery-tab {
  flex: 1 0 125px;
  min-height: 40px;
  padding: 8px 10px;
}

body.bakery-focus-mode .sidebar,
body.bakery-focus-mode .topbar {
  display: none !important;
}

body.bakery-focus-mode::before {
  inset: 0;
}

body.bakery-focus-mode .app-shell {
  width: 100%;
  max-width: none;
  margin-left: 0;
  padding: 12px 18px 28px;
}

body.bakery-focus-mode #bakeryErp {
  width: 100%;
  max-width: none;
}

body.bakery-focus-mode #bakeryErp .bakery-erp-nav {
  top: 0;
}

@media (max-width: 860px) {
  #bakeryErp .bakery-section-heading {
    align-items: flex-start;
  }

  #bakeryErp .bakery-section-heading .section-note {
    display: none;
  }

  #bakeryErp .bakery-daily-motivation .bakery-motivation-card {
    min-height: 52px;
    padding: 10px 14px;
  }

  #bakeryErp .bakery-daily-motivation strong {
    font-size: 14px;
  }

  body.bakery-workspace-active #bakeryErp .bakery-erp-nav {
    top: 68px;
  }
}

/* v49 — Melostic Modern Classic design system
   Quiet enterprise surfaces, restrained depth, precise typography and tablet clarity. */
.modern-classic-theme {
  --ink: #152033;
  --muted: #687386;
  --line: #e2e7ef;
  --panel: #ffffff;
  --page: #f5f6f8;
  --nav: #17223b;
  --blue: #23345d;
  --blue-soft: #eef2f8;
  --gold: #d79a2b;
  --gold-soft: #fff7e8;
  --green: #168064;
  --amber: #a46b10;
  --red: #b53a43;
  --teal: #21777a;
  --shadow: 0 10px 30px rgba(20, 32, 55, .055);
  --shadow-soft: 0 4px 16px rgba(20, 32, 55, .045);
  background: #f5f6f8;
  font-family: "Segoe UI Variable", Aptos, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: -.006em;
}

.modern-classic-theme::before {
  display: none;
}

.modern-classic-theme::after {
  opacity: .018;
  filter: grayscale(1);
}

.modern-classic-theme .sidebar {
  width: 228px;
  padding: 18px 14px 16px;
  gap: 16px;
  border-right: 1px solid rgba(255, 255, 255, .06);
  background: #1d2940;
  box-shadow: none;
}

.modern-classic-theme .sidebar::before {
  display: none;
}

.modern-classic-theme .brand {
  gap: 11px;
  padding: 0 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.modern-classic-theme .brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .16);
}

.modern-classic-theme .brand-mark img {
  width: 80px;
}

.modern-classic-theme .brand strong {
  max-width: 136px;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.modern-classic-theme .brand span {
  color: rgba(235, 240, 250, .6);
  font-size: 11px;
}

.modern-classic-theme .nav-list {
  gap: 3px;
}

.modern-classic-theme .nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(241, 244, 251, .7);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.005em;
}

.modern-classic-theme .nav-item-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .82;
}

.modern-classic-theme .nav-item:hover {
  transform: none;
  color: #fff;
  background: rgba(255, 255, 255, .06);
}

.modern-classic-theme .nav-item.active {
  color: #fff;
  border-color: rgba(255, 255, 255, .08);
  border-left-color: #dca237;
  background: rgba(255, 255, 255, .075);
  box-shadow: inset 3px 0 0 #dca237;
}

.modern-classic-theme .nav-item.active .nav-item-icon {
  color: #f2bd59;
  opacity: 1;
}

.modern-classic-theme .sidebar-footer {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
}

.modern-classic-theme .sidebar-footer span {
  color: rgba(235, 240, 250, .52);
  font-size: 10px;
  letter-spacing: .08em;
}

.modern-classic-theme .sidebar-footer strong {
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
  font-weight: 600;
}

.modern-classic-theme .app-shell {
  margin-left: 228px;
  padding: 22px 26px 34px;
}

.modern-classic-theme .topbar {
  align-items: center;
  min-height: 76px;
  margin: -22px -26px 18px;
  padding: 12px 26px;
  border-bottom: 1px solid #e6e9ef;
  background: rgba(255, 255, 255, .96);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.modern-classic-theme .topbar h1 {
  color: #17213a;
  font-size: clamp(25px, 1.9vw, 32px);
  font-weight: 730;
  letter-spacing: -.035em;
}

.modern-classic-theme .eyebrow {
  color: #7b8495;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .095em;
}

.modern-classic-theme .system-status {
  gap: 6px;
  margin-top: 4px;
  padding: 4px 8px;
  border-color: #e4e8ef;
  border-radius: 999px;
  background: #f8fafc;
}

.modern-classic-theme .system-status strong,
.modern-classic-theme .system-status small {
  font-size: 10px;
}

.modern-classic-theme .status-light {
  width: 7px;
  height: 7px;
}

.modern-classic-theme .toolbar,
.modern-classic-theme .topbar-actions {
  gap: 8px;
}

.modern-classic-theme .select-label,
.modern-classic-theme .control-form label,
.modern-classic-theme .login-form label {
  gap: 6px;
  color: #707a8d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
}

.modern-classic-theme .topbar .select-label {
  min-width: 142px;
}

.modern-classic-theme input,
.modern-classic-theme select,
.modern-classic-theme textarea {
  border-color: #dce2eb;
  border-radius: 10px;
  background: #fff;
  color: #18243c;
  box-shadow: 0 1px 1px rgba(23, 34, 59, .02);
}

.modern-classic-theme input,
.modern-classic-theme select {
  min-height: 38px;
  padding-right: 12px;
  padding-left: 12px;
}

.modern-classic-theme textarea {
  padding: 12px;
}

.modern-classic-theme input:hover,
.modern-classic-theme select:hover,
.modern-classic-theme textarea:hover {
  border-color: #c6cfdd;
}

.modern-classic-theme input:focus,
.modern-classic-theme select:focus,
.modern-classic-theme textarea:focus {
  border-color: #7c8ebc;
  box-shadow: 0 0 0 3px rgba(60, 83, 139, .11);
}

.modern-classic-theme input:disabled,
.modern-classic-theme select:disabled {
  border-color: #e6eaf0;
  background: #f1f3f6;
  color: #808a9a;
}

.modern-classic-theme .primary-action,
.modern-classic-theme .secondary-action,
.modern-classic-theme .danger-action,
.modern-classic-theme .file-add-action,
.modern-classic-theme .bakery-fullscreen-action {
  min-height: 38px;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -.005em;
  box-shadow: none;
}

.modern-classic-theme .primary-action {
  background: #22345f;
}

.modern-classic-theme .primary-action:hover {
  transform: translateY(-1px);
  background: #19294e;
  box-shadow: 0 8px 18px rgba(34, 52, 95, .16);
}

.modern-classic-theme .secondary-action,
.modern-classic-theme .bakery-fullscreen-action {
  border-color: #d8dee8;
  background: #fff;
  color: #24345c;
}

.modern-classic-theme .section-heading {
  margin-bottom: 18px;
}

.modern-classic-theme .section-heading h2,
.modern-classic-theme .panel-header h2 {
  color: #17213a;
  font-weight: 720;
  letter-spacing: -.025em;
}

.modern-classic-theme .section-note,
.modern-classic-theme .lead {
  color: #718096;
  line-height: 1.55;
}

.modern-classic-theme .panel,
.modern-classic-theme .control-form,
.modern-classic-theme .access-panel,
.modern-classic-theme .project-card,
.modern-classic-theme .pipeline-card,
.modern-classic-theme .document-card,
.modern-classic-theme .worker-card,
.modern-classic-theme .assistant-project-card,
.modern-classic-theme .workspace-overview-card,
.modern-classic-theme .report-mini-card,
.modern-classic-theme .modal-panel {
  border: 1px solid #e3e7ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(20, 32, 55, .04);
}

.modern-classic-theme .panel,
.modern-classic-theme .control-form,
.modern-classic-theme .access-panel {
  padding: 22px;
}

.modern-classic-theme .panel-header {
  margin-bottom: 17px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf0f4;
}

.modern-classic-theme .kpi-grid {
  gap: 12px;
  margin-bottom: 16px;
}

.modern-classic-theme .kpi {
  position: relative;
  min-height: 108px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #e4e8ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(20, 32, 55, .035);
}

.modern-classic-theme .kpi::before {
  top: 0;
  right: 18px;
  bottom: auto;
  left: 18px;
  width: auto;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: #d8a03a;
}

.modern-classic-theme .kpi span {
  color: #758093;
  font-size: 10px;
  letter-spacing: .06em;
}

.modern-classic-theme .kpi strong {
  margin-top: 13px;
  color: #17213a;
  font-size: clamp(24px, 2vw, 30px);
  font-weight: 730;
  letter-spacing: -.035em;
}

.modern-classic-theme .business-tabs,
.modern-classic-theme .bakery-erp-nav {
  gap: 4px;
  padding: 5px;
  border: 1px solid #e1e6ed;
  border-radius: 13px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 5px 18px rgba(20, 32, 55, .055);
}

.modern-classic-theme .business-tab,
.modern-classic-theme .bakery-tab {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  color: #657084;
  background: transparent;
  font-size: 12px;
  font-weight: 720;
}

.modern-classic-theme .business-tab:hover,
.modern-classic-theme .bakery-tab:hover {
  color: #1f3159;
  background: #f3f5f8;
}

.modern-classic-theme .business-tab.active,
.modern-classic-theme .bakery-tab.active {
  color: #fff;
  background: #22345f;
  box-shadow: 0 5px 12px rgba(34, 52, 95, .16);
}

.modern-classic-theme .bakery-date-strip {
  border-color: #e2e6ed;
  border-radius: 13px;
  background: #fff;
}

.modern-classic-theme #bakeryErp .bakery-daily-motivation .bakery-motivation-card {
  border-color: rgba(28, 49, 94, .14);
  border-left-color: #f4ad31;
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 0%, rgba(244, 173, 49, .18), transparent 28%),
    linear-gradient(112deg, #f8faff 0%, #fffaf0 52%, #fff 100%);
}

.modern-classic-theme .table-wrap,
.modern-classic-theme .bakery-accounting-table {
  border: 1px solid #e3e7ee;
  border-radius: 12px;
  background: #fff;
}

.modern-classic-theme table {
  border-collapse: separate;
  border-spacing: 0;
}

.modern-classic-theme th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e7ee;
  color: #687386;
  background: #f7f8fa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.modern-classic-theme td {
  padding: 13px 14px;
  border-bottom-color: #edf0f4;
  color: #26334a;
}

.modern-classic-theme tbody tr:last-child td {
  border-bottom: 0;
}

.modern-classic-theme tbody tr:hover td {
  background: #fafbfc;
}

.modern-classic-theme .tag,
.modern-classic-theme .status-pill,
.modern-classic-theme .badge {
  border-radius: 999px;
  font-size: 11px;
}

.modern-classic-theme .command-strip div,
.modern-classic-theme .bakery-command div {
  border-radius: 13px;
  box-shadow: none;
}

.modern-classic-theme .report-chart,
.modern-classic-theme .colorful-chart {
  border-radius: 11px;
}

.modern-classic-theme .modal-backdrop {
  background: rgba(12, 20, 36, .52);
  backdrop-filter: blur(5px);
}

.modern-classic-theme .modal-panel {
  box-shadow: 0 24px 70px rgba(15, 25, 46, .2);
}

.modern-classic-theme.login-screen {
  background: #eef1f5;
}

.modern-classic-theme.login-screen .access-panel {
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(20, 32, 55, .11);
}

.modern-classic-theme body.bakery-focus-mode,
.modern-classic-theme.bakery-focus-mode {
  background: #f5f6f8;
}

.modern-classic-theme.bakery-focus-mode .app-shell {
  padding: 14px 20px 32px;
}

@media (max-width: 1180px) {
  .modern-classic-theme .sidebar {
    width: 226px;
  }

  .modern-classic-theme .app-shell {
    margin-left: 226px;
    padding-right: 22px;
    padding-left: 22px;
  }

  .modern-classic-theme .topbar {
    margin-right: -22px;
    margin-left: -22px;
    padding-right: 22px;
    padding-left: 22px;
  }
}

@media (max-width: 860px) {
  .modern-classic-theme .sidebar {
    width: 100%;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .modern-classic-theme .brand {
    padding: 0 0 10px;
  }

  .modern-classic-theme .nav-list {
    display: flex;
    gap: 5px;
    overflow-x: auto;
  }

  .modern-classic-theme .nav-item {
    width: auto;
    min-width: max-content;
    padding: 0 12px;
  }

  .modern-classic-theme .sidebar-footer {
    display: none;
  }

  .modern-classic-theme .app-shell {
    margin-left: 0;
    padding: 16px;
  }

  .modern-classic-theme .topbar {
    margin: -16px -16px 18px;
    padding: 14px 16px;
  }

  .modern-classic-theme .panel,
  .modern-classic-theme .control-form,
  .modern-classic-theme .access-panel {
    padding: 17px;
  }
}
.nav-bank-group { display: grid; gap: 4px; }
.nav-bank-toggle .nav-bank-chevron { margin-left: auto; font-size: 18px; transition: transform .2s ease; }
.nav-bank-group.open .nav-bank-chevron { transform: rotate(180deg); }
.nav-bank-menu { display: none; margin: 0 0 4px 43px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.18); gap: 3px; }
.nav-bank-group.open .nav-bank-menu { display: grid; }
.nav-bank-menu button { border: 0; background: transparent; color: #c8d3e5; text-align: left; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; }
.nav-bank-menu button:hover, .nav-bank-menu button.active { color: #fff; background: rgba(255,255,255,.1); }
.bank-ledger-switch { display: grid; gap: 5px; color: #5f6c80; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.bank-ledger-switch select { min-width: 190px; border: 1px solid #cad6e7; border-radius: 10px; background: #fff; color: #14213d; padding: 12px 36px 12px 12px; font: inherit; font-size: 14px; text-transform: none; letter-spacing: 0; }
@media (max-width: 760px) { .bank-ledger-switch, .bank-ledger-switch select { width: 100%; } }

.bakery-carry-validation {
  margin: 14px 0;
  padding: 12px 15px;
  border: 1px solid #cbd8e8;
  border-left: 5px solid #52709a;
  border-radius: 10px;
  background: #f5f8fc;
  color: #263b59;
  line-height: 1.5;
}
.bakery-carry-validation.success { border-color: #9dd8bd; border-left-color: #14875d; background: #edf9f4; color: #116545; }
.bakery-carry-validation.error { border-color: #efb3b3; border-left-color: #c7373f; background: #fff1f1; color: #98272d; }
.bakery-carry-validation.info { border-left-color: #d69a20; background: #fff9ec; color: #755311; }
.bakery-missed-day-access { margin: 18px 0; padding: 18px; border: 1px solid #d7dfeb; border-left: 5px solid #efaa24; border-radius: 14px; background: linear-gradient(135deg, #fffdf8 0%, #fff7e7 100%); color: #17213b; }
.bakery-missed-day-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.bakery-missed-day-heading h3 { margin: 4px 0 6px; font-size: 20px; }
.bakery-missed-day-heading p:last-child { margin: 0; color: #65728a; }
.bakery-missed-day-form { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(320px, 1.5fr) auto; align-items: end; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #eadab7; }
.bakery-missed-day-form label { display: grid; gap: 7px; color: #4d5c75; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.bakery-missed-day-form textarea { min-height: 74px; resize: vertical; border: 1px solid #cad5e5; border-radius: 10px; padding: 11px 12px; color: #17213b; background: #fff; font: inherit; text-transform: none; letter-spacing: 0; }
.bakery-missed-day-list { display: grid; gap: 9px; margin-top: 14px; }
.bakery-missed-day-request { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #dce3ed; border-radius: 10px; background: #fff; }
.bakery-missed-day-request > div:first-child { display: grid; gap: 4px; }
.bakery-missed-day-request small { color: #68758d; }
.bakery-missed-day-empty { margin: 0; padding: 12px; color: #68758d; text-align: center; }
.bakery-missed-day-history { margin-top: 12px; border-top: 1px solid #eadab7; padding-top: 10px; }
.bakery-missed-day-history summary { cursor: pointer; color: #536179; font-weight: 800; }
.bakery-missed-day-request.compact { padding: 8px 10px; grid-template-columns: minmax(220px, 1fr) auto auto; }
.bakery-daily-scope-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0; padding: 10px 12px; border: 1px solid #d7dfeb; border-radius: 10px; background: #f8fafc; color: #536179; font-size: 13px; }
.bakery-daily-scope-bar .secondary-action { min-height: 36px; padding: 8px 12px; white-space: nowrap; }
@media (max-width: 900px) { .bakery-missed-day-form { grid-template-columns: 1fr; } .bakery-missed-day-request { grid-template-columns: 1fr auto; } .bakery-missed-day-request .row-actions { grid-column: 1 / -1; } }
.bakery-accounting-table tr.carry-mismatch-row > td { background: #fff4f4; }
.bakery-accounting-table input.carry-mismatch-input { border: 2px solid #c7373f; background: #fff; color: #8e2027; box-shadow: 0 0 0 3px rgba(199, 55, 63, .1); }
.carry-mismatch-note { display: block; margin-top: 5px; color: #b1262e; font-size: 11px; font-weight: 800; white-space: nowrap; }
.bakery-accounting-table tr.production-mismatch-row:not(.carry-mismatch-row) > td { background: #fff9ed; }
.bakery-accounting-table input.production-mismatch-input { border: 2px solid #d88a10; background: #fff; color: #7b4b00; box-shadow: 0 0 0 3px rgba(216, 138, 16, .12); }
.production-mismatch-note { display: block; margin-top: 5px; color: #9a5c00; font-size: 11px; font-weight: 800; white-space: nowrap; }

/* Android bakery-only workspace. Activated only by ?mobile=bakery. */
.bakery-mobile-mode .nav-item[data-view="ceo"],
.bakery-mobile-mode .nav-item[data-view="finishedProjects"],
.bakery-mobile-mode .nav-item[data-view="assistantProjects"],
.bakery-mobile-mode .nav-item[data-view="babyProducts"],
.bakery-mobile-mode .nav-bank-group,
.bakery-mobile-mode .nav-item[data-view="firedoorModule"],
.bakery-mobile-mode .nav-item[data-view="exportModule"],
.bakery-mobile-mode .nav-item[data-view="adminUsers"] { display: none !important; }

/* Dedicated Aryam Bakery Android app. The parent-company shell and every
   non-bakery entry point are removed rather than merely left inactive. */
/* v115: clean, information-dense management dashboard. */
#ceo {
  --ceo-border: #e2e7ee;
  --ceo-muted: #6f7a8d;
  --ceo-gold: #d79a2b;
}

#ceo .management-attention {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid var(--ceo-border);
  border-left: 3px solid var(--ceo-gold);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

#ceo .management-attention-label {
  color: #273753;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

#ceo .management-attention strong {
  color: #344158;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

#ceo .management-attention-note {
  color: var(--ceo-muted);
  font-size: 11px;
  white-space: nowrap;
}

#ceo .ceo-primary-kpis {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

#ceo .ceo-primary-kpis .kpi {
  min-height: 82px;
  padding: 14px 16px;
  border-color: var(--ceo-border);
  border-radius: 10px;
  box-shadow: none;
}

#ceo .ceo-primary-kpis .kpi::before {
  display: none;
}

#ceo .ceo-primary-kpis .kpi span {
  color: var(--ceo-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

#ceo .ceo-primary-kpis .kpi strong {
  margin-top: 8px;
  font-size: 25px;
}

#ceo .ceo-summary {
  display: flex;
  gap: 0;
  align-items: stretch;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--ceo-border);
  border-radius: 10px;
  background: #fff;
}

#ceo .ceo-summary > span {
  display: flex;
  flex: 1 1 0;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 9px 13px;
  border-right: 1px solid #edf0f4;
}

#ceo .ceo-summary > span:last-child {
  border-right: 0;
}

#ceo .ceo-summary small {
  overflow: hidden;
  color: var(--ceo-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#ceo .ceo-summary strong {
  color: #24334e;
  font-size: 14px;
  white-space: nowrap;
}

#ceo .panel,
#ceo .report-mini-card,
#ceo .control-form {
  border-color: var(--ceo-border);
  background: #fff;
  box-shadow: none;
}

#ceo .panel {
  padding: 18px;
  border-radius: 11px;
}

#ceo .panel-header {
  margin-bottom: 12px;
  padding-bottom: 11px;
}

#ceo .panel-header .eyebrow {
  margin-bottom: 3px;
  color: var(--ceo-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: none;
}

#ceo .panel-header h2 {
  font-size: 18px;
}

#ceo .worker-report-panel {
  margin-bottom: 12px;
}

#ceo #showDashboardWorkerProject {
  color: #1f2937;
  background: #e0a334;
}

#ceo #showDashboardWorkerProject:hover {
  background: #cf9224;
  box-shadow: none;
}

#ceo .employee-table-wrap {
  overflow-x: auto;
  border-color: var(--ceo-border);
  border-radius: 9px;
}

#ceo .employee-performance-table {
  width: 100%;
  min-width: 820px;
}

#ceo .employee-performance-table th {
  position: static;
  padding: 9px 12px;
  color: #687386;
  background: #f7f8fa;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .025em;
  text-transform: none;
}

#ceo .employee-performance-table td {
  padding: 10px 12px;
  font-size: 13px;
}

#ceo .employee-row {
  cursor: pointer;
  transition: background .14s ease;
}

#ceo .employee-row:hover,
#ceo .employee-row:focus {
  outline: none;
  background: #fafbfc;
}

#ceo .next-action-cell {
  max-width: 360px;
  color: #59667a;
  line-height: 1.35;
}

#ceo .status-count,
#ceo .progress-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 750;
}

#ceo .status-count.green,
#ceo .progress-value.green {
  color: #17664f;
  background: #e9f5f0;
}

#ceo .status-count.amber,
#ceo .progress-value.amber {
  color: #875b0d;
  background: #fff5df;
}

#ceo .status-count.red,
#ceo .progress-value.red {
  color: #9d343b;
  background: #fff0f1;
}

#ceo .dashboard-hub-grid,
#ceo .main-grid {
  gap: 12px;
  margin-bottom: 12px;
}

#ceo .report-mini-card {
  min-height: 88px;
}

@media (max-width: 1080px) {
  #ceo .management-attention {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  #ceo .management-attention-note {
    white-space: normal;
  }

  #ceo .ceo-primary-kpis {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 680px) {
  #ceo .ceo-primary-kpis {
    grid-template-columns: 1fr;
  }

  #ceo .ceo-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #ceo .ceo-summary > span {
    border-right: 0;
    border-bottom: 1px solid #edf0f4;
  }
}

.bakery-standalone-mode .sidebar { display: none !important; }
.bakery-standalone-mode .app-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin-left: 0 !important;
}
.bakery-standalone-mode .topbar .toolbar .select-label:first-child {
  display: none !important;
}
.bakery-standalone-mode #pageTitle { color: #152348; }
.bakery-standalone-mode #office .login-brand-block img { max-width: 118px; }
.bakery-standalone-mode #office .role-grid { display: none !important; }

@media (max-width: 860px) {
  .bakery-standalone-mode .app-shell { padding: 14px 12px 26px; }
  .bakery-standalone-mode .topbar {
    margin: -14px -12px 14px;
    padding: 14px 14px 12px;
    align-items: center;
  }
  .bakery-standalone-mode .topbar h1 { font-size: clamp(24px, 7vw, 34px); }
  .bakery-standalone-mode .topbar-actions { width: auto; margin-left: auto; }
  .bakery-standalone-mode .topbar .toolbar { display: none !important; }
  .bakery-standalone-mode .topbar-logout { min-height: 44px; }
  .bakery-standalone-mode .system-status { padding: 6px 8px; }
  .bakery-standalone-mode .system-status small { display: none; }
}

@media (max-width: 860px) {
  .bakery-mobile-mode .sidebar { position: relative; min-height: auto; }
  .bakery-mobile-mode .brand { justify-content: center; }
  .bakery-mobile-mode .nav-list { justify-content: center; }
  .bakery-mobile-mode .app-shell { min-height: calc(100vh - 104px); }
  .bakery-mobile-mode .topbar { position: relative; top: auto; }
  .bakery-mobile-mode .topbar-actions { width: 100%; }
  .bakery-mobile-mode .toolbar { grid-template-columns: 1fr 1fr; width: 100%; }
  .bakery-mobile-mode .toolbar .select-label:first-child { display: none; }
  .bakery-mobile-mode .toolbar button { min-height: 46px; }
  .bakery-mobile-mode .bakery-tabs { overflow-x: auto; overscroll-behavior-inline: contain; }
  .bakery-mobile-mode input,
  .bakery-mobile-mode select,
  .bakery-mobile-mode textarea,
  .bakery-mobile-mode button { font-size: 16px; }
}

/* v100 — Eden keeps the same Admin-style Bakery workspace on laptop and
   tablet-width screens. The navigation remains visible and the Bakery tabs
   scroll horizontally instead of becoming a long vertical list. */
@media (min-width: 720px) and (max-width: 1180px) {
  .modern-classic-theme.eden-admin-layout .sidebar {
    display: flex !important;
    position: fixed !important;
    inset: 0 auto 0 0;
    width: 210px !important;
    min-height: 100vh;
    padding: 18px 13px 16px;
    gap: 16px;
    border-right: 1px solid rgba(255, 255, 255, .06);
    border-bottom: 0;
    background: #17223b;
    box-shadow: 8px 0 30px rgba(18, 29, 52, .10);
  }

  .modern-classic-theme.eden-admin-layout .sidebar .brand {
    display: flex;
    padding: 0 6px 15px;
  }

  .modern-classic-theme.eden-admin-layout .sidebar .nav-list {
    display: grid;
    overflow: visible;
  }

  .modern-classic-theme.eden-admin-layout .sidebar .nav-item {
    width: 100%;
    min-width: 0;
    padding: 0 10px;
  }

  .modern-classic-theme.eden-admin-layout .sidebar-footer {
    display: block;
  }

  .modern-classic-theme.eden-admin-layout .app-shell {
    width: auto;
    max-width: none;
    min-height: 100vh;
    margin-left: 210px !important;
    padding: 18px 18px 32px;
  }

  .modern-classic-theme.eden-admin-layout .topbar {
    min-height: 86px;
    margin: -18px -18px 18px;
    padding: 16px 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .modern-classic-theme.eden-admin-layout .topbar h1 {
    font-size: clamp(25px, 3vw, 34px);
  }

  .modern-classic-theme.eden-admin-layout #bakeryErp .bakery-erp-nav {
    display: flex !important;
    grid-template-columns: none !important;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .modern-classic-theme.eden-admin-layout #bakeryErp .bakery-erp-nav .bakery-tab {
    flex: 0 0 auto;
    min-width: 118px;
    min-height: 39px;
    padding: 7px 10px;
    white-space: nowrap;
  }

  .modern-classic-theme.eden-admin-layout #bakeryErp .bakery-section-heading {
    display: flex;
    align-items: center;
  }

  .modern-classic-theme.eden-admin-layout #bakeryErp .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modern-classic-theme.eden-admin-layout #bakeryErp .bakery-finance-kpis,
  .modern-classic-theme.eden-admin-layout #bakeryErp .bakery-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* v150 — iPhone and small-phone accessibility hardening */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: rgba(38, 51, 111, .14);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #f0a91f;
  outline-offset: 2px;
}

.table-wrap,
.nav-list,
.bakery-erp-nav,
.business-tabs {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

@media (max-width: 680px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .modern-classic-theme .sidebar {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .modern-classic-theme .brand {
    gap: 9px;
    padding-bottom: 8px;
  }

  .modern-classic-theme .brand-mark {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
  }

  .modern-classic-theme .brand strong {
    font-size: 15px;
  }

  .modern-classic-theme .brand span {
    font-size: 12px;
  }

  .modern-classic-theme .nav-list {
    margin: 0 -12px;
    padding: 2px 12px 8px;
    scroll-padding-inline: 12px;
    overscroll-behavior-inline: contain;
  }

  .modern-classic-theme .nav-item {
    min-height: 44px;
    padding: 0 13px;
    font-size: 14px;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .modern-classic-theme .app-shell {
    padding-top: 12px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .modern-classic-theme .topbar,
  body.bakery-workspace-active .topbar {
    position: static;
    min-height: 0;
    margin: -12px -12px 14px;
    padding-top: 14px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: 13px;
    padding-left: max(12px, env(safe-area-inset-left));
    gap: 12px;
  }

  .modern-classic-theme .topbar h1,
  body.bakery-workspace-active .topbar h1 {
    font-size: clamp(24px, 8vw, 30px);
    overflow-wrap: anywhere;
  }

  .system-status {
    width: 100%;
    margin-top: 7px;
  }

  .topbar-actions,
  .toolbar {
    width: 100%;
    min-width: 0;
  }

  .toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .toolbar .select-label,
  .topbar .select-label {
    width: auto;
    min-width: 0;
  }

  .toolbar .select-label:first-child {
    grid-column: 1 / -1;
  }

  .toolbar .primary-action,
  .topbar-logout {
    min-height: 46px;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    max-width: 100%;
    min-height: 46px;
    font-size: 16px;
  }

  .primary-action,
  .secondary-action,
  .danger-action,
  .file-add-action,
  .icon-action,
  .mini-action,
  .bakery-tab,
  .business-tab,
  .bakery-fullscreen-action {
    min-height: 44px;
  }

  .panel,
  .control-form,
  .access-panel,
  .modern-classic-theme .panel,
  .modern-classic-theme .control-form,
  .modern-classic-theme .access-panel {
    padding: 14px;
  }

  .panel-header,
  .report-download-bar,
  #bakeryErp .bakery-section-heading,
  .production-dashboard-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-actions,
  .report-filter,
  .download-controls,
  .form-actions,
  .row-actions {
    width: 100%;
    justify-content: flex-start;
    white-space: normal;
  }

  .report-filter label,
  .report-filter select,
  .download-controls > *,
  .form-actions > button {
    width: 100%;
    min-width: 0;
  }

  #bakeryErp .bakery-section-heading {
    gap: 10px;
  }

  #bakeryErp .bakery-section-heading .bakery-fullscreen-action {
    width: 100%;
  }

  #bakeryErp .bakery-date-strip {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }

  #bakeryErp .bakery-date-strip .select-label {
    width: 100%;
    min-width: 0;
  }

  .ethiopian-date-select,
  .hr-date-field .ethiopian-date-select {
    width: 100%;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 6px;
  }

  .ethiopian-date-select select {
    width: 100%;
    min-width: 0;
    padding-right: 4px;
    padding-left: 7px;
  }

  #bakeryErp .bakery-command {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #bakeryErp .bakery-command div {
    padding: 14px;
  }

  #bakeryErp .bakery-erp-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    width: 100%;
    grid-template-columns: none;
    gap: 6px;
    margin-bottom: 12px;
    padding: 7px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 7px;
  }

  #bakeryErp .bakery-tab {
    flex: 0 0 auto;
    min-width: 126px;
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    box-shadow: inset -18px 0 18px -20px rgba(16, 25, 54, .7);
  }

  th,
  td {
    padding: 11px 10px;
    font-size: 13px;
  }

  .chart-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .chart-row .chart-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  #bakeryDashboard {
    margin-right: -2px;
    margin-left: -2px;
  }

  #bakeryDashboard .kpi {
    min-height: 108px;
    padding: 17px;
  }

  #bakeryDashboard .kpi strong {
    font-size: clamp(1.55rem, 8vw, 2rem);
    overflow-wrap: anywhere;
  }

  .security-session-notice {
    top: max(8px, env(safe-area-inset-top));
    width: calc(100vw - 20px);
    padding: 11px 12px;
  }
}

@media (max-width: 359px) {
  .toolbar {
    grid-template-columns: 1fr;
  }

  .toolbar .select-label:first-child {
    grid-column: auto;
  }

  .ethiopian-date-select,
  .hr-date-field .ethiopian-date-select {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr) minmax(0, .9fr);
    gap: 4px;
  }
}
