@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Sora:wght@600;700;800&display=swap&subset=latin-ext");

:root {
  --layout-pad: 14px;
  --sidebar-col: 286px;
  --font-ui: "Plus Jakarta Sans", "Manrope", sans-serif;
  --font-display: "Sora", "Plus Jakarta Sans", sans-serif;
  --bg-main: #eaf1f9;
  --bg-soft: #f5f8fc;
  --surface: #ffffff;
  --text: #162d4f;
  --text-soft: #6e7f9a;
  --line: #e3ebf4;

  --sidebar-top: #16335f;
  --sidebar-mid: #112b52;
  --sidebar-bottom: #0f2650;

  --teal: #19a89d;
  --teal-strong: #0f8f89;
  --blue: #1c3e78;
  --danger: #d55a4f;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  min-height: 100%;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(80rem 40rem at 86% 8%, #d7f0ef 0%, transparent 60%),
    radial-gradient(60rem 40rem at 10% 95%, #dbe7f8 0%, transparent 55%),
    var(--bg-main);
}

.page-bg {
  width: 100%;
  max-width: 100%;
  padding: var(--layout-pad);
  min-height: 100vh;
  overflow-x: clip;
  background: linear-gradient(
    90deg,
    #13335f 0,
    #102b54 calc(var(--layout-pad) + var(--sidebar-col)),
    transparent calc(var(--layout-pad) + var(--sidebar-col))
  );
}

.app-layout {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-columns: var(--sidebar-col) minmax(0, 1fr);
  gap: 16px;
}

.surface {
  background: var(--surface);
  border-radius: 28px;
  box-shadow:
    0 22px 40px rgba(16, 45, 89, 0.09),
    0 2px 0 rgba(255, 255, 255, 0.9) inset;
}

.sidebar {
  position: relative;
  border-radius: 32px;
  padding: 28px 18px;
  min-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: linear-gradient(180deg, var(--sidebar-top) 0%, var(--sidebar-mid) 52%, var(--sidebar-bottom) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 16px 35px rgba(9, 24, 54, 0.45);
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(25rem 16rem at -5% -8%, rgba(63, 152, 171, 0.2), transparent 60%),
    radial-gradient(20rem 20rem at 110% 100%, rgba(37, 89, 170, 0.2), transparent 65%),
    repeating-linear-gradient(
      130deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 2px,
      transparent 2px,
      transparent 12px
    );
  pointer-events: none;
  animation: sidebarTextureDrift 16s ease-in-out infinite alternate;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  padding: 6px 6px 0;
}

.brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, rgba(35, 175, 167, 0.25), rgba(18, 55, 105, 0.15));
}

.brand-mark svg {
  width: 54px;
  height: 54px;
}

.brand-text h1 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.04;
  font-size: 21px;
  letter-spacing: -0.02em;
  color: #eef7ff;
  font-weight: 800;
}

.brand-text h1 span {
  color: #6de29c;
}

.sidebar-caption {
  margin: 12px 10px 12px;
  color: #9eb7d2;
  font-size: 12px;
  letter-spacing: 0.28em;
  font-weight: 700;
}

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

.nav-item {
  height: 54px;
  border-radius: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  color: #d5e4f8;
  font-size: 20px;
  font-weight: 600;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  background: transparent;
  border: 1px solid transparent;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  animation: navItemIntro 0.42s ease both;
}

.sidebar-nav .nav-item:nth-child(2) {
  animation-delay: 0.05s;
}

.sidebar-nav .nav-item:nth-child(3) {
  animation-delay: 0.1s;
}

.sidebar-nav .nav-item:nth-child(4) {
  animation-delay: 0.15s;
}

.nav-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 15%,
    rgba(151, 228, 255, 0.15) 45%,
    transparent 75%
  );
  transform: translateX(-120%);
  transition: transform 0.45s ease;
  pointer-events: none;
}

.nav-item::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(122, 221, 210, 0.9), rgba(113, 190, 252, 0.7));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.nav-item .icon {
  width: 20px;
  height: 20px;
  color: #7ed8c8;
  flex-shrink: 0;
}

.nav-item .icon svg {
  width: 100%;
  height: 100%;
  transition: transform 0.22s ease, filter 0.22s ease;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(20, 126, 136, 0.28), rgba(18, 57, 110, 0.16));
  border-color: rgba(120, 222, 211, 0.25);
  box-shadow: inset 0 0 0 1px rgba(122, 221, 210, 0.12);
}

