* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.demo-note {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(20, 24, 28, .86);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
}

.demo-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-links a {
  padding: 9px 11px;
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: currentColor;
}

.meter {
  height: 7px;
  overflow: hidden;
  background: rgba(120, 130, 140, .25);
}

.meter i {
  display: block;
  height: 100%;
  background: currentColor;
}

.index-body {
  background: #eef1ef;
  color: #17202a;
}

.index-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 28px;
}

.index-kicker {
  margin: 0 0 8px;
  color: #56616d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.index-wrap h1 {
  margin: 0 0 14px;
  max-width: 780px;
  font-family: "Bahnschrift", "Arial Narrow", Arial, sans-serif;
  font-size: 50px;
  line-height: 1;
  text-transform: uppercase;
}

.index-wrap > p {
  max-width: 760px;
  margin: 0 0 32px;
  color: #46515d;
  font-size: 18px;
  line-height: 1.45;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.index-card {
  min-height: 420px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(25, 32, 40, .15);
  box-shadow: 0 16px 36px rgba(25, 32, 40, .10);
}

.index-card h2 {
  margin: 0 0 10px;
  font-family: "Bahnschrift", "Arial Narrow", Arial, sans-serif;
  font-size: 25px;
  line-height: 1.05;
  text-transform: uppercase;
}

.index-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.index-card > div:first-child {
  display: flex;
  min-height: 330px;
  flex-direction: column;
}

.index-card .mini {
  display: grid;
  gap: 9px;
  margin: auto 0 26px;
}

.mini-line {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .18);
}

.index-card .open {
  width: fit-content;
  padding: 10px 12px;
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.industrial-card {
  color: #f5f7f4;
  background: #10161d;
}

.saas-card {
  color: #142235;
  background: #fff;
}

.rugged-card {
  color: #222426;
  background: #fbfaf6;
}

.redwood-card {
  color: #2f2a26;
  background: #f7f3ef;
}

.redwood-analytics-card {
  color: #2f2a26;
  background: #f5f1ee;
}

.table-card {
  color: #17202a;
  background: #e9eef2;
}

.master-card {
  color: #143c4a;
  background: #f1f4f2;
}

.inbox-card {
  color: #2f2a26;
  background: #f7f3ec;
}

.logbook-card {
  color: #24352f;
  background: #f9f4e8;
}

.swimlane-card {
  color: #f7fafc;
  background: #111827;
}

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

@media (max-width: 680px) {
  .index-grid {
    grid-template-columns: 1fr;
  }
}

/* Industrial Operations Console */
.industrial-page {
  background: #090d12;
  color: #edf3f1;
  font-family: "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
}

.industrial-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 88px 1fr;
}

.industrial-rail {
  background: #0e141b;
  border-right: 1px solid #28313a;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.industrial-logo {
  height: 48px;
  display: grid;
  place-items: center;
  background: #e0a22d;
  color: #10161d;
  font-weight: 900;
  font-size: 20px;
}

.industrial-nav {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.industrial-nav span {
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #28313a;
  color: #7f8b96;
  font-size: 12px;
  font-weight: 900;
}

.industrial-nav span.active {
  color: #e0a22d;
  border-color: #e0a22d;
}

.industrial-main {
  padding: 24px 28px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(0deg, rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 28px 28px,
    #0d1319;
}

.industrial-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 2px solid #313b45;
}

.industrial-top h1,
.saas-topline h1,
.rugged-title h1,
.redwood-title h1 {
  margin: 0;
  letter-spacing: 0;
}

.industrial-top h1 {
  font-size: 44px;
  text-transform: uppercase;
}

.industrial-top p {
  margin: 8px 0 0;
  color: #9ca9b5;
  font-size: 14px;
}

.industrial-actions {
  display: flex;
  gap: 10px;
}

.industrial-actions button {
  min-height: 40px;
  border: 1px solid #43505c;
  background: #17202a;
  color: #edf3f1;
  padding: 0 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.industrial-actions button.primary {
  background: #e0a22d;
  color: #10161d;
  border-color: #e0a22d;
}

.industrial-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 20px 0;
}

.industrial-stat {
  padding: 18px;
  background: #131b24;
  border: 1px solid #28313a;
  border-left: 5px solid currentColor;
}

.industrial-stat strong {
  display: block;
  font-size: 42px;
  line-height: .9;
}

.industrial-stat span {
  display: block;
  margin-top: 8px;
  color: #9ca9b5;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.industrial-workspace {
  display: grid;
  grid-template-columns: 1.45fr .8fr;
  gap: 18px;
}

.industrial-panel {
  background: #111922;
  border: 1px solid #28313a;
}

.industrial-panel h2 {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid #28313a;
  font-size: 18px;
  text-transform: uppercase;
}

.industrial-table {
  display: grid;
}

.industrial-row {
  display: grid;
  grid-template-columns: 86px 1.1fr .9fr .9fr 110px;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #222c36;
}

.industrial-row.header {
  color: #778693;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.industrial-row b {
  font-size: 18px;
  color: #fff;
}

.industrial-row span,
.industrial-timeline p {
  color: #aeb9c4;
  font-size: 13px;
}

.industrial-timeline {
  padding: 18px;
}

.industrial-event {
  padding: 0 0 18px 18px;
  border-left: 2px solid #34404b;
  position: relative;
}

.industrial-event::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 2px;
  width: 10px;
  height: 10px;
  background: #e0a22d;
}

