:root {
  --ez-primary: #126d78;
  --ez-primary-dark: #174e57;
  --ez-primary-soft: #e9f4f5;
  --ez-accent: #b8d63b;
  --ez-border: #d9e2e5;
  --ez-border-strong: #c5d1d5;
  --ez-surface: #ffffff;
  --ez-surface-muted: #f6f8f9;
  --ez-canvas: #f2f5f6;
  --ez-text: #21343b;
  --ez-text-muted: #667981;
  --ez-shadow-sm: 0 .2rem .75rem rgba(24, 54, 63, .06);
  --ez-shadow-md: 0 .65rem 1.8rem rgba(24, 54, 63, .09);
}

html,
body {
  height: 100%;
  min-height: 100%;
}

body {
  background: var(--ez-canvas) !important;
  color: var(--ez-text);
  display: flex;
  flex-direction: column;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}

body.ez-app-shell {
  height: 100vh;
  overflow: hidden;
}

@supports (height: 100dvh) {
  body.ez-app-shell {
    height: 100dvh;
    min-height: 100dvh;
  }
}

.ez-app-header,
.ez-app-footer {
  flex: 0 0 auto;
}

.ez-app-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.ez-app-main--flush {
  padding-top: 0;
}

.ez-page-heading {
  gap: 1.25rem;
}

.ez-tutorial-hero {
  background:
    radial-gradient(circle at 92% 12%, rgba(184, 214, 59, .2), transparent 13rem),
    linear-gradient(135deg, #fff 0%, var(--ez-primary-soft) 100%);
  border: 1px solid var(--ez-border);
  border-radius: 1rem;
  box-shadow: var(--ez-shadow-sm);
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 3.25rem);
}

.ez-tutorial-hero .lead { max-width: 48rem; }

.ez-tutorial-list {
  display: grid;
  gap: 1rem;
}

.ez-tutorial-step {
  align-items: start;
  background: var(--ez-surface);
  border: 1px solid var(--ez-border);
  border-radius: .8rem;
  box-shadow: var(--ez-shadow-sm);
  display: grid;
  gap: 1rem;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  padding: 1.25rem;
}

.ez-tutorial-number {
  align-items: center;
  background: var(--ez-primary);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 1.05rem;
  font-weight: 700;
  height: 2.75rem;
  justify-content: center;
  width: 2.75rem;
}

.ez-tutorial-aside {
  border-color: var(--ez-border);
  box-shadow: var(--ez-shadow-sm);
}

.ez-tutorial-aside-icon {
  align-items: center;
  background: var(--ez-primary-soft);
  border-radius: .7rem;
  color: var(--ez-primary);
  display: inline-flex;
  font-size: 1.4rem;
  height: 2.8rem;
  justify-content: center;
  width: 2.8rem;
}

@media (max-width: 575.98px) {
  .ez-tutorial-step {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    padding: 1rem;
  }

  .ez-tutorial-number {
    font-size: .95rem;
    height: 2.25rem;
    width: 2.25rem;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #1c333b;
  font-weight: 700;
  letter-spacing: -.015em;
}

.text-secondary,
.text-muted {
  color: var(--ez-text-muted) !important;
}

body.ez-busy {
  overflow: hidden;
}

body.ez-busy > .ez-app-main,
body.modal-open > .ez-app-main {
  overflow: hidden;
}

.ez-busy-overlay {
  align-items: center;
  background: rgba(10, 25, 31, .72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1.25rem;
  position: fixed;
  z-index: 3000;
}

.ez-busy-dialog {
  align-items: center;
  background: #fff;
  border-radius: .85rem;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .3);
  display: flex;
  gap: 1.25rem;
  max-width: 34rem;
  padding: 1.5rem;
  width: 100%;
}

.ez-busy-spinner {
  flex: 0 0 auto;
  height: 2.75rem;
  width: 2.75rem;
}

@media (max-width: 575.98px) {
  .ez-busy-dialog {
    align-items: flex-start;
    flex-direction: column;
  }
}

.navbar {
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--ez-border);
  box-shadow: 0 .2rem 1rem rgba(24, 54, 63, .06);
  min-height: 4.25rem;
  padding-block: .65rem;
  position: relative;
  z-index: 1030;
}

.ez-project-layout {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  min-height: 100%;
}

.ez-project-rail {
  background: #f8fafb;
  border-right: 1px solid var(--ez-border);
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1rem .65rem;
}

.ez-rail-link {
  align-items: center;
  border-radius: .45rem;
  color: #3c5059;
  display: flex;
  flex-direction: column;
  font-size: .78rem;
  gap: .25rem;
  padding: .75rem .4rem;
  text-align: center;
  text-decoration: none;
}

