:root {
  --font-title: "Manrope", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --bg-page: #eef3f8;
  --bg-card: #ffffff;
  --bg-card-soft: #f7fafc;
  --bg-sidebar: #0f172a;
  --bg-sidebar-2: #131f35;
  --text-strong: #0f172a;
  --text-muted: #667085;
  --line-soft: #d6dfeb;
  --brand: #0b7285;
  --brand-strong: #075985;
  --accent-green: #2f9e44;
  --sidebar-width-expanded: 284px;
  --sidebar-width-collapsed: 92px;
  --danger: #dc3545;
  --shadow-soft: 0 14px 36px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 18px 60px rgba(15, 23, 42, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-strong);
  background:
    radial-gradient(1000px 360px at 8% -12%, rgba(11, 114, 133, 0.2), transparent 70%),
    radial-gradient(840px 300px at 96% -8%, rgba(47, 158, 68, 0.15), transparent 68%),
    var(--bg-page);
}

[data-valmsg-summary="true"].validation-summary-valid {
  display: none;
}

[data-valmsg-summary="true"].validation-summary-errors ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-title);
  letter-spacing: -0.012em;
}

.app-shell {
  height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
}

.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width-expanded) 1fr;
  height: 100vh;
  min-height: 0;
  transition: grid-template-columns 200ms ease;
}

.app-layout.sidebar-collapsed {
  grid-template-columns: var(--sidebar-width-collapsed) 1fr;
}

.app-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 0.9rem 1rem;
  background: linear-gradient(180deg, var(--bg-sidebar), var(--bg-sidebar-2));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-strong);
  z-index: 30;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.42) transparent;
  transition: padding 200ms ease;
}

.app-sidebar::-webkit-scrollbar {
  width: 9px;
}

.app-sidebar::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}

.app-sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
  background-color: rgba(148, 163, 184, 0.32);
}

.app-sidebar:hover::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.5);
}

.app-sidebar::-webkit-scrollbar-thumb:active {
  background-color: rgba(148, 163, 184, 0.66);
}

.brand-area {
  padding: 0.3rem 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
}

.brand-logo img {
  width: 206px;
  max-width: 100%;
  height: auto;
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  padding-bottom: 0.75rem;
}

.nav-section-label {
  display: block;
  padding: 0.5rem 0.88rem 0.25rem;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.nav-subsection-label {
  display: block;
  padding: 0.35rem 0.88rem 0.2rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.nav-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.nav-group.open {
  border-color: rgba(185, 230, 246, 0.46);
  background: rgba(255, 255, 255, 0.06);
}

.nav-group.open > .nav-group-toggle {
  border-bottom: 1px solid rgba(185, 230, 246, 0.24);
}

.nav-group.is-current {
  border-color: rgba(139, 222, 248, 0.62);
  background: rgba(11, 114, 133, 0.14);
}

.nav-group-toggle {
  width: 100%;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  padding: 0.58rem 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  font-weight: 700;
  transition: background-color 150ms ease, color 150ms ease;
}

.nav-group-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-group.is-current > .nav-group-toggle {
  color: #ffffff;
  background: linear-gradient(140deg, rgba(11, 114, 133, 0.6), rgba(47, 158, 68, 0.5));
}

.nav-group.is-current > .nav-group-toggle:hover {
  background: linear-gradient(140deg, rgba(11, 114, 133, 0.72), rgba(47, 158, 68, 0.62));
}

.nav-group.is-current.open > .nav-group-toggle {
  border-bottom-color: rgba(204, 237, 248, 0.42);
}

.nav-group-toggle:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 2px rgba(185, 230, 246, 0.68);
}

.nav-group-text {
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
}

.nav-group-text i {
  font-size: 0.92rem;
}

.nav-group-chevron {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.68);
  transition: transform 180ms ease;
}

.nav-group.open .nav-group-chevron {
  transform: rotate(180deg);
}

.nav-group-items {
  display: grid;
  gap: 0.2rem;
  padding: 0 0.32rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 220ms ease, opacity 170ms ease, padding 170ms ease;
}

.nav-group.open .nav-group-items {
  max-height: 680px;
  opacity: 1;
  padding: 0.32rem 0.32rem 0.4rem;
}

.nav-group .app-nav-link {
  display: flex;
  width: 100%;
  padding: 0.62rem 0.68rem;
  font-size: 0.88rem;
  border-radius: 10px;
}

.app-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.74rem 0.88rem;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background-color 180ms ease, transform 180ms ease, color 180ms ease;
}

.app-nav-link i {
  font-size: 1rem;
}