.industrial-event h3 {
  margin: 0 0 5px;
  font-size: 15px;
  text-transform: uppercase;
}

/* Modern Maintenance SaaS */
.saas-page {
  background: #f3f6f7;
  color: #142235;
}

.saas-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}

.saas-sidebar {
  padding: 24px 18px;
  background: #17324f;
  color: #f8fbfc;
}

.saas-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  font-weight: 900;
}

.saas-brand i {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: #54b47c;
}

.saas-menu {
  display: grid;
  gap: 7px;
}

.saas-menu a {
  padding: 12px;
  border-radius: 6px;
  color: #cbd8e2;
  font-size: 14px;
  font-weight: 700;
}

.saas-menu a.active {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.saas-main {
  padding: 26px 30px;
}

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

.saas-topline h1 {
  font-size: 34px;
}

.saas-topline p {
  margin: 7px 0 0;
  color: #637181;
}

.saas-search {
  width: 320px;
  height: 42px;
  border: 1px solid #d2dce4;
  border-radius: 6px;
  background: #fff;
  padding: 0 13px;
}

.saas-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.saas-kpi,
.saas-card-panel {
  background: #fff;
  border: 1px solid #dce4ea;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(21, 42, 62, .06);
}

.saas-kpi {
  padding: 18px;
}

.saas-kpi strong {
  display: block;
  font-size: 36px;
  line-height: 1;
}

.saas-kpi span {
  display: block;
  margin-top: 8px;
  color: #637181;
  font-size: 13px;
  font-weight: 700;
}

.saas-grid-main {
  display: grid;
  grid-template-columns: 1.45fr .8fr;
  gap: 18px;
}

.saas-card-panel h2 {
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid #e3e9ee;
  font-size: 18px;
}

.saas-table {
  width: 100%;
  border-collapse: collapse;
}

.saas-table th,
.saas-table td {
  padding: 14px 20px;
  border-bottom: 1px solid #edf1f4;
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}

.saas-table th {
  color: #697789;
  font-size: 12px;
  text-transform: uppercase;
}

.saas-table th:first-child,
.saas-table td:first-child {
  width: 78px;
  white-space: nowrap;
}

.saas-alerts {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.saas-alert {
  padding: 14px;
  border: 1px solid #e2e8ed;
  border-radius: 7px;
  background: #fbfcfd;
}

.saas-alert b {
  display: block;
  margin-bottom: 4px;
}

.saas-alert span {
  color: #657384;
  font-size: 13px;
}

/* Rugged Field-Ready Hybrid */
.rugged-page {
  background: #e7dec9;
  color: #222426;
  font-family: "Segoe UI", Arial, sans-serif;
}

.rugged-shell {
  min-height: 100vh;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(31, 63, 70, .08) 1px, transparent 1px) 0 0 / 24px 24px,
    #eee7d7;
}

.rugged-frame {
  min-height: calc(100vh - 44px);
  border: 3px solid #26383b;
  background: #fbfaf6;
  box-shadow: 12px 12px 0 #d7c7a5;
}

.rugged-top {
  min-height: 82px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  background: #1f3f46;
  color: #fff;
}

.rugged-brand {
  font-family: "Bahnschrift", "Arial Narrow", Arial, sans-serif;
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
}

.rugged-top nav {
  display: flex;
  gap: 8px;
}

.rugged-top nav a {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .28);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.rugged-top nav a.active {
  background: #f2c15f;
  color: #1f3f46;
}

.rugged-main {
  padding: 24px;
}

.rugged-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 2px solid #26383b;
}