.ez-rail-link i { font-size: 1.2rem; }
.ez-rail-link:hover,
.ez-rail-link.active { background: #e4eef0; color: var(--ez-primary-dark); }
.ez-rail-spacer { flex: 1; }

.ez-project-canvas { min-width: 0; }
.ez-project-header { background: #fff; border-bottom: 1px solid var(--ez-border); }
.ez-status-dot { background: #28a745; border-radius: 50%; height: .55rem; width: .55rem; }

.ez-project-meta {
  color: #586b74;
  display: flex;
  flex-wrap: wrap;
  font-size: .78rem;
  gap: .45rem 1.8rem;
}

.ez-object-tabs { display: flex; gap: 2rem; overflow-x: auto; }
.ez-object-tab {
  border-bottom: 3px solid transparent;
  color: #3b5059;
  font-weight: 600;
  padding: .8rem .25rem;
  text-decoration: none;
  white-space: nowrap;
}
.ez-object-tab span { background: #e8eef0; border-radius: 999px; font-size: .72rem; margin-left: .35rem; padding: .12rem .45rem; }
.ez-object-tab:hover,
.ez-object-tab.active { border-bottom-color: var(--ez-primary); color: var(--ez-primary-dark); }

.ez-data-studio { background: #fff; min-height: 40rem; }
.ez-studio-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.ez-inline-import {
  align-items: end;
  background: #f7fafb;
  border: 1px solid var(--ez-border);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(15rem, 2fr) minmax(12rem, 1fr) auto auto;
  padding: 1rem;
}
.ez-native-table { border: 1px solid var(--ez-border); }
.ez-native-table thead th { background: #f2f6f7; color: #465a63; font-size: .76rem; text-transform: uppercase; }
.ez-next-action { align-items: center; background: #f1f8f9; border-left: .25rem solid var(--ez-primary); display: flex; justify-content: space-between; padding: 1rem; }
.ez-empty-studio { margin: 5rem auto; max-width: 34rem; text-align: center; }
.ez-empty-studio > i { color: #7a9099; font-size: 2.5rem; }
.ez-anomaly-tray { border: 1px solid var(--ez-border); }
.ez-anomaly-heading { align-items: center; background: #fbfcfd; border-bottom: 1px solid var(--ez-border); display: flex; justify-content: space-between; padding: .8rem 1rem; }
.ez-source-drawer { width: min(34rem, 94vw) !important; }
.ez-settings-drawer { width: min(42rem, 96vw) !important; }
.min-w-0 { min-width: 0; }

.ez-project-layout .ez-workbook-shell { border-radius: .25rem; box-shadow: none; }
.ez-project-layout .tabulator { font-size: .8rem; }
.ez-project-layout .tabulator .tabulator-header,
.ez-project-layout .tabulator .tabulator-header .tabulator-col { background: #f2f6f7; }

@media (max-width: 991.98px) {
  .ez-project-layout { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .ez-project-rail { padding-inline: .35rem; }
  .ez-rail-link span { font-size: .65rem; }
  .ez-inline-import { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
  .ez-page-heading {
    align-items: stretch !important;
    flex-direction: column;
  }
  .ez-page-heading > .d-flex {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .ez-page-heading > .btn {
    width: 100%;
  }
  .ez-project-layout { display: block; }
  .ez-project-rail { display: none; }
  .ez-project-meta { display: grid; gap: .5rem; }
  .ez-object-tabs { gap: .75rem; }
  .ez-next-action { align-items: stretch; flex-direction: column; gap: .75rem; }
}

.navbar .nav-link {
  border-radius: .6rem;
  color: #405860;
  font-size: .925rem;
  font-weight: 600;
  margin-inline: .08rem;
  padding: .55rem .75rem !important;
  transition: background-color .15s ease, color .15s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  background: var(--ez-primary-soft);
  color: var(--ez-primary-dark);
}

.navbar .dropdown-menu {
  margin-top: .65rem;
}

.navbar-toggler {
  border-color: var(--ez-border-strong);
  border-radius: .6rem;
}

.ez-brand-logo {
  display: block;
  height: 1.75rem;
  object-fit: contain;
  width: 3.9rem;
}

.ez-brand-product {
  border-left: 1px solid var(--ez-border-strong);
  color: var(--ez-primary-dark);
  font-size: 1rem;
  margin-left: .15rem;
  padding-left: .75rem;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .ez-brand-product { display: none; }
}

.btn-primary {
  background: var(--ez-primary);
  border-color: var(--ez-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--ez-primary-dark);
  border-color: var(--ez-primary-dark);
}

.btn {
  border-radius: .55rem;
  font-weight: 600;
  padding: .5rem .9rem;
  transition: box-shadow .15s ease, transform .15s ease, background-color .15s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-sm {
  border-radius: .45rem;
  padding: .32rem .65rem;
}

.btn-outline-primary {
  border-color: #78a6ad;
  color: var(--ez-primary-dark);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--ez-primary-soft);
  border-color: var(--ez-primary);
  color: var(--ez-primary-dark);
}

.card {
  background: var(--ez-surface);
  border: 1px solid var(--ez-border);
  border-radius: .8rem;
  box-shadow: var(--ez-shadow-sm);
  overflow: hidden;
}

.card-header {
  background: #fbfcfc !important;
  border-bottom-color: var(--ez-border);
  padding: .9rem 1.15rem;
}

.card-body {
  padding: 1.2rem;
}

.form-label {
  color: #334b53;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .4rem;
}

.form-control,
.form-select {
  border-color: var(--ez-border-strong);
  border-radius: .55rem;
  min-height: 2.65rem;
}

.form-control:focus,
.form-select:focus {
  border-color: #63a1aa;
  box-shadow: 0 0 0 .2rem rgba(18, 109, 120, .12);
}

.form-text {
  color: var(--ez-text-muted);
}

.dropdown-menu {
  border: 1px solid var(--ez-border);
  border-radius: .7rem;
  box-shadow: var(--ez-shadow-md);
  padding: .45rem;
}

.dropdown-item {
  border-radius: .45rem;
  padding: .5rem .7rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--ez-primary-soft);
  color: var(--ez-primary-dark);
}

.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: #f3f8f8;
  color: var(--ez-text);
}

.table > :not(caption) > * > * {
  border-bottom-color: #e5ebed;
  padding: .85rem 1rem;
}

.table thead th {
  background: #f5f8f9;
  color: #52666e;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.alert {
  border: 0;
  border-left: .25rem solid currentColor;
  border-radius: .65rem;
}

.badge {
  font-weight: 600;
  letter-spacing: .01em;
}

.modal-content,
.offcanvas {
  border: 1px solid var(--ez-border);
  box-shadow: var(--ez-shadow-md);
}

.modal-content {
  border-radius: .85rem;
}

.ez-app-footer {
  box-shadow: 0 -.15rem .75rem rgba(24, 54, 63, .04);
  flex-shrink: 0;
}

.ez-app-footer strong {
  color: var(--ez-primary-dark);
}

.ez-login-logo {
  display: block;
  height: auto;
  max-width: 10.5rem;
  width: 100%;
}

.metric {
  border-left: .28rem solid var(--ez-primary);
  box-shadow: var(--ez-shadow-sm);
}

.metric .display-6 {
  color: var(--ez-primary-dark);
  font-weight: 650;
  letter-spacing: -.04em;
}

.metric .text-secondary {
  font-size: .85rem;
  font-weight: 600;
}

code {
  color: #7a294a;
}

.ez-metric-card {
  border: 1px solid var(--ez-border);
  box-shadow: 0 .25rem 1rem rgba(32, 48, 56, .04);
}

.ez-metric-value {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
}

.ez-reference-sidebar {
  max-height: 70vh;
  overflow-y: auto;
  position: sticky;
  top: 1rem;
}

.ez-reference-sidebar .list-group-item.active {
  background: var(--ez-primary);
  border-color: var(--ez-primary);
}

.ez-reference-row td {
  transition: background-color .15s ease;
}

.ez-reference-row:hover td {
  background: #f1f8f9;
}

.ez-filter-card {
  border-color: var(--ez-border);
  box-shadow: 0 .35rem 1.5rem rgba(32, 48, 56, .05);
}

.ez-workbook-shell {
  background: #fff;
  border: 1px solid var(--ez-border);
  border-radius: .75rem;
  box-shadow: 0 .5rem 2rem rgba(32, 48, 56, .08);
  overflow: hidden;
}

.ez-grid-toolbar {
  background: #f8fafb;
  border-bottom: 1px solid var(--ez-border);
}

.ez-grid-status {
  background: var(--ez-primary-soft);
  border-top: 1px solid #c9e4e7;
  color: var(--ez-primary-dark);
}

.tabulator {
  border: 0 !important;
  font-size: .875rem;
}

.tabulator .tabulator-header {
  background: #edf3f5;
  border-bottom: 2px solid #c8d5da;
  color: #24373f;
}

.tabulator .tabulator-header .tabulator-col {
  background: #edf3f5;
}

.tabulator-row.tabulator-row-even {
  background: #fbfcfd;
}

.tabulator-row.ez-grid-row-error {
  box-shadow: inset .25rem 0 #dc3545;
}

.tabulator-cell.ez-grid-cell-error {
  background: #fff0f1 !important;
  box-shadow: inset 0 0 0 2px rgba(220, 53, 69, .55);
}

.tabulator-cell.ez-grid-cell-dirty {
  background: #fff8df !important;
}

@media (max-width: 1199.98px) {
  .ez-reference-sidebar {
    max-height: 18rem;
    position: static;
  }
}