.nav-item.active,
.nav-item:hover {
  transform: translateX(4px);
}

.nav-item:hover::before {
  transform: translateX(120%);
}

.nav-item.active::after,
.nav-item:hover::after {
  transform: scaleX(1);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-item:hover .icon svg,
.nav-item:focus-visible .icon svg {
  transform: scale(1.08) rotate(-6deg);
  filter: drop-shadow(0 0 6px rgba(120, 228, 205, 0.45));
}

.nav-item:active {
  transform: translateX(2px) scale(0.99);
}

.nav-item:focus-visible {
  outline: 2px solid rgba(136, 228, 218, 0.65);
  outline-offset: 2px;
}

.main-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  gap: 16px;
  align-content: start;
}

.header-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 32px;
  min-height: 176px;
  background:
    radial-gradient(30rem 16rem at 88% 20%, rgba(162, 236, 226, 0.27), transparent 60%),
    var(--surface);
}

.section-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #366d7f;
  letter-spacing: 0.11em;
  font-weight: 800;
  font-size: 13px;
}

.header-copy h2 {
  font-family: var(--font-display);
  margin: 0 0 10px;
  font-size: 62px;
  line-height: 0.94;
  letter-spacing: -0.03em;
  color: #122b4f;
}

.header-copy p {
  margin: 0;
  max-width: 620px;
  color: #586d88;
  font-size: 19px;
  line-height: 1.5;
}

.header-copy,
.header-tools {
  min-width: 0;
}

.header-tools {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-search-form {
  margin: 0;
}

.search-input {
  width: 380px;
  height: 62px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  color: #8291a8;
  box-shadow: 0 8px 16px rgba(19, 39, 67, 0.05);
}

.search-input svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.search-input input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 19px;
  color: #485e7b;
}

.user-chip {
  min-width: 320px;
  height: 80px;
  padding: 10px 18px;
  border-radius: 22px;
  color: #e7fbff;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(110deg, #10838c 0%, #165b8a 100%);
  box-shadow: 0 14px 22px rgba(17, 63, 98, 0.25);
}

.user-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(37, 184, 171, 0.34);
}

.user-icon svg {
  width: 24px;
  height: 24px;
}

.user-chip strong {
  font-family: var(--font-display);
  display: block;
  font-size: 23px;
  margin-bottom: 6px;
}

.user-chip p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #c7ebf2;
  font-size: 16px;
  font-weight: 600;
}

.user-chip p svg {
  width: 16px;
  height: 16px;
}

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

.metric-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 18px 20px 16px;
  min-height: 184px;
  background: #fff;
  box-shadow:
    0 10px 20px rgba(16, 45, 89, 0.07),
    inset 0 0 0 1px rgba(14, 43, 82, 0.035);
}

.metric-card h3 {
  font-family: var(--font-display);
  margin: 14px 0 2px;
  font-size: 20px;
  font-weight: 700;
  color: #263c5f;
  letter-spacing: -0.01em;
}

.metric-value {
  font-family: var(--font-display);
  display: block;
  font-size: 60px;
  line-height: 1;
  font-weight: 800;
  color: #162e54;
  margin-bottom: 5px;
}

.metric-card p {
  margin: 0;
  color: #617693;
  font-size: 17px;
  line-height: 1.25;
  max-width: 72%;
}

.metric-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #d5e6ff;
  background: rgba(113, 149, 220, 0.30);
}

.metric-icon svg {
  width: 26px;
  height: 26px;
}

.metric-icon.mint {
  color: #2b9f8f;
  background: #e5f6f0;
}

.metric-icon.sand {
  color: #8e7e62;
  background: #f7f2e6;
}