.rugged-title h1 {
  font-family: "Bahnschrift", "Arial Narrow", Arial, sans-serif;
  font-size: 42px;
  text-transform: uppercase;
}

.rugged-title p {
  max-width: 440px;
  margin: 0;
  color: #4d5354;
  line-height: 1.4;
}

.rugged-work {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  margin-top: 20px;
}

.rugged-board,
.rugged-side,
.rugged-card {
  background: #fffdf8;
  border: 2px solid #26383b;
  box-shadow: 7px 7px 0 #d7c7a5;
}

.rugged-board h2,
.rugged-side h2 {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 2px solid #26383b;
  font-family: "Bahnschrift", "Arial Narrow", Arial, sans-serif;
  font-size: 21px;
  text-transform: uppercase;
}

.rugged-list {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.rugged-card {
  display: grid;
  grid-template-columns: 80px 1fr 130px;
  gap: 14px;
  align-items: center;
  padding: 15px;
  box-shadow: none;
}

.rugged-card .unit {
  font-family: "Bahnschrift", "Arial Narrow", Arial, sans-serif;
  color: #1f3f46;
  font-size: 25px;
  font-weight: 900;
}

.rugged-card p {
  margin: 3px 0 0;
  color: #59605f;
  font-size: 13px;
}

.rugged-stamp {
  width: fit-content;
  margin: 18px;
  padding: 12px 16px;
  border: 3px solid #be4635;
  color: #be4635;
  font-family: "Bahnschrift", "Arial Narrow", Arial, sans-serif;
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  transform: rotate(-3deg);
}

.rugged-note {
  margin: 0 18px 18px;
  color: #4d5354;
  line-height: 1.45;
}

/* Oracle Redwood-inspired enterprise layout */
.redwood-page {
  background: #efecea;
  color: #2f2a26;
  font-family: "Oracle Sans", "Segoe UI", Arial, sans-serif;
}

.redwood-shell {
  min-height: 100vh;
  max-width: 1240px;
  margin: 0 auto;
  background: #f8f6f4;
  border-left: 1px solid #ddd7d1;
  border-right: 1px solid #ddd7d1;
}

.redwood-appbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: #24211f;
  color: #f8f4ef;
}

.redwood-appbar b {
  font-size: 15px;
}

.redwood-appbar b span {
  color: #fff;
  letter-spacing: .03em;
}

.redwood-appbar b::after {
  content: "";
}

.redwood-appbar b {
  color: #d8493a;
}

.redwood-app-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.redwood-app-actions span {
  color: #ded8d2;
  font-size: 12px;
 }

.redwood-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #c74634;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}

.redwood-main {
  min-height: calc(100vh - 58px);
}

.redwood-hero {
  padding: 20px 24px 0;
  background: #f4f0ed;
  border-bottom: 1px solid #e5dfda;
}

.redwood-date {
  margin: 0 0 5px;
  color: #6c655f;
  font-size: 13px;
}

.redwood-hero h1 {
  margin: 0;
  color: #312d2a;
  font-size: 24px;
  font-weight: 650;
}

.redwood-subhead {
  margin: 3px 0 18px;
  color: #6c655f;
  font-size: 14px;
}

.redwood-tabs {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  border-bottom: 1px solid #e6ded8;
}

.redwood-tabs a {
  padding: 0 1px 11px;
  color: #6c655f;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

.redwood-tabs a.active {
  color: #312d2a;
  border-bottom-color: #c74634;
}

.redwood-action-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 16px 0 20px;
}

.redwood-action-cards article {
  min-height: 128px;
  padding: 16px;
  background: #fff;
  border: 1px solid #ded8d2;
  border-radius: 7px;
}

.redwood-action-cards span {
  display: block;
  margin-bottom: 8px;
  color: #6c655f;
  font-size: 13px;
}