.app-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.app-nav-link.active {
  color: #fff;
  background: linear-gradient(140deg, rgba(11, 114, 133, 0.75), rgba(47, 158, 68, 0.65));
}

.sidebar-footer {
  padding: 0.7rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.34rem 0.72rem;
}

.chip-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2);
}

@media (min-width: 1200px) {
  .app-layout.sidebar-collapsed .brand-area {
    display: flex;
    justify-content: center;
    padding: 0.45rem 0.28rem 0.65rem;
  }

  .app-layout.sidebar-collapsed .brand-logo img {
    width: 44px;
  }

  .app-layout.sidebar-collapsed .app-nav {
    gap: 0.34rem;
  }

  .app-layout.sidebar-collapsed .nav-section-label,
  .app-layout.sidebar-collapsed .nav-subsection-label {
    display: none;
  }

  .app-layout.sidebar-collapsed .app-nav-link {
    justify-content: center;
    gap: 0;
    padding: 0.72rem 0.52rem;
  }

  .app-layout.sidebar-collapsed .app-nav-link span {
    display: none;
  }

  .app-layout.sidebar-collapsed .app-nav-link i {
    font-size: 1.08rem;
    margin: 0;
  }

  .app-layout.sidebar-collapsed .app-nav-link:hover {
    transform: none;
  }

  .app-layout.sidebar-collapsed .nav-group {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
  }

  .app-layout.sidebar-collapsed .nav-group.is-current {
    border-color: rgba(153, 228, 250, 0.72);
    background: rgba(11, 114, 133, 0.2);
    box-shadow: inset 0 0 0 1px rgba(185, 230, 246, 0.34);
  }

  .app-layout.sidebar-collapsed .nav-group-toggle {
    justify-content: center;
    gap: 0;
    padding: 0.66rem 0.5rem;
  }

  .app-layout.sidebar-collapsed .nav-group.is-current > .nav-group-toggle {
    background: linear-gradient(140deg, rgba(11, 114, 133, 0.92), rgba(47, 158, 68, 0.82));
    color: #ffffff;
  }

  .app-layout.sidebar-collapsed .nav-group-text {
    gap: 0;
  }

  .app-layout.sidebar-collapsed .nav-group-text span:last-child,
  .app-layout.sidebar-collapsed .nav-group-chevron {
    display: none;
  }

  .app-layout.sidebar-collapsed .nav-group-items {
    max-height: 0 !important;
    opacity: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .app-layout.sidebar-collapsed .app-nav-link.active {
    box-shadow: inset 0 0 0 1px rgba(188, 231, 248, 0.72), 0 0 0 1px rgba(188, 231, 248, 0.2);
  }

  .app-layout.sidebar-collapsed .sidebar-footer {
    display: flex;
    justify-content: center;
    padding: 0.45rem;
  }

  .app-layout.sidebar-collapsed .status-chip {
    padding: 0.42rem;
    border-radius: 10px;
    font-size: 0;
    gap: 0;
  }
}

.app-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.55rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar-search {
  position: relative;
  min-width: 240px;
}

#sidebarCollapseDesktop {
  min-width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.topbar-search i {
  position: absolute;
  top: 50%;
  left: 0.78rem;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.topbar-search input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #d9e4ef;
  background: #f8fbff;
  font-size: 0.9rem;
  padding: 0.54rem 0.86rem 0.54rem 2.2rem;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.topbar-search input:focus {
  outline: 0;
  border-color: rgba(11, 114, 133, 0.55);
  box-shadow: 0 0 0 3px rgba(11, 114, 133, 0.14);
  background: #fff;
}

.topbar-search-results {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  z-index: 45;
  border: 1px solid #d9e4ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
  max-height: min(52vh, 360px);
  overflow-y: auto;
  padding: 0.35rem;
}

.topbar-search-result {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1f2937;
  text-align: left;
  padding: 0.5rem 0.65rem;
  font-size: 0.88rem;
}

.topbar-search-result:hover,
.topbar-search-result.active {
  background: #eef6ff;
  color: #0b7285;
}

.topbar-search-result small {
  color: #6b7280;
  font-size: 0.75rem;
}

.topbar-search-empty {
  color: var(--text-muted);
  font-size: 0.84rem;
  padding: 0.6rem 0.7rem;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.44rem 0.84rem;
  background: #edf5ff;
  border: 1px solid #cfe1ff;
  color: #1d4e89;
  font-weight: 600;
  font-size: 0.82rem;
}

.user-badge-link {
  text-decoration: none;
  transition: all 0.16s ease;
}

.user-badge-link:hover {
  background: #e3f0ff;
  border-color: #b7d0f8;
  color: #123d70;
}

.user-badge-link:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(18, 61, 112, 0.16);
}

.company-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  border-radius: 14px;
  border: 1px solid #d8e6f5;
  background: #f5fbff;
  padding: 0.34rem 0.62rem 0.34rem 0.38rem;
  max-width: 360px;
}