.metric-primary {
  color: #f4fbff;
  background:
    radial-gradient(18rem 14rem at 84% 52%, rgba(94, 223, 202, 0.30), transparent 72%),
    radial-gradient(18rem 12rem at 10% 12%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(118deg, #1c3467 0%, #22458a 50%, #1aa0aa 100%);
}

.metric-primary h3,
.metric-primary p {
  color: #edf8ff;
}

.metric-primary .metric-value {
  color: #ffffff;
}

.metric-art {
  position: absolute;
  right: 8px;
  bottom: 0;
  pointer-events: none;
  opacity: 1;
}

.metric-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.art-product {
  width: 214px;
  height: 146px;
}

.art-stock {
  width: 220px;
  height: 112px;
  right: 2px;
  bottom: 2px;
}

.art-alert {
  width: 206px;
  height: 104px;
  right: -2px;
  bottom: 6px;
}

.danger {
  color: var(--danger);
}

.operation-banner {
  border-radius: 24px;
  padding: 24px 26px;
  min-height: 164px;
  color: #effbff;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background:
    radial-gradient(15rem 13rem at 82% 40%, rgba(74, 220, 191, 0.28), transparent 65%),
    linear-gradient(115deg, #1b3468 0%, #1e3b70 42%, #119a95 100%);
  box-shadow: 0 16px 30px rgba(14, 40, 78, 0.22);
}

.operation-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ddf5fb;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  margin-bottom: 12px;
}

.operation-copy h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 35px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.operation-copy p {
  margin: 0;
  color: #c5deea;
  font-size: 18px;
}

.operation-mini {
  display: flex;
  gap: 10px;
}

.finance-panel {
  padding: 20px 22px;
  border-radius: 22px;
}

.finance-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.finance-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  color: #1a3155;
  letter-spacing: -0.02em;
}

.finance-head p {
  margin: 0;
  color: #607694;
  font-size: 16px;
  font-weight: 600;
}

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

.finance-card {
  border-radius: 16px;
  padding: 16px 18px;
  background: #f7fbff;
  border: 1px solid #deebf8;
}

.finance-card span {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #4f6686;
  margin-bottom: 6px;
}

.finance-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #1a3458;
}

.finance-card small {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #5f7999;
}

.finance-card.is-positive {
  background: #ebfaf4;
  border-color: #c5eede;
}

.finance-card.is-positive strong {
  color: #0f775b;
}

.finance-card.is-negative {
  background: #fff2f0;
  border-color: #f5d0cc;
}

.finance-card.is-negative strong {
  color: #b24037;
}

.mini-card {
  min-width: 172px;
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(77, 198, 182, 0.3);
  border: 1px solid rgba(189, 238, 226, 0.26);
  backdrop-filter: blur(4px);
}

.mini-card strong {
  display: block;
  font-size: 44px;
  line-height: 1;
  margin-bottom: 4px;
}

.mini-card p {
  margin: 0;
  font-size: 13px;
  color: #d8f0f2;
}

.table-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 24px;
}

.table-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  min-width: 0;
}

.table-top h3 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 36px;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #1b3153;
  white-space: normal;
  flex-shrink: 0;
}

.table-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1 1 700px;
  justify-content: flex-end;
  flex-wrap: wrap;
  max-width: 100%;
  min-width: 0;
}

.table-filter-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1 1 560px;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.table-actions select,
.product-search,
.btn-sync,
.btn-new,
.btn-apply {
  height: 50px;
  border-radius: 15px;
}

.table-actions select {
  min-width: 148px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #4d627e;
  border: 1px solid var(--line);
  background: #fbfdff;
  outline: none;
}

.product-search {
  width: auto;
  flex: 1 1 320px;
  min-width: 220px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8b9ab0;
  padding: 0 12px;
}

.product-search svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.product-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  color: #4c607c;
  font-size: 16px;
}

