:host {
  display: block;
  min-height: 100vh;
}

.workspace-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(177, 132, 54, 0.14), transparent 24%),
    radial-gradient(circle at 80% 0%, rgba(19, 71, 112, 0.14), transparent 22%),
    linear-gradient(180deg, #f5f1e8 0%, #eee7db 42%, #f7f4ee 100%);
}

.workspace-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url('../assets/cashline-logo.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(46vw, 560px);
  opacity: 0.045;
  filter: saturate(0.85);
}

.workspace-shell.login-mode,
.workspace-shell:not(.login-mode) {
  max-width: 1720px;
  margin: 0 auto;
}

.workspace-shell.rtl {
  direction: rtl;
}

.workspace-shell.rtl .utility-bar {
  text-align: right;
}

.workspace-shell.rtl .utility-bar__actions {
  justify-content: flex-start;
}

.workspace-shell.rtl .breadcrumbs {
  justify-content: flex-end;
}

.workspace-shell.rtl .breadcrumbs__separator {
  transform: scaleX(-1);
}

.workspace-shell.rtl .utility-bar__context,
.workspace-shell.rtl .content-hero__main,
.workspace-shell.rtl .content-hero__aside {
  text-align: right;
}

.workspace-shell.rtl .notification-drawer__head,
.workspace-shell.rtl .notification-item__top {
  flex-direction: row-reverse;
}

.workspace-shell.rtl .notification-item {
  text-align: right;
}

.login-mode-shell,
.content-area {
  display: grid;
  gap: 18px;
}

.application-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.utility-bar,
.side-menu,
.content-frame,
.hero-panel,
.content-hero {
  border: 1px solid var(--card-frame);
  border-radius: var(--radius-2xl);
  background: var(--paper-strong);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}

.utility-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 243, 235, 0.94)),
    linear-gradient(135deg, rgba(16, 59, 93, 0.04), rgba(187, 135, 47, 0.04));
}

.utility-bar__brand,
.utility-bar__context,
.utility-bar__actions,
.utility-bar__copy,
.side-menu__brand,
.side-menu__brand-copy,
.content-hero__main,
.content-hero__aside,
.login-hero {
  display: grid;
  gap: 12px;
}

.utility-bar__brand {
  grid-auto-flow: column;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

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

.utility-bar__context {
  gap: 6px;
  min-width: 0;
}

.utility-bar__copy strong {
  font-size: 0.96rem;
  line-height: 1.4;
}

.notification-pill,
.notification-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(25, 35, 58, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.notification-pill:hover,
.notification-refresh:hover {
  transform: translateY(-1px);
  border-color: rgba(25, 35, 58, 0.18);
  box-shadow: 0 10px 20px rgba(20, 30, 48, 0.06);
}

.notification-pill.active {
  background: rgba(14, 59, 94, 0.92);
  border-color: rgba(14, 59, 94, 0.92);
  color: #fff;
}

.notification-pill__icon {
  font-size: 0.8rem;
}

.notification-pill__count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(183, 130, 54, 0.16);
  color: var(--brand-primary-700);
  font-size: 0.74rem;
  font-weight: 800;
}

.notification-pill.active .notification-pill__count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.login-hero {
  grid-template-columns: minmax(0, 1fr);
}

.hero-panel,
.content-hero {
  display: grid;
  gap: 18px;
  padding: 26px 28px;
}

.hero-panel {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 241, 232, 0.94)),
    linear-gradient(180deg, rgba(195, 145, 63, 0.08), rgba(14, 59, 94, 0.04));
}

.hero-panel__copy,
.hero-panel__metrics {
  display: grid;
  gap: 14px;
}