.redwood-action-cards strong {
  display: block;
  color: #312d2a;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}

.redwood-action-cards small {
  color: #6c655f;
  font-size: 15px;
}

.redwood-action-cards p {
  margin: 8px 0 7px;
  color: #312d2a;
  font-size: 13px;
}

.redwood-action-cards a {
  color: #c74634;
  font-size: 13px;
  font-weight: 700;
}

.redwood-content {
  padding: 24px;
}

.redwood-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
}

.redwood-title h1 {
  font-size: 34px;
  font-weight: 650;
}

.redwood-title p {
  margin: 7px 0 0;
  color: #665f58;
}

.redwood-button {
  height: 40px;
  padding: 0 14px;
  border: 1px solid #b8aea5;
  border-radius: 4px;
  background: #fff;
  color: #312d2a;
  font-weight: 700;
}

.redwood-button.primary {
  background: #312d2a;
  color: #fff;
}

.redwood-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.redwood-tile,
.redwood-panel {
  background: #fff;
  border: 1px solid #ded8d2;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(49, 45, 42, .05);
}

.redwood-tile {
  padding: 18px;
}

.redwood-tile span {
  display: block;
  color: #665f58;
  font-size: 13px;
}

.redwood-tile strong {
  display: block;
  margin-top: 8px;
  font-size: 32px;
  font-weight: 650;
}

.redwood-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
}

.redwood-panel h2 {
  margin: 0;
  padding: 17px 20px;
  border-bottom: 1px solid #e8e2dd;
  font-size: 18px;
  font-weight: 650;
}

.redwood-list {
  padding: 10px 0;
}

.redwood-row {
  display: grid;
  grid-template-columns: 90px 1fr 150px 120px;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid #f0ece8;
  font-size: 14px;
}

.redwood-row b {
  font-weight: 650;
}

.redwood-row span {
  color: #665f58;
}

.redwood-activity {
  padding: 18px 20px;
  display: grid;
  gap: 14px;
}

.redwood-activity div {
  padding-bottom: 14px;
  border-bottom: 1px solid #eee8e3;
}

.redwood-activity b {
  display: block;
  margin-bottom: 4px;
  font-weight: 650;
}

.redwood-activity span {
  color: #665f58;
  font-size: 13px;
}

/* Oracle Redwood analytics layout */
.rw-analytics-page {
  min-height: 100vh;
  padding-bottom: 54px;
  background:
    linear-gradient(120deg, rgba(114, 183, 173, .22), transparent 18%),
    linear-gradient(160deg, transparent 0 74%, rgba(226, 169, 59, .18) 74% 78%, transparent 78%),
    #f6f4f1;
  color: #292521;
  font-family: "Oracle Sans", "Segoe UI", Arial, sans-serif;
}

.rwa-topbar {
  height: 52px;
  display: grid;
  grid-template-columns: 210px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background: #ffffff;
  border-bottom: 1px solid #ddd8d2;
}

.rwa-product {
  font-size: 13px;
  font-weight: 800;
}

.rwa-product span {
  color: #c74634;
}

.rwa-top-tabs {
  display: flex;
  gap: 12px;
  height: 100%;
  align-items: center;
}

.rwa-top-tabs a {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #5f5851;
  border-bottom: 3px solid transparent;
  font-size: 13px;
  font-weight: 700;
}

.rwa-top-tabs a.active {
  color: #292521;
  border-bottom-color: #c74634;
}

.rwa-icons {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #706963;
  font-size: 12px;
}

.rwa-icons b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #c74634;
  color: #fff;
  font-size: 12px;
}

.rwa-shell {
  padding: 18px 28px 28px;
}

.rwa-filterbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.rwa-filterbar select,
.rwa-filterbar button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cfc8c0;
  border-radius: 3px;
  background: #fff;
  color: #292521;
  font-size: 12px;
  font-weight: 700;
}

.rwa-filter-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.rwa-filterbar button.active {
  background: #f2efea;
  border-color: #8e877f;
}

.rwa-filterbar button.dark {
  background: #2f2925;
  color: #fff;
}

.rwa-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
}

.rwa-main-panel,
.rwa-side-panel {
  min-width: 0;
}

.rwa-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 220px;
  gap: 22px;
  align-items: start;
  margin-bottom: 24px;
}

.rwa-intro h1 {
  margin: 18px 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 400;
  letter-spacing: 0;
}

.rwa-intro p {
  max-width: 620px;
  margin: 0;
  color: #4e4944;
  font-size: 15px;
  line-height: 1.45;
}