.btn-new {
  border: 0;
  min-width: 160px;
  background: linear-gradient(130deg, #0d8b87 0%, #169e8f 100%);
  color: #eafffc;
  font-family: inherit;
  font-weight: 800;
  font-size: 16px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 12px 20px rgba(16, 138, 128, 0.24);
  text-decoration: none;
}

.btn-sync {
  border: 1px solid #d4e3f1;
  min-width: 152px;
  background: #f3f8ff;
  color: #2a5a92;
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}

.btn-new span {
  font-size: 22px;
  line-height: 1;
}

.btn-apply {
  border: 1px solid var(--line);
  min-width: 82px;
  padding: 0 14px;
  background: #f8fbff;
  color: #4d627e;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.table-shell {
  width: 100%;
  max-width: 100%;
  border: 1px solid #dce8f4;
  border-radius: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

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

thead th {
  background: #f6f9fd;
  color: #4f6483;
  text-align: left;
  font-size: 15px;
  font-weight: 800;
  padding: 16px 14px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #dfe9f4;
  white-space: nowrap;
}

tbody td {
  padding: 0;
}

.product-row td {
  padding: 15px 14px;
  border-bottom: 1px solid #ebf1f8;
  color: #2d4161;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  vertical-align: top;
}

.product-row td:nth-child(2) {
  font-weight: 700;
  color: #1f365c;
}

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

.product-row:last-child td {
  border-bottom: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.status-ok {
  color: #146f59;
  background: #dff6eb;
}

.status-stock-low {
  color: #8a6506;
  background: #fff3cf;
}

.status-low {
  color: #9b3028;
  background: #ffe7e3;
}

.finance-badge.finance-lucro {
  color: #0f775b;
  background: #ddf8ee;
}

.finance-badge.finance-prejuizo {
  color: #a13a31;
  background: #ffe8e4;
}

.finance-badge.finance-empate {
  color: #435c7b;
  background: #e9eff7;
}

.finance-cell {
  min-width: 250px;
}

.finance-hover {
  position: relative;
  display: block;
  width: 100%;
  outline: none;
  cursor: pointer;
}

.finance-compact {
  border: 1px solid #dbe7f3;
  border-radius: 11px;
  background: #f8fbff;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.finance-compact-values {
  display: grid;
  gap: 2px;
  text-align: right;
}

.finance-compact-values strong {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
}

.finance-compact-values .positive {
  color: #0f7f62;
}

.finance-compact-values .negative {
  color: #ad3f34;
}

.finance-compact-values .neutral {
  color: #4e6483;
}

.finance-popover {
  min-width: 0;
  max-width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #ffffff;
  padding: 0 10px;
  margin-top: 0;
  box-shadow: none;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-2px);
  transition: opacity 0.2s ease, max-height 0.2s ease, margin-top 0.2s ease, padding 0.2s ease, transform 0.2s ease;
}

.finance-popover p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.finance-popover span {
  font-size: 12px;
  color: #637a99;
  font-weight: 700;
}

.finance-popover strong {
  font-size: 13px;
  color: #1f3a62;
  font-weight: 800;
}

.finance-edit-sold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid #d2e2f3;
  background: #f0f7ff;
  color: #2b5f97;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 8px;
}

.finance-sync-sold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid #d2e2f3;
  background: #eaf4ff;
  color: #245583;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 8px;
}

.finance-popover-actions {
  margin-top: 6px;
  display: flex;
  gap: 6px;
}

.finance-hover:hover .finance-popover,
.finance-hover:focus-within .finance-popover {
  opacity: 1;
  max-height: 220px;
  margin-top: 8px;
  padding: 10px;
  border-color: #d5e3f2;
  box-shadow: 0 14px 28px rgba(19, 47, 84, 0.18);
  transform: translateY(0);
}

.product-row:hover .finance-compact {
  background: #f0f6ff;
  border-color: #cfdeef;
}

.action-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 244px;
}

.action-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border-radius: 9px;
  padding: 7px 10px;
  border: 1px solid transparent;
}

.action-edit {
  color: #1d4f9a;
  background: #e8f0ff;
  border-color: #d7e4fa;
}

.action-in {
  color: #0f856f;
  background: #def7f1;
  border-color: #c8eee4;
}

.action-out {
  color: #986000;
  background: #fff2db;
  border-color: #f6e4bf;
}

.action-delete {
  color: #8f2923;
  background: #ffe3e0;
  border-color: #f5cfcb;
}

.empty-row td {
  height: 204px;
}

.empty-state {
  width: 100%;
  height: 100%;
  text-align: center;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 22px 16px;
  color: #5a6f8c;
}

.empty-state h4 {
  margin: 0;
  font-size: 24px;
  color: #273f60;
}

.empty-state p {
  margin: 0;
  font-size: 16px;
}