.company-pill-btn {
  border: 1px solid #d8e6f5;
  cursor: pointer;
  text-align: left;
}

.company-pill-btn.dropdown-toggle::after {
  display: none;
}

.company-pill-btn:hover {
  background: #ebf6ff;
  border-color: #bfd6ee;
}

.company-pill-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(11, 114, 133, 0.16);
}

.company-pill-chevron {
  color: #4b6582;
  font-size: 0.7rem;
  margin-left: 0.2rem;
}

.company-pill-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #d7e3f0;
}

.company-pill-fallback {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0b7285;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.86rem;
}

.company-pill-text {
  min-width: 0;
  display: grid;
  line-height: 1.15;
}

.company-pill-text strong {
  font-size: 0.78rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-pill-text small {
  color: #475569;
  font-size: 0.69rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-switch-menu {
  width: min(420px, 92vw);
  border-radius: 14px;
  border: 1px solid #d5e2ee;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.14);
  padding: 0.45rem;
}

.company-switch-title {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
  font-weight: 700;
  padding: 0.2rem 0.45rem 0.4rem;
}

.company-switch-form {
  margin: 0;
}

.company-switch-item {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  border-radius: 10px;
  padding: 0.45rem 0.5rem;
}

.company-switch-item.active,
.company-switch-item:active {
  background: #e7f4ff;
  color: #0f172a;
}

.company-switch-item:disabled {
  opacity: 1;
  cursor: default;
}

.company-switch-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #d6e2ee;
  flex: 0 0 auto;
}

.company-switch-fallback {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0b7285;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.company-switch-text {
  min-width: 0;
  display: grid;
  line-height: 1.15;
}

.company-switch-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-switch-text small {
  color: #64748b;
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-switch-active-label {
  margin-left: auto;
  border-radius: 999px;
  background: #d9f5e3;
  color: #166534;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.42rem;
  flex: 0 0 auto;
}

.app-main {
  padding: 1.65rem;
}

.animate-in {
  animation: fade-in-up 420ms ease;
}

.hero-panel {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: linear-gradient(145deg, #f5fbff, #ffffff);
  box-shadow: var(--shadow-soft);
  padding: 1.4rem 1.45rem;
}

.hero-title {
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.hero-description {
  color: var(--text-muted);
  margin-bottom: 0;
}

.card-soft {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
}

.dashboard-kpi {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  padding: 1rem 1.1rem;
  height: 100%;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.kpi-label {
  color: #46546a;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.kpi-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.44rem;
  border-radius: 999px;
  color: #0f766e;
  background: #e5faf7;
  border: 1px solid #b8f1e8;
}

.kpi-value {
  font-size: 1.46rem;
  font-weight: 800;
  line-height: 1.2;
}

.kpi-foot {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.section-title {
  margin-bottom: 0.95rem;
  font-size: 1.1rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  display: flex;
  align-items: flex-start;
  gap: 0.72rem;
  padding: 0.78rem 0;
  border-bottom: 1px dashed #d7e2f0;
}

.timeline li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.timeline-marker {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  margin-top: 0.34rem;
  background: linear-gradient(130deg, var(--brand), var(--accent-green));
  box-shadow: 0 0 0 5px rgba(11, 114, 133, 0.12);
}

.timeline-body strong {
  display: block;
  font-size: 0.92rem;
}

.timeline-body span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.data-table-wrap {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background: #f4f8fc;
  border-bottom-width: 1px;
  color: #334155;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04rem;
}

.table tbody td {
  border-color: #edf2f8;
}

.table-hover tbody tr:hover {
  background: #f8fbff;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 0.9rem;
}

.stat-pill {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
  padding: 0.68rem 0.8rem;
}

.stat-pill label {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-bottom: 0.24rem;
}

.stat-pill strong {
  font-size: 1rem;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.page-head h1 {
  margin: 0;
}

.page-head p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  border: 1px solid #bde1ff;
  background: #eaf6ff;
  color: #0c4a6e;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.24rem 0.58rem;
}

.home-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: end;
  background:
    radial-gradient(560px 220px at 0% 0%, rgba(11, 114, 133, 0.18), transparent 72%),
    radial-gradient(420px 220px at 100% 12%, rgba(47, 158, 68, 0.12), transparent 72%),
    linear-gradient(145deg, #f5fbff, #ffffff);
}

.home-dashboard-eyebrow {
  color: #0b7285;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  margin-bottom: 0.55rem;
}

.home-dashboard-context-ribbon {
  border: 1px solid rgba(11, 114, 133, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  padding: 1rem 1.05rem;
  display: grid;
  gap: 0.36rem;
  min-height: 100%;
}

.context-ribbon-title {
  color: var(--text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.home-dashboard-context-ribbon strong {
  font-size: 1rem;
}

.home-dashboard-context-ribbon small {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.dashboard-filter-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.96));
}

.dashboard-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.95rem;
  align-items: end;
}

.dashboard-filter-status {
  min-height: 2.55rem;
  display: flex;
  align-items: center;
}

.dashboard-filter-actions {
  display: flex;
  align-items: end;
}

.dashboard-context-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.dashboard-kpi-accent {
  position: relative;
  overflow: hidden;
}

.dashboard-kpi-accent::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(11, 114, 133, 0.95), rgba(47, 158, 68, 0.72));
}

.dashboard-kpi-accent .kpi-badge {
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dashboard-kpi-accent.is-teal,
.dashboard-link-card.is-teal {
  border-color: rgba(11, 114, 133, 0.22);
}

.dashboard-kpi-accent.is-green,
.dashboard-link-card.is-green {
  border-color: rgba(47, 158, 68, 0.24);
}

.dashboard-kpi-accent.is-gold,
.dashboard-link-card.is-gold {
  border-color: rgba(217, 119, 6, 0.24);
}

.dashboard-kpi-accent.is-rose,
.dashboard-link-card.is-rose {
  border-color: rgba(190, 24, 93, 0.22);
}

.dashboard-kpi-accent.is-slate,
.dashboard-link-card.is-slate {
  border-color: rgba(71, 85, 105, 0.22);
}

.dashboard-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.dashboard-link-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-active-modules {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-link-card {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  text-decoration: none;
  color: var(--text-strong);
  padding: 1rem 1.05rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.dashboard-link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  color: var(--text-strong);
}

.dashboard-link-card strong {
  display: block;
  margin-bottom: 0.18rem;
  font-size: 0.94rem;
}

.dashboard-link-card span {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.dashboard-link-icon {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, rgba(11, 114, 133, 0.14), rgba(47, 158, 68, 0.14));
  color: #0b7285;
  flex: 0 0 auto;
}

.dashboard-link-icon i {
  font-size: 1.1rem;
}

.dashboard-task-list {
  display: grid;
  gap: 0.8rem;
}

.dashboard-task-card {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 0.95rem 1rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
}

.dashboard-task-card.is-teal {
  border-color: rgba(11, 114, 133, 0.22);
}

.dashboard-task-card.is-green {
  border-color: rgba(47, 158, 68, 0.24);
}

.dashboard-task-card.is-gold {
  border-color: rgba(217, 119, 6, 0.24);
}

.dashboard-task-card.is-rose {
  border-color: rgba(190, 24, 93, 0.22);
}

.dashboard-task-card.is-slate {
  border-color: rgba(71, 85, 105, 0.22);
}

.dashboard-task-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, rgba(11, 114, 133, 0.14), rgba(47, 158, 68, 0.14));
  color: #0b7285;
}

.dashboard-task-copy strong {
  display: block;
  margin-bottom: 0.24rem;
  font-size: 0.94rem;
}

.dashboard-task-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.5;
}

.dashboard-task-link {
  display: inline-flex;
  margin-top: 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.dashboard-alerts {
  display: grid;
  gap: 0.8rem;
}

.dashboard-alert {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: #fff;
}

.dashboard-alert.is-critical {
  border-color: rgba(190, 24, 93, 0.22);
  background: linear-gradient(180deg, #fff7fa, #ffffff);
}

.dashboard-alert.is-warning {
  border-color: rgba(217, 119, 6, 0.2);
  background: linear-gradient(180deg, #fffaf2, #ffffff);
}

.dashboard-alert.is-info {
  border-color: rgba(11, 114, 133, 0.18);
  background: linear-gradient(180deg, #f4fbff, #ffffff);
}

.dashboard-alert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.dashboard-alert-head strong {
  font-size: 0.94rem;
}

.dashboard-alert-pill {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #475569;
}

.dashboard-alert p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.dashboard-alert a {
  display: inline-flex;
  margin-top: 0.55rem;
  text-decoration: none;
  font-weight: 700;
  color: #0b7285;
  font-size: 0.83rem;
}

.dashboard-panel-subcard {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 1rem;
  height: 100%;
}

.dashboard-metric-list {
  display: grid;
  gap: 0.58rem;
}

.dashboard-metric-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.48rem;
  border-bottom: 1px dashed #d7e2f0;
}

.dashboard-metric-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dashboard-metric-list span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.dashboard-metric-list strong {
  font-size: 0.9rem;
}

.dashboard-breakdown {
  display: grid;
  gap: 0.6rem;
}

.dashboard-breakdown.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #e5edf7;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.68rem 0.82rem;
}

.dashboard-breakdown-row span {
  color: #425466;
  font-size: 0.84rem;
}

.dashboard-breakdown-row strong {
  font-size: 0.88rem;
}

.dashboard-compare {
  display: grid;
  gap: 0.85rem;
}

.dashboard-compare-row {
  display: grid;
  gap: 0.45rem;
}

.dashboard-compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
}

.dashboard-compare-head span {
  color: var(--text-muted);
}

.dashboard-compare-bar {
  height: 12px;
  border-radius: 999px;
  background: #ecf2f8;
  overflow: hidden;
}

.dashboard-compare-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.dashboard-compare-bar .is-current {
  background: linear-gradient(90deg, #0b7285, #2f9e44);
}

.dashboard-compare-bar .is-previous {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}

.dashboard-financial-note {
  margin-top: 0.9rem;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.dashboard-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dashboard-health-pill {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  padding: 0.76rem 0.82rem;
}

.dashboard-health-pill label {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
  margin-bottom: 0.22rem;
}

.dashboard-health-pill strong {
  font-size: 0.96rem;
}

.dashboard-semaphore {
  display: flex;
  gap: 0.7rem;
}

.dashboard-light {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  opacity: 0.28;
  transform: scale(1);
  transition: opacity 180ms ease, transform 180ms ease;
}

.dashboard-light.is-green {
  background: #16a34a;
  box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.12);
}

.dashboard-light.is-yellow {
  background: #f59e0b;
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.14);
}

.dashboard-light.is-red {
  background: #e11d48;
  box-shadow: 0 0 0 6px rgba(225, 29, 72, 0.12);
}

.dashboard-light.is-active {
  opacity: 1;
  transform: scale(1.08);
}

.dashboard-progress-wrap small {
  color: var(--text-muted);
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
}

.dashboard-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
  font-size: 0.84rem;
}

.dashboard-progress {
  height: 12px;
  border-radius: 999px;
  background: #ecf2f8;
  overflow: hidden;
}

.dashboard-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b7285, #2f9e44);
}

.dashboard-period-snapshots {
  display: grid;
  gap: 0.72rem;
}

.dashboard-period-mini {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fff;
  padding: 0.85rem 0.9rem;
  display: grid;
  gap: 0.3rem;
}

.dashboard-period-mini.is-current {
  background: linear-gradient(145deg, #f5fbff, #ffffff);
  border-color: rgba(11, 114, 133, 0.22);
}

.dashboard-period-mini label {
  color: var(--text-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.dashboard-period-mini strong {
  font-size: 0.98rem;
}

.dashboard-module-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.table-link {
  color: #0b7285;
  text-decoration: none;
  font-weight: 700;
}

.table-link:hover {
  color: #075985;
}

.dashboard-run-list {
  display: grid;
  gap: 0.8rem;
}

.dashboard-run-item {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fff;
  padding: 0.9rem;
}

.dashboard-run-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.38rem;
}

.dashboard-run-head strong {
  font-size: 0.93rem;
}

.dashboard-run-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.dashboard-run-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.dashboard-inline-note {
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.55;
}

.btn {
  border-radius: 11px;
}

.btn-primary {
  background: linear-gradient(140deg, var(--brand), var(--brand-strong));
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(11, 114, 133, 0.24);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(140deg, #0a6678, #06466b);
  border-color: transparent;
}

.btn-outline-secondary {
  border-color: #c6d4e6;
  color: #344054;
}

.btn-outline-secondary:hover {
  border-color: #9fb3cc;
  background: #f4f8fc;
  color: #1f2937;
}

.form-control,
.form-select {
  border-radius: 11px;
  border-color: #ced9e6;
  background: #fff;
  min-height: 2.55rem;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(11, 114, 133, 0.55);
  box-shadow: 0 0 0 3px rgba(11, 114, 133, 0.14);
}

.smart-select {
  position: relative;
  width: 100%;
}

.smart-select-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.001;
  pointer-events: none;
  z-index: 0;
}

.smart-select-trigger {
  width: 100%;
  min-height: 2.55rem;
  border-radius: 11px;
  border: 1px solid #ced9e6;
  background: #fff;
  padding: 0.58rem 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  color: #172b4d;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.smart-select.is-small .smart-select-trigger {
  min-height: calc(1.5em + 0.5rem + 2px);
  padding: 0.38rem 0.7rem;
  border-radius: 9px;
}

.smart-select.is-large .smart-select-trigger {
  min-height: 3rem;
  padding: 0.75rem 0.95rem;
}

.smart-select-trigger:hover {
  border-color: #b7c8dc;
  background: #fdfefe;
}

.smart-select.is-open .smart-select-trigger,
.smart-select-trigger:focus {
  border-color: rgba(11, 114, 133, 0.55);
  box-shadow: 0 0 0 3px rgba(11, 114, 133, 0.14);
  outline: none;
}

.smart-select.is-invalid .smart-select-trigger {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.14);
}

.smart-select.is-disabled .smart-select-trigger,
.smart-select-trigger:disabled {
  background: #f5f8fb;
  color: #7a8aa0;
  cursor: not-allowed;
}

.smart-select-trigger-text {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.smart-select-summary {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.smart-select-summary[data-placeholder="true"] {
  color: #7b8794;
  font-weight: 500;
}

.smart-select-hint {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.smart-select-trigger-icon {
  flex: 0 0 auto;
  color: #6b7c93;
  transition: transform 180ms ease;
}

.smart-select.is-open .smart-select-trigger-icon {
  transform: rotate(180deg);
}

.smart-select-panel {
  position: fixed;
  z-index: 1085;
  border: 1px solid #c9d8e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.16);
  padding: 0.45rem;
}

.smart-select-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #d6e1ec;
  border-radius: 10px;
  background: #f9fbfd;
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.45rem;
}

.smart-select-search i {
  color: #6b7c93;
}

.smart-select-search-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #172b4d;
  padding: 0;
  outline: none;
}

.smart-select-options {
  display: grid;
  gap: 0.18rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.smart-select-option {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #172b4d;
  padding: 0.58rem 0.7rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.15rem 0.7rem;
  text-align: left;
}

.smart-select-option:hover,
.smart-select-option.is-active {
  background: #eef8ff;
}

.smart-select-option.is-selected {
  background: #e6f6f8;
}

.smart-select-option.is-disabled {
  color: #8d99a8;
}

.smart-select-option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 600;
}

.smart-select-option-meta {
  grid-column: 1 / 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.73rem;
}

.smart-select-option.is-placeholder .smart-select-option-label {
  color: #6b7c93;
  font-weight: 500;
}

.smart-select-option-check {
  grid-column: 2 / 3;
  grid-row: 1 / span 2;
  color: #0b7285;
  opacity: 0;
}

.smart-select-option.is-selected .smart-select-option-check {
  opacity: 1;
}

.smart-select-empty {
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text-muted);
  padding: 0.9rem 0.8rem;
  font-size: 0.84rem;
}

.entry-grid {
  display: grid;
  grid-template-columns: 1.75fr 0.8fr;
  gap: 1rem;
}

.journal-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.journal-tools-card {
  border: 1px solid rgba(11, 114, 133, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 1rem;
}

.journal-tools-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.journal-tools-head h3 {
  margin: 0;
}

.journal-tools-empty {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.journal-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.recent-account-chip {
  border: 1px solid #c7d8ea;
  background: #fff;
  color: var(--text-strong);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.recent-account-chip span {
  font-size: 0.82rem;
  font-weight: 700;
}

.recent-account-chip small {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.recent-account-chip:hover {
  border-color: rgba(11, 114, 133, 0.45);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.journal-template-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.6rem;
  align-items: center;
}

.account-picker {
  display: grid;
  gap: 0.35rem;
}

.account-picker-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.account-picker-code {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.account-picker-menu {
  position: absolute;
  inset: calc(100% + 0.35rem) 0 auto 0;
  z-index: 18;
  border: 1px solid #c8d7e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  padding: 0.35rem;
  display: grid;
  gap: 0.25rem;
  max-height: 18rem;
  overflow-y: auto;
}

.account-picker-option {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  padding: 0.6rem 0.7rem;
  display: grid;
  gap: 0.08rem;
}

.account-picker-option:hover,
.account-picker-option.is-active {
  background: #eef8ff;
}

.account-picker-option-code {
  color: #0b7285;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.account-picker-option-name {
  color: var(--text-strong);
  font-size: 0.84rem;
}

.account-picker-empty {
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0.6rem 0.7rem;
}

.entry-summary {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 1rem;
  height: fit-content;
  position: sticky;
  top: 5.4rem;
}

.entry-summary .summary-title {
  margin-bottom: 0.85rem;
  font-size: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.48rem 0;
  border-bottom: 1px dashed #d8e4f0;
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-row label {
  color: var(--text-muted);
  font-size: 0.83rem;
}

.summary-row strong {
  font-size: 0.95rem;
}

.summary-balance.ok strong {
  color: #15803d;
}

.summary-balance.fail strong {
  color: var(--danger);
}

.auth-shell {
  min-height: 100vh;
  background:
    radial-gradient(900px 340px at 12% 0%, rgba(11, 114, 133, 0.26), transparent 72%),
    radial-gradient(760px 280px at 100% 0%, rgba(47, 158, 68, 0.24), transparent 70%),
    #f2f6fb;
  padding: 1.2rem;
}

.auth-canvas {
  min-height: calc(100vh - 2.4rem);
  border: 1px solid #d8e2ef;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-strong);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

.auth-brand-panel {
  padding: 2.6rem 2.4rem;
  background:
    linear-gradient(145deg, rgba(11, 114, 133, 0.96), rgba(47, 158, 68, 0.9)),
    linear-gradient(145deg, #0b7285, #2f9e44);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::before,
.auth-brand-panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.auth-brand-panel::before {
  width: 320px;
  height: 320px;
  top: -180px;
  right: -80px;
}

.auth-brand-panel::after {
  width: 240px;
  height: 240px;
  bottom: -120px;
  left: -80px;
}

.auth-brand-logo {
  width: min(320px, 100%);
  height: auto;
  margin-bottom: 1.4rem;
  filter: drop-shadow(0 10px 24px rgba(7, 42, 49, 0.18));
}

.auth-brand-panel h1 {
  font-size: clamp(1.55rem, 2.1vw, 2.2rem);
  font-weight: 800;
  max-width: 600px;
  margin-bottom: 0.85rem;
}

.auth-brand-panel p {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.9);
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 11px;
  padding: 0.58rem 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.86rem;
}

.auth-feature-item i {
  font-size: 0.95rem;
}

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  padding: 1.4rem;
}

.auth-form-card {
  width: min(430px, 100%);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
}

.auth-form-card h2 {
  margin-bottom: 0.2rem;
  font-size: 1.25rem;
}

.auth-form-card p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.auth-help {
  margin-top: 0.95rem;
  color: var(--text-muted);
  font-size: 0.83rem;
  text-align: center;
}

.empty-state {
  border: 1px dashed #c6d5e7;
  border-radius: 14px;
  padding: 1.8rem;
  text-align: center;
  background: #fafcff;
}

.journal-toolbar {
  background: linear-gradient(180deg, #fbfdff, #f7fbff);
}

.journal-filter-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.journal-search-input .input-group-text {
  border-color: #ced9e6;
  background: #f2f7fd;
  color: #526581;
}

.journal-search-hint {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.journal-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) minmax(280px, 1.6fr) auto;
  gap: 0.8rem;
  align-items: end;
}

.journal-period-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.journal-filter-actions {
  display: flex;
  justify-content: flex-end;
}

.journal-context {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.9rem;
  align-items: center;
  background: linear-gradient(160deg, #f9fcff, #ffffff);
}

.journal-context-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.journal-context-label {
  color: #155e75;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.journal-context-meta {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  color: #475569;
  font-size: 0.86rem;
}

.journal-context-note {
  border-radius: 12px;
  border: 1px solid;
  padding: 0.55rem 0.68rem;
  font-size: 0.82rem;
  font-weight: 600;
  max-width: 360px;
}

.journal-context-note.is-open {
  background: #eafcf4;
  border-color: #bbf0d2;
  color: #166534;
}

.journal-context-note.is-restricted {
  background: #fff8e7;
  border-color: #f5df9a;
  color: #854d0e;
}

.journal-context-note.is-readonly {
  background: #f2f5f8;
  border-color: #d3dce7;
  color: #334155;
}

.journal-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 0.75rem;
}

.journal-kpi {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
  padding: 0.7rem 0.8rem;
}

.journal-kpi label {
  display: block;
  margin-bottom: 0.24rem;
  color: #64748b;
  font-size: 0.75rem;
}

.journal-kpi strong {
  font-size: 1.03rem;
}

.journal-results-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.journal-table-wrap {
  border-radius: 12px;
}

.journal-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.journal-entry-number {
  color: #0f172a;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.journal-entry-meta {
  margin-top: 0.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  color: #64748b;
  font-size: 0.8rem;
}

.journal-amount {
  font-variant-numeric: tabular-nums;
}

.journal-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.journal-pagination-meta {
  color: #64748b;
  font-size: 0.86rem;
}

.journal-help-tooltip .tooltip-inner {
  max-width: 340px;
  text-align: left;
}

.journal-details-head .btn {
  white-space: nowrap;
}

.journal-details-kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 0.75rem;
}

.journal-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 0.8rem;
}

.journal-action-card {
  border: 1px solid #d8e4f1;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f9fcff);
  padding: 0.8rem;
}

.journal-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 0.75rem;
}

.journal-detail-item {
  border: 1px solid #dee8f3;
  border-radius: 12px;
  background: #fff;
  padding: 0.65rem 0.7rem;
}

.journal-detail-item-span-2 {
  grid-column: span 2;
}

.journal-detail-label {
  display: block;
  color: #64748b;
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.journal-detail-value {
  font-size: 0.93rem;
  color: #0f172a;
}

.journal-hash {
  display: inline-block;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-preview-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  padding: 0.8rem;
}

.logo-preview-grid {
  display: grid;
  gap: 0.85rem;
}

.logo-preview-image {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid #d9e5f1;
  border-radius: 10px;
  background: #ffffff;
}

.logo-preview-thumb {
  width: min(160px, 100%);
  height: 160px;
  max-height: none;
  margin: 0 auto;
  display: block;
}

.footer-note {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1200px) {
  .entry-grid {
    grid-template-columns: 1fr;
  }

  .entry-summary {
    position: static;
  }
}

@media (max-width: 1199.98px) {
  .app-layout {
    grid-template-columns: 1fr;
    height: 100vh;
  }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 290px;
    max-width: 86vw;
    transform: translateX(-104%);
    transition: transform 220ms ease;
  }

  .app-layout.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .app-layout.sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.45);
    z-index: 24;
  }

  .app-content {
    min-width: 0;
  }

  .app-main {
    padding: 1.2rem;
  }

  .app-topbar {
    padding: 0.88rem 1rem;
    flex-wrap: wrap;
  }

  .topbar-left {
    flex: 1 1 100%;
  }

  .topbar-right {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .company-pill {
    max-width: 100%;
    flex: 1 1 100%;
  }

  .topbar-search {
    min-width: 0;
    width: 100%;
  }

  .auth-canvas {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    padding: 1.55rem 1.3rem;
  }

  .auth-form-panel {
    padding: 1rem;
  }
}

@media (max-width: 991.98px) {
  .home-dashboard-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-filter-actions {
    grid-column: 1 / -1;
  }

  .dashboard-link-grid,
  .dashboard-link-grid.compact,
  .dashboard-active-modules,
  .dashboard-breakdown.two-columns {
    grid-template-columns: 1fr;
  }

  .journal-tools,
  .journal-template-bar {
    grid-template-columns: 1fr;
  }

  .dashboard-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-task-card {
    grid-template-columns: 1fr;
  }

  .topbar-right {
    justify-content: flex-start;
  }

  .company-pill {
    max-width: 100%;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .journal-filter-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

  .journal-filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .journal-context {
    grid-template-columns: 1fr;
  }

  .journal-context-note {
    max-width: none;
  }

  .journal-kpi-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .journal-details-kpi-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .journal-action-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .journal-detail-grid {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }

  .journal-detail-item-span-2 {
    grid-column: span 2;
  }
}

@media (max-width: 575.98px) {
  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-filter-grid,
  .dashboard-health-grid,
  .dashboard-link-grid,
  .dashboard-link-grid.compact,
  .dashboard-breakdown.two-columns {
    grid-template-columns: 1fr;
  }

  .dashboard-filter-actions .btn {
    width: 100%;
  }

  .dashboard-context-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-search {
    display: none;
  }

  .app-topbar {
    gap: 0.7rem;
  }

  .auth-feature-grid {
    grid-template-columns: 1fr;
  }

  .journal-filter-grid {
    grid-template-columns: 1fr;
  }

  .journal-period-nav {
    flex-direction: column;
  }

  .journal-period-nav .btn {
    width: 100%;
  }

  .journal-filter-actions .btn {
    width: 100%;
  }

  .journal-kpi-grid {
    grid-template-columns: 1fr;
  }

  .journal-pagination .btn-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journal-details-kpi-grid {
    grid-template-columns: 1fr;
  }

  .journal-action-grid {
    grid-template-columns: 1fr;
  }

  .journal-detail-grid {
    grid-template-columns: 1fr;
  }

  .journal-detail-item-span-2 {
    grid-column: span 1;
  }
}