.rwa-alert-card {
  min-height: 132px;
  padding: 18px;
  border-radius: 4px;
  box-shadow: 0 10px 16px rgba(41, 37, 33, .12);
}

.rwa-alert-card.dark {
  background: #342e2a;
  color: #fff;
}

.rwa-alert-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.rwa-alert-card span {
  display: block;
  margin-top: 8px;
  color: #f0ece8;
  font-size: 13px;
  font-weight: 700;
}

.rwa-alert-card p {
  margin-top: 6px;
  color: #d8d0c9;
  font-size: 12px;
}

.rwa-legend {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  color: #5f5851;
  font-size: 12px;
}

.rwa-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: -1px;
}

.rwa-legend .cash { background: #292521; }
.rwa-legend .inflow { background: #73b7ad; }
.rwa-legend .outflow { background: #c87507; }
.rwa-legend .line {
  width: 18px;
  height: 2px;
  border-radius: 0;
  background: #6b625b;
  vertical-align: 3px;
}

.rwa-chart {
  position: relative;
  height: 350px;
  margin-bottom: 22px;
  background:
    repeating-linear-gradient(0deg, transparent 0 46px, #e2ded8 47px),
    #fff;
  border: 1px solid #e2ded8;
  border-radius: 2px;
  overflow: hidden;
}

.rwa-axis.zero {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #ddd8d2;
}

.rwa-threshold {
  position: absolute;
  left: 0;
  right: 0;
  top: 58%;
  border-top: 2px dotted #9c958f;
}

.rwa-bars {
  position: absolute;
  inset: 20px 24px 30px;
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 10px;
  align-items: stretch;
}

.rwa-bars div {
  position: relative;
}

.rwa-bars b,
.rwa-bars em {
  position: absolute;
  left: 12%;
  width: 76%;
  display: block;
  opacity: .95;
}

.rwa-bars b {
  bottom: 50%;
  background: #73b7ad;
}

.rwa-bars em {
  top: 50%;
  background: #c87507;
}

.rwa-bars span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  color: #8b837c;
  font-size: 10px;
  text-align: center;
}

.rwa-line {
  position: absolute;
  inset: 20px 24px 30px;
  pointer-events: none;
}

.rwa-line i {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5f5851;
  box-shadow: 0 0 0 2px #fff;
}

.rwa-table-panel {
  background: #fff;
  border: 1px solid #e2ded8;
}

.rwa-table-panel h2,
.rwa-insight h2 {
  margin: 0;
  padding: 16px 18px;
  font-size: 17px;
  font-weight: 650;
}

.rwa-mini-table {
  display: grid;
}

.rwa-mini-table > div {
  display: grid;
  grid-template-columns: 150px 1fr 120px 220px;
  gap: 14px;
  padding: 13px 18px;
  border-top: 1px solid #eee9e4;
  font-size: 13px;
}

.rwa-mini-table .head {
  color: #746d66;
  background: #faf8f5;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.rwa-side-panel {
  display: grid;
  gap: 20px;
  padding: 20px;
  background: #dbeceb;
}

.rwa-insight {
  background: #fff;
  border: 1px solid #e2ded8;
}

.rwa-insight strong,
.rwa-insight p,
.rwa-insight a {
  display: block;
  margin: 0 18px 10px;
  font-size: 13px;
  line-height: 1.45;
}

.rwa-insight p {
  color: #5f5851;
}

.rwa-insight a {
  color: #c74634;
  font-weight: 800;
}

.rwa-bubbles {
  position: relative;
  height: 145px;
  margin: 12px 18px;
  background:
    linear-gradient(0deg, transparent 23%, #e8e4df 24%, transparent 25%),
    linear-gradient(90deg, transparent 19%, #f0ece8 20%, transparent 21%),
    #fbfaf8;
}

.rwa-bubbles i {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: #73b7ad;
  opacity: .85;
}

.rwa-bubbles i.dark {
  background: #342e2a;
}

.rwa-map {
  position: relative;
  height: 145px;
  margin: 0 18px 18px;
  background: #faf8f5;
  overflow: hidden;
}

.rwa-map span {
  position: absolute;
  display: block;
  aspect-ratio: 1.7;
  border-radius: 45% 55% 42% 58%;
  background: #e6a63b;
  opacity: .85;
}

.rwa-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  background: #2f302f;
  color: #c9c5c0;
  box-shadow: 0 -8px 20px rgba(41, 37, 33, .18);
}

.rwa-bottom-nav a {
  font-size: 12px;
  font-weight: 800;
}

.rwa-bottom-nav a.active {
  color: #fff;
}

/* Workflow-first alternatives */
.table-page {
  background: #dfe5ea;
  color: #18212b;
  font-family: "Segoe UI", Arial, sans-serif;
}

.table-top,
.master-top,
.inbox-top,
.swim-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
}

.table-top {
  background: #26313d;
  color: #fff;
}

.table-top div,
.master-top,
.inbox-top,
.swim-top {
  display: flex;
  align-items: center;
  gap: 26px;
}

.table-top nav,
.master-top nav,
.inbox-top nav,
.logbook-top nav,
.swim-top nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.table-top a,
.master-top a,
.inbox-top a,
.logbook-top a,
.swim-top a {
  font-size: 13px;
  font-weight: 800;
}

.table-top a.active {
  color: #f1c24a;
}

.table-top button,
.master-detail-head button,
.inbox-task button {
  border: 0;
  background: #b23b2d;
  color: #fff;
  padding: 10px 13px;
  font-weight: 800;
}

.table-main {
  padding: 24px;
}

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

.table-toolbar h1,
.master-list h1,
.inbox-title h1,
.logbook-top h1,
.swim-title h1 {
  margin: 0;
  font-size: 34px;
}

.table-toolbar p,
.inbox-title p,
.logbook-top p,
.swim-title p {
  margin: 6px 0 0;
  color: #5c6873;
}

.table-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-filters span {
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #c9d2da;
  font-size: 12px;
  font-weight: 800;
}

.command-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #c9d2da;
  box-shadow: 0 12px 28px rgba(24, 33, 43, .08);
}

.command-table th,
.command-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e3e8ed;
  text-align: left;
  font-size: 14px;
}

.command-table th {
  position: sticky;
  top: 0;
  background: #f5f7f9;
  color: #53606b;
  font-size: 11px;
  text-transform: uppercase;
}

.command-table tr.warn td {
  background: #fff9ec;
}

.command-table tr.stop td {
  background: #fff2ef;
}

.master-page {
  background: #dce7e7;
  color: #17343d;
}

.master-top {
  background: #143c4a;
  color: #fff;
}

.master-top a.active {
  color: #9fd0c5;
}

.master-shell {
  min-height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: 340px 1fr;
}

.master-list {
  padding: 22px;
  background: #f1f4f2;
  border-right: 1px solid #c6d4d3;
}

.master-list input {
  width: 100%;
  height: 40px;
  margin: 16px 0;
  border: 1px solid #b8c8c7;
  padding: 0 12px;
}

.master-item {
  padding: 14px;
  border-bottom: 1px solid #cdd8d7;
}

.master-item.active {
  background: #143c4a;
  color: #fff;
}

.master-item b,
.master-item span {
  display: block;
}

.master-item span {
  margin-top: 4px;
  font-size: 13px;
  opacity: .78;
}

.master-detail {
  padding: 26px;
}

.master-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 2px solid #143c4a;
}