.btn-register {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 48px;
  min-width: 180px;
  margin: 8px auto 0;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  color: #eafdf8;
  background: linear-gradient(130deg, #0f8a85, #148e80);
  box-shadow: 0 10px 20px rgba(10, 120, 108, 0.25);
}

.flash-message {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
}

.flash-success {
  color: #0f6f57;
  background: #dff8ed;
  border: 1px solid #bdebd7;
}

.flash-error {
  color: #902f28;
  background: #ffe7e5;
  border: 1px solid #f5c8c3;
}

.page-bg-crud {
  background: transparent;
}

.crud-wrapper {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px;
}

.crud-wrapper-wide {
  width: 100%;
}

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

.crud-header h1 {
  margin: 0;
  font-size: clamp(34px, 2.3vw, 44px);
  color: #1a3255;
  letter-spacing: -0.02em;
}

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

.crud-nav a {
  text-decoration: none;
  color: #27507f;
  background: #edf3fb;
  border: 1px solid #d5e2f1;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.crud-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.crud-form label {
  display: grid;
  gap: 6px;
  color: #355277;
  font-size: 14px;
  font-weight: 700;
}

.crud-form input,
.crud-form select {
  height: 46px;
  border-radius: 10px;
  border: 1px solid #cfdeef;
  background: #fff;
  padding: 0 12px;
  font-family: inherit;
  font-size: 15px;
  color: #294363;
  outline: none;
}

.crud-form input:focus,
.crud-form select:focus {
  border-color: #60a8cd;
  box-shadow: 0 0 0 3px rgba(96, 168, 205, 0.18);
}

.crud-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.btn-primary,
.btn-secondary {
  height: 44px;
  border-radius: 12px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.btn-primary {
  border: 0;
  background: linear-gradient(130deg, #0d8b87 0%, #169e8f 100%);
  color: #ecfffb;
}

.btn-secondary {
  border: 1px solid #ccdae8;
  background: #f8fbff;
  color: #3b5a80;
}

.product-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.product-meta p {
  margin: 0;
  background: #f4f9ff;
  border: 1px solid #dae8f5;
  border-radius: 10px;
  padding: 10px 12px;
  color: #35567e;
  font-size: 14px;
}

.crud-wrapper .table-shell {
  margin-top: 10px;
}

.crud-wrapper table {
  min-width: 0;
}

.crud-wrapper .table-shell thead th {
  font-size: 19px;
  padding: 20px 18px;
}

.crud-wrapper .table-shell .product-row td {
  font-size: 18px;
  padding: 18px 18px;
}

.crud-wrapper .table-shell .status-badge {
  font-size: 15px;
  padding: 8px 14px;
}

.crud-wrapper .empty-state h4 {
  font-size: 24px;
}

.crud-wrapper .empty-state p {
  font-size: 16px;
}

.login-page {
  min-height: calc(100vh - (var(--layout-pad) * 2));
  display: grid;
  place-items: center;
  background:
    radial-gradient(42rem 24rem at 16% 18%, rgba(54, 151, 176, 0.22), transparent 65%),
    radial-gradient(42rem 24rem at 86% 82%, rgba(27, 95, 171, 0.18), transparent 65%);
}

.login-wrapper {
  width: min(560px, 100%);
  padding: 34px 34px 30px;
  border-radius: 26px;
  box-shadow:
    0 22px 44px rgba(13, 42, 82, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.login-brand-mark {
  width: 66px;
  height: 66px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, rgba(25, 147, 160, 0.2), rgba(25, 72, 142, 0.14));
}

.login-brand-mark svg {
  width: 56px;
  height: 56px;
}

.login-brand-text {
  display: grid;
  gap: 2px;
}

.login-brand-text strong {
  color: #17375f;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.login-brand-text span {
  color: #4d6889;
  font-size: 16px;
  font-weight: 600;
}

.login-wrapper h1 {
  margin: 0 0 8px;
  color: #1d365a;
  font-size: 42px;
  letter-spacing: -0.02em;
}

.login-subtitle {
  margin: 0 0 20px;
  color: #5a7293;
  font-size: 20px;
  line-height: 1.35;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: #355277;
  font-size: 20px;
  font-weight: 700;
}

.login-form input {
  height: 56px;
  border-radius: 12px;
  border: 1px solid #cfdeef;
  background: #fff;
  padding: 0 14px;
  font-family: inherit;
  font-size: 18px;
  color: #294363;
  outline: none;
}

.login-form input:focus {
  border-color: #60a8cd;
  box-shadow: 0 0 0 3px rgba(96, 168, 205, 0.18);
}

.login-btn {
  width: 100%;
  margin-top: 8px;
  height: 56px;
  font-size: 18px;
  font-weight: 800;
}

.btn-new,
.btn-sync,
.btn-primary,
.btn-secondary,
.btn-apply,
.action-link,
.surface {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.btn-new:hover,
.btn-sync:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-apply:hover,
.action-link:hover {
  transform: translateY(-1px);
}

.btn-new:active,
.btn-sync:active,
.btn-primary:active,
.btn-secondary:active,
.btn-apply:active,
.action-link:active {
  transform: translateY(0) scale(0.985);
}

.btn-new:hover,
.btn-primary:hover {
  filter: saturate(1.07);
}

.main-content > * {
  animation: fadeUp 0.5s ease both;
}

.main-content > *:nth-child(2) {
  animation-delay: 0.06s;
}

.main-content > *:nth-child(3) {
  animation-delay: 0.1s;
}

.main-content > *:nth-child(4) {
  animation-delay: 0.14s;
}

.main-content > *:nth-child(5) {
  animation-delay: 0.18s;
}

.crud-wrapper,
.login-wrapper {
  animation: fadeUp 0.45s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes navItemIntro {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes sidebarTextureDrift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(0, -10px, 0) scale(1.015);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1380px) {
  .header-card {
    flex-direction: column;
  }

  .header-tools {
    width: 100%;
  }

  .search-input {
    width: 100%;
    flex: 1;
  }

  .product-search {
    width: auto;
  }
}

@media (max-width: 980px) {
  .page-bg {
    background: transparent;
  }

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

  .sidebar {
    padding: 16px;
    border-radius: 24px;
    min-height: auto;
  }

  .sidebar-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  .brand {
    margin: 0;
    padding: 0;
  }

  .sidebar-caption {
    display: none;
  }

  .sidebar-nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-item {
    flex: 1 1 180px;
    height: 48px;
    padding: 0 14px;
    font-size: 16px;
    white-space: normal;
  }

  .header-card {
    min-height: auto;
    padding: 22px;
  }

  .header-copy h2 {
    font-size: clamp(44px, 8.3vw, 58px);
  }

  .header-tools {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .header-search-form {
    width: 100%;
  }

  .search-input {
    width: 100%;
  }

  .user-chip {
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 12px 16px;
  }

  .user-chip strong {
    font-size: 20px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .operation-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .finance-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .finance-grid {
    grid-template-columns: 1fr;
  }

  .table-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .table-filter-form {
    width: 100%;
    flex-wrap: wrap;
  }

  .product-search {
    width: 100%;
    flex: 1;
    min-width: 220px;
  }

  .btn-new {
    min-width: 0;
  }

  table {
    min-width: 1180px;
  }

  thead th {
    font-size: 14px;
    padding: 14px 12px;
  }

  .product-row td {
    font-size: 15px;
    padding: 12px;
  }

  .status-badge {
    font-size: 14px;
  }

  .finance-cell {
    min-width: 230px;
  }

  .finance-compact-values strong {
    font-size: 12px;
  }

  .finance-popover span {
    font-size: 11px;
  }

  .finance-popover strong {
    font-size: 12px;
  }

  .action-link {
    font-size: 14px;
    padding: 6px 9px;
  }

  .crud-form {
    grid-template-columns: 1fr;
  }

  .crud-wrapper {
    min-height: auto;
    padding: 22px;
  }

  .crud-header h1 {
    font-size: clamp(34px, 5vw, 44px);
  }

  .crud-nav a {
    font-size: 15px;
    padding: 9px 12px;
  }

  .crud-form label {
    font-size: 17px;
  }

  .crud-form input,
  .crud-form select {
    height: 52px;
    font-size: 18px;
  }

  .btn-primary,
  .btn-secondary {
    height: 48px;
    font-size: 17px;
  }

  .crud-wrapper .table-shell table {
    min-width: 900px;
  }

  .crud-wrapper .table-shell thead th {
    font-size: 18px;
    padding: 14px 12px;
  }

  .crud-wrapper .table-shell .product-row td {
    font-size: 16px;
    padding: 14px 12px;
  }

  .crud-wrapper .table-shell .status-badge {
    font-size: 14px;
  }

  .crud-wrapper .empty-state h4 {
    font-size: 25px;
  }

  .crud-wrapper .empty-state p {
    font-size: 17px;
  }

  .product-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  :root {
    --layout-pad: 10px;
  }

  .page-bg {
    padding: 10px;
  }

  .surface {
    border-radius: 20px;
  }

  .app-layout {
    gap: 10px;
  }

  .sidebar {
    border-radius: 18px;
    padding: 12px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 12px;
  }

  .brand-mark svg {
    width: 42px;
    height: 42px;
  }

  .brand-text h1 {
    font-size: 18px;
  }

  .nav-item {
    flex: 1 1 100%;
    font-size: 15px;
    height: 44px;
    border-radius: 12px;
  }

  .main-content {
    gap: 12px;
  }

  .header-card {
    padding: 16px;
  }

  .section-kicker {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .header-copy h2 {
    font-size: clamp(40px, 13vw, 52px);
    margin-bottom: 6px;
  }

  .header-copy p {
    font-size: 16px;
    line-height: 1.35;
  }

  .search-input {
    height: 52px;
    border-radius: 16px;
    padding: 0 12px;
  }

  .search-input input {
    font-size: 16px;
  }

  .user-chip {
    border-radius: 16px;
  }

  .user-icon {
    width: 42px;
    height: 42px;
  }

  .user-chip strong {
    font-size: 18px;
  }

  .user-chip p {
    font-size: 14px;
  }

  .metric-card {
    min-height: 158px;
    padding: 14px 14px 12px;
  }

  .metric-icon {
    width: 46px;
    height: 46px;
  }

  .metric-icon svg {
    width: 22px;
    height: 22px;
  }

  .metric-card h3 {
    margin-top: 10px;
    font-size: 18px;
  }

  .metric-value {
    font-size: 46px;
  }

  .metric-card p {
    max-width: 100%;
    font-size: 15px;
  }

  .art-product {
    width: 188px;
    height: 124px;
    right: -12px;
  }

  .art-stock {
    width: 176px;
    height: 92px;
  }

  .art-alert {
    width: 162px;
    height: 84px;
  }

  .operation-banner {
    padding: 16px;
    border-radius: 18px;
    min-height: auto;
  }

  .operation-badge {
    font-size: 11px;
    padding: 8px 12px;
    margin-bottom: 8px;
  }

  .operation-copy h3 {
    font-size: 28px;
  }

  .operation-copy p {
    font-size: 15px;
  }

  .operation-mini {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mini-card {
    min-width: 0;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
  }

  .mini-card strong {
    font-size: 34px;
  }

  .finance-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .finance-head h3 {
    font-size: 24px;
  }

  .finance-head p {
    font-size: 14px;
  }

  .finance-card {
    padding: 12px 14px;
  }

  .finance-card strong {
    font-size: 24px;
  }

  .table-card {
    padding: 12px;
  }

  .table-top h3 {
    font-size: 32px;
  }

  .table-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .table-filter-form {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .table-actions select,
  .product-search,
  .btn-sync,
  .btn-apply,
  .btn-new {
    width: 100%;
    min-width: 0;
    height: 46px;
    font-size: 16px;
  }

  .btn-new {
    justify-content: center;
  }

  .finance-popover-actions {
    width: 100%;
    flex-direction: column;
  }

  .table-shell {
    border-radius: 14px;
  }

  table {
    min-width: 1000px;
  }

  thead th {
    font-size: 14px;
    padding: 12px 10px;
  }

  .product-row td {
    font-size: 14px;
    padding: 10px;
  }

  .status-badge {
    font-size: 13px;
    padding: 6px 10px;
  }

  .finance-cell {
    min-width: 220px;
  }

  .finance-compact {
    padding: 7px 8px;
  }

  .finance-compact-values strong {
    font-size: 11px;
  }

  .finance-popover p {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .finance-popover span,
  .finance-popover strong {
    font-size: 11px;
    line-height: 1.2;
  }

  .action-link {
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 8px;
  }

  .crud-wrapper {
    padding: 16px;
    border-radius: 18px;
  }

  .crud-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .crud-header h1 {
    font-size: 30px;
  }

  .crud-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .crud-nav a {
    flex: 1 1 120px;
    text-align: center;
    font-size: 14px;
    padding: 10px 12px;
  }

  .crud-form label {
    font-size: 15px;
  }

  .crud-form input,
  .crud-form select {
    height: 48px;
    font-size: 16px;
  }

  .crud-actions {
    width: 100%;
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    height: 46px;
    font-size: 16px;
  }

  .empty-state h4 {
    font-size: 21px;
  }

  .empty-state p {
    font-size: 15px;
  }

  .login-wrapper {
    padding: 24px 20px;
  }

  .login-brand-text strong {
    font-size: 26px;
  }

  .login-wrapper h1 {
    font-size: 34px;
  }

  .login-subtitle {
    font-size: 17px;
  }

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

  .login-form input,
  .login-btn {
    font-size: 16px;
    height: 52px;
  }
}