.hero-panel__copy h1,
.content-hero h1,
.side-menu__brand h2 {
  margin: 0;
  font-size: clamp(1.9rem, 2.4vw, 2.8rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.content-hero h1 {
  font-size: clamp(1.68rem, 2.05vw, 2.42rem);
}

.hero-panel__copy p,
.content-hero p,
.side-menu__copy,
.side-menu__link span,
.side-menu__helper,
.side-menu__session span,
.breadcrumbs,
.breadcrumbs a {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-panel__metrics {
  grid-template-columns: 1fr;
}

.hero-metric,
.snapshot-card,
.hero-callout {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--card-frame);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.hero-metric strong,
.snapshot-card strong,
.hero-callout strong {
  font-size: 1.08rem;
  line-height: 1.35;
}

.hero-callout:hover,
.hero-metric:hover {
  transform: translateY(-1px);
  border-color: var(--card-frame-strong);
  box-shadow: 0 10px 22px rgba(20, 30, 48, 0.06);
  background: rgba(255, 255, 255, 0.92);
}

.side-menu {
  display: grid;
  gap: 18px;
  padding: 24px;
  position: sticky;
  top: 24px;
  background:
    linear-gradient(180deg, rgba(253, 252, 249, 0.98), rgba(246, 241, 232, 0.95)),
    linear-gradient(180deg, rgba(19, 71, 112, 0.04), transparent 24%);
}

.side-menu__brand {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.side-menu__governance {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 12%, var(--line));
  background: linear-gradient(180deg, rgba(248, 243, 235, 0.92), rgba(255, 255, 255, 0.84));
}

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

.side-menu__section {
  display: grid;
  gap: 10px;
}

.side-menu__nav {
  display: grid;
  gap: 8px;
}

.side-menu__link {
  display: grid;
  gap: 6px;
  padding: 14px 16px 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(25, 35, 58, 0.08);
  background: rgba(255, 255, 255, 0.76);
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.side-menu__link strong {
  font-size: 0.98rem;
  line-height: 1.4;
}

.side-menu__link:hover,
.side-menu__link.active {
  transform: translateY(-1px);
  border-color: rgba(25, 35, 58, 0.18);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(20, 30, 48, 0.08);
}

.side-menu__link--feature {
  background: rgba(247, 243, 235, 0.92);
}

.side-menu__section--features {
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.side-menu__session {
  display: grid;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.content-area {
  min-width: 0;
  align-content: start;
}

.notification-drawer {
  display: grid;
  gap: 14px;
  padding: 20px 22px;
  border: 1px solid var(--card-frame);
  border-radius: var(--radius-2xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 242, 234, 0.95));
  box-shadow: var(--shadow-lg);
}

.notification-drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.notification-drawer__head strong {
  display: block;
  font-size: 1.04rem;
  line-height: 1.4;
}

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

.notification-item {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  text-align: left;
  border-radius: var(--radius-xl);
  border: 1px solid var(--card-frame);
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.notification-item:hover {
  transform: translateY(-1px);
  border-color: var(--card-frame-strong);
  box-shadow: 0 12px 24px rgba(20, 30, 48, 0.06);
}

.notification-item[data-status='action'] {
  border-color: rgba(183, 130, 54, 0.26);
}

.notification-item[data-status='attention'] {
  border-color: rgba(145, 66, 66, 0.22);
}

.notification-item[data-status='success'] {
  border-color: rgba(53, 120, 88, 0.2);
}

.notification-item__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.notification-item__source,
.notification-item__badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
}

.notification-item__source {
  background: rgba(14, 59, 94, 0.08);
  color: var(--brand-secondary-700);
}

.notification-item__badge {
  background: rgba(183, 130, 54, 0.12);
  color: var(--brand-primary-700);
}

.notification-item strong,
.notification-item p,
.notification-drawer__state {
  margin: 0;
}

.notification-item p,
.notification-drawer__state {
  color: var(--muted);
  line-height: 1.6;
}

.notification-drawer__state {
  padding: 14px 16px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--card-frame);
  background: rgba(255, 255, 255, 0.8);
}

.notification-drawer__state--error {
  border-color: rgba(145, 66, 66, 0.18);
  color: #8a3e3e;
}

.content-hero {
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.72fr);
  align-items: start;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 246, 239, 0.94)),
    linear-gradient(135deg, rgba(16, 59, 93, 0.06), rgba(187, 135, 47, 0.04));
}

.content-hero__main {
  gap: 10px;
}

.content-hero__aside {
  align-content: start;
  gap: 10px;
}

.content-hero__signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-signal {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--card-frame);
  background: color-mix(in srgb, var(--brand-primary) 12%, rgba(255, 255, 255, 0.86));
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.content-frame {
  padding: 24px;
  min-width: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 249, 244, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    var(--shadow-lg);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.88rem;
  line-height: 1.45;
  min-width: 0;
}

.breadcrumbs a {
  color: var(--brand-secondary);
  text-decoration: none;
  font-weight: 700;
  transition: color 180ms ease;
}

.breadcrumbs a:hover {
  color: color-mix(in srgb, var(--brand-secondary) 82%, black 10%);
}

.breadcrumbs span.current {
  color: var(--ink);
  font-weight: 800;
}

.breadcrumbs__separator {
  color: var(--muted-soft);
  font-size: 0.78rem;
}

.topbar__status {
  border-color: rgba(25, 35, 58, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.cashline-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

.cashline-logo--compact {
  width: 172px;
  min-width: 172px;
}

.nav-btn {
  position: relative;
  overflow: hidden;
}

.nav-btn::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: transparent;
}

.nav-btn.active::after {
  background: linear-gradient(180deg, var(--brand-secondary), var(--brand-primary));
}

.eyebrow,
.meta-label {
  display: block;
  margin: 0;
  color: var(--muted-soft);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
}

.language-pill,
.signout-pill,
.pill {
  padding: 10px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.84rem;
  min-height: 36px;
}

.language-pill {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.language-pill.active {
  background: var(--brand-ink);
  color: #fff;
  border-color: var(--brand-ink);
}

.signout-pill {
  border: 1px solid rgba(156, 65, 65, 0.18);
  background: rgba(156, 65, 65, 0.08);
  color: #842f2f;
  font-weight: 700;
  cursor: pointer;
}

.pill {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

@media (max-width: 1240px) {
  .application-shell {
    grid-template-columns: 1fr;
  }

  .side-menu {
    position: static;
  }
}

@media (max-width: 980px) {
  .utility-bar,
  .hero-panel,
  .content-hero {
    grid-template-columns: 1fr;
  }

  .utility-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .utility-bar__context,
  .utility-bar__actions {
    justify-content: flex-start;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .workspace-shell {
    padding: 14px;
  }

  .side-menu,
  .content-frame,
  .hero-panel,
  .content-hero,
  .utility-bar {
    padding: 18px;
  }

  .content-hero__signals {
    gap: 6px;
  }

  .side-menu__snapshot {
    grid-template-columns: 1fr;
  }

  .cashline-logo--compact {
    width: 146px;
    min-width: 146px;
  }
}