.master-detail-head p,
.master-detail-head h2 {
  margin: 0 0 7px;
}

.master-detail-head h2 {
  font-size: 38px;
}

.master-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 20px 0;
}

.master-columns section,
.master-history {
  background: #fff;
  border: 1px solid #c6d4d3;
  padding: 20px;
}

.master-columns dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
}

.master-columns dt {
  color: #627476;
}

.master-history p {
  padding: 10px 0;
  border-bottom: 1px solid #d9e2e2;
}

.inbox-page {
  background: #f7f3ec;
  color: #2f2a26;
}

.inbox-top {
  background: #fff;
  border-bottom: 1px solid #ded8d2;
}

.inbox-top a.active {
  color: #c74634;
}

.inbox-shell {
  padding: 26px;
}

.inbox-title {
  margin-bottom: 18px;
}

.inbox-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}

.inbox-buckets {
  display: grid;
  align-content: start;
  gap: 8px;
}

.inbox-buckets a {
  display: flex;
  justify-content: space-between;
  padding: 14px;
  background: #fff;
  border: 1px solid #ded8d2;
}

.inbox-buckets a.active {
  border-left: 5px solid #c74634;
}

.inbox-feed {
  display: grid;
  gap: 12px;
}

.inbox-task {
  padding: 18px;
  background: #fff;
  border: 1px solid #ded8d2;
  border-left: 5px solid #2f7560;
}

.inbox-task.priority {
  border-left-color: #c74634;
}

.inbox-task span {
  color: #766d66;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.inbox-task h2 {
  margin: 7px 0;
  font-size: 22px;
}

.inbox-task p {
  color: #625a54;
}

.logbook-page {
  background: #d8c6a1;
  color: #24352f;
  font-family: Georgia, "Times New Roman", serif;
}

.logbook-book {
  max-width: 1220px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 30px;
  background: #f9f4e8;
  box-shadow: 0 20px 50px rgba(36, 53, 47, .18);
}

.logbook-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 3px double #24352f;
}

.logbook-top a.active {
  color: #a65b2a;
}

.logbook-grid {
  display: grid;
  grid-template-columns: 260px 1fr 260px;
  gap: 28px;
  margin-top: 26px;
}

.logbook-summary,
.logbook-docs {
  border-top: 2px solid #24352f;
  padding-top: 14px;
}

.logbook-summary dl {
  display: grid;
  gap: 8px;
}

.logbook-summary dt {
  color: #6f6759;
  font-size: 13px;
}

.logbook-summary dd {
  margin: 0 0 9px;
  font-weight: 700;
}

.logbook-timeline {
  border-left: 3px solid #24352f;
  padding-left: 24px;
}

.logbook-timeline article {
  position: relative;
  padding: 0 0 24px;
}

.logbook-timeline article::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 4px;
  width: 13px;
  height: 13px;
  background: #a65b2a;
  border: 3px solid #f9f4e8;
}

.logbook-timeline time {
  color: #6f6759;
  font-size: 13px;
}

.logbook-timeline h3 {
  margin: 4px 0;
  font-size: 23px;
}

.logbook-docs p {
  padding: 10px;
  border: 1px solid #cdbb94;
  background: rgba(255, 255, 255, .35);
}

.logbook-docs .missing {
  color: #b23b2d;
  border-color: #b23b2d;
}

.swim-page {
  background: #111827;
  color: #f7fafc;
}

.swim-top {
  background: #0b111b;
  border-bottom: 1px solid #2d3748;
}

.swim-top a.active {
  color: #f4c542;
}

.swim-main {
  padding: 24px;
}

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

.swim-title p {
  color: #aeb8c5;
}

.swim-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(190px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.swim-lane {
  min-height: 520px;
  padding: 14px;
  background: #1a2433;
  border: 1px solid #334155;
}

.swim-lane h2 {
  margin: 0 0 14px;
  font-size: 15px;
  text-transform: uppercase;
}

.swim-lane p {
  padding: 13px;
  margin: 0 0 10px;
  background: #e9eef2;
  color: #111827;
  border-left: 5px solid #64748b;
  font-size: 13px;
}

.swim-lane.due p,
.swim-lane.escalated p {
  border-left-color: #d94b3d;
}

.swim-lane.done p {
  border-left-color: #2f8f68;
}

@media (max-width: 1050px) {
  .industrial-stats,
  .saas-kpis,
  .redwood-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .industrial-workspace,
  .saas-grid-main,
  .rugged-work,
  .redwood-grid,
  .rwa-grid,
  .rwa-intro,
  .master-columns,
  .logbook-grid {
    grid-template-columns: 1fr;
  }

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

  .saas-sidebar {
    display: none;
  }
}

@media (max-width: 720px) {
  .industrial-shell,
  .redwood-shell {
    grid-template-columns: 1fr;
  }

  .industrial-rail,
  .redwood-rail {
    display: none;
  }

  .industrial-top,
  .saas-topline,
  .rugged-title,
  .redwood-title {
    align-items: start;
    flex-direction: column;
  }

  .industrial-stats,
  .saas-kpis,
  .redwood-summary {
    grid-template-columns: 1fr;
  }

  .industrial-row,
  .rugged-card,
  .redwood-row {
    grid-template-columns: 1fr;
  }

  .master-shell,
  .inbox-layout,
  .rwa-mini-table > div {
    grid-template-columns: 1fr;
  }

  .rwa-topbar,
  .rwa-filterbar {
    align-items: start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .rwa-filter-actions {
    margin-left: 0;
  }
}
