:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fff8ee;
  --surface-strong: #ffffff;
  --border: #eee4d3;
  --text: #161616;
  --muted: #585858;
  --accent: #f08720;
  --accent-yellow: #fdd224;
  --accent-red: #bd1724;
  --accent-coral: #e4332b;
  --green-dark: #008442;
  --green: #7fa933;
  --lime: #bebd00;
  --blue: #069dbb;
  --shadow: 0 22px 48px rgba(22, 22, 22, 0.08);
  --shadow-soft: 0 12px 28px rgba(22, 22, 22, 0.06);
  --radius: 8px;
  --radius-lg: 20px;
  --font: "Montserrat", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(circle at top right, rgba(240, 135, 32, 0.06), transparent 26%),
    radial-gradient(circle at left center, rgba(6, 157, 187, 0.04), transparent 24%),
    #fffdf9;
  color: var(--text);
}

.hidden { display: none !important; }

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

body.auth-mode .shell {
  grid-template-columns: 1fr;
}

.sidebar {
  position: relative;
  padding: 22px 18px 24px;
  background: #ffffff;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  border-right: 1px solid var(--border);
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 0;
  bottom: 22px;
  width: 2px;
  background: var(--accent-red);
}

body.auth-mode .sidebar,
body.auth-mode .topbar {
  display: none;
}

.brand-logo {
  width: 92px;
  height: 92px;
  object-fit: cover;
  background: #ffffff;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(240, 135, 32, 0.18);
  box-shadow: 0 10px 20px rgba(22, 22, 22, 0.05);
}

.brand-logo--full {
  width: 170px;
  height: auto;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0 auto;
}

.eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 600;
}

.topbar h2,
.panel-header h3,
.hero h3 {
  margin: 0;
  font-weight: 700;
}
.hero p {
  line-height: 1.7;
  color: var(--muted);
}

.nav-cards {
  display: grid;
  gap: 8px;
  width: 100%;
}

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

.nav-subfilters {
  display: grid;
  gap: 6px;
  padding-left: 12px;
}

.nav-subfilters__item {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.nav-subfilters__item:hover,
.nav-subfilters__item:focus-visible {
  color: var(--accent);
}

.nav-subfilters__item.is-active {
  color: var(--accent-red);
}

.sidebar-mascot {
  margin-top: auto;
  padding-top: 10px;
}

.sidebar-mascot__gif {
  display: block;
  width: 100%;
  max-width: 150px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  opacity: 0.98;
}

.nav-cards button,
.ghost {
  border: 0;
  border-radius: var(--radius);
  padding: 10px 12px;
  font: inherit;
  cursor: pointer;
}

.nav-cards button {
  background: linear-gradient(135deg, var(--accent), #f29a38);
  color: #ffffff;
  font-weight: 600;
  text-align: left;
  border: 1px solid rgba(240, 135, 32, 0.22);
  box-shadow: 0 8px 18px rgba(240, 135, 32, 0.16);
  font-size: 13px;
  line-height: 1.2;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.nav-cards button:hover,
.nav-cards button:focus-visible {
  background: linear-gradient(135deg, #ec7c11, var(--accent));
  border-color: rgba(240, 135, 32, 0.42);
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-cards button.is-active {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-coral));
  border-color: rgba(189, 23, 36, 0.34);
  box-shadow: 0 10px 20px rgba(189, 23, 36, 0.18);
}

.main {
  padding: 28px;
}

body.auth-mode .main {
  padding: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.topbar h2 {
  font-size: 34px;
  line-height: 1.02;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

#userBadge {
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff8ee;
  border: 1px solid #f3dfbf;
  color: var(--text);
  font-weight: 500;
}

.ghost {
  background: transparent;
  color: var(--blue);
  border: 1px solid rgba(6, 157, 187, 0.24);
  font-weight: 600;
}

.ghost:hover,
.ghost:focus-visible {
  background: rgba(6, 157, 187, 0.08);
}

.panel,
.hero,
.content-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 28px;
  max-width: 520px;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(460px, 1.2fr) minmax(360px, 520px);
  gap: 34px;
  align-items: center;
  padding: 32px;
  background: #fffdf9;
}

.auth-visual {
  position: relative;
  min-height: 720px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #f08720 0%, #fdd224 48%, #e4332b 100%);
}

.auth-visual::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22px;
  background:
    linear-gradient(100deg,
      var(--lime) 0%,
      var(--lime) 11%,
      var(--accent) 11%,
      var(--accent) 20%,
      var(--accent-yellow) 20%,
      var(--accent-yellow) 28%,
      var(--green) 28%,
      var(--green) 43%,
      var(--blue) 43%,
      var(--blue) 50%,
      var(--lime) 50%,
      var(--lime) 58%,
      #ffbf2f 58%,
      #ffbf2f 65%,
      var(--green-dark) 65%,
      var(--green-dark) 77%,
      var(--accent) 77%,
      var(--accent) 89%,
      var(--accent-yellow) 89%,
      var(--accent-yellow) 100%);
  z-index: 2;
}

.hero-carousel,
.hero-slide,
.visual-overlay {
  position: absolute;
  inset: 0;
}

.hero-slide {
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: premioHeroRotate 30s infinite;
}

.hero-slide-1 { background-image: url('/assets/login-01.png'); animation-delay: 0s; }
.hero-slide-2 { background-image: url('/assets/login-02.png'); animation-delay: 6s; }
.hero-slide-3 { background-image: url('/assets/login-03.png'); animation-delay: 12s; }
.hero-slide-4 { background-image: url('/assets/login-04.png'); animation-delay: 18s; }
.hero-slide-5 { background-image: url('/assets/login-05.png'); animation-delay: 24s; }

.visual-overlay {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(16, 16, 16, 0.16)),
    linear-gradient(135deg, rgba(189, 23, 36, 0.08), rgba(0, 0, 0, 0.02) 42%, rgba(240, 135, 32, 0.08));
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 54px;
  color: #ffffff;
}

.hero-logo-card {
  width: fit-content;
  max-width: 180px;
  height: auto;
  padding: 6px;
  border-radius: 10px;
  background: #ffffff;
  border: 0;
  box-shadow: 0 14px 28px rgba(22, 22, 22, 0.14);
  margin-bottom: 28px;
  overflow: visible;
}

.hero-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hero-logo--login {
  filter: none;
}

.auth-screen .eyebrow {
  color: rgba(255, 255, 255, 0.92);
}

.auth-visual h3 {
  font-size: 58px;
  line-height: 0.94;
  margin: 0 0 18px;
  max-width: 680px;
}

.hero-copy {
  max-width: 560px;
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.96);
}

.login-card {
  justify-self: stretch;
  max-width: none;
  padding: 36px 34px 30px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #f1e5d1;
  box-shadow: var(--shadow);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(240, 135, 32, 0.10);
  color: var(--accent-red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-card h2 {
  margin: 20px 0 10px;
  font-size: 36px;
  line-height: 1.02;
  color: var(--text);
}

.login-card > p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.65;
}

.auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  flex-wrap: nowrap;
}

.auth-links__group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.auth-links__label {
  color: #8b8b8b;
  font-size: 13px;
  font-weight: 400;
}

.text-link {
  padding: 0;
  color: var(--accent-red);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-transform: none;
  text-decoration: none;
  line-height: 1.2;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--accent-coral);
  text-decoration: underline;
}

.text-link--secondary {
  justify-self: end;
  text-transform: none;
  font-weight: 500;
}

.auth-help-card {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff8ee;
  border: 1px solid #f3dfbf;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.auth-form input,
.catalog-controls input {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-strong);
  font: inherit;
  color: var(--text);
}

.catalog-controls input:focus,
.auth-form input:focus {
  outline: 2px solid rgba(6, 157, 187, 0.14);
  border-color: var(--blue);
}

.auth-form button {
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-red), var(--accent-coral));
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(189, 23, 36, 0.18);
}

.auth-form button:hover,
.auth-form button:focus-visible,
.catalog-controls button:hover,
.catalog-controls button:focus-visible {
  filter: brightness(1.03);
}

.error-text {
  color: var(--accent-red);
  min-height: 22px;
  margin: 0;
}

.hero {
  position: relative;
  padding: 28px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  margin-bottom: 22px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 0;
  height: 2px;
  background: var(--accent-red);
}

.hero h3 {
  font-size: 38px;
  line-height: 1.02;
}

.hero p {
  color: var(--muted);
}

.hero-metrics,
.content-grid {
  display: grid;
  gap: 16px;
}

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

.workspace-summary {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}

.summary-panel {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #fffaf1 100%);
  box-shadow: var(--shadow-soft);
}

.summary-panel--wide {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 238, 0.98)),
    linear-gradient(90deg, rgba(240, 135, 32, 0.04), rgba(6, 157, 187, 0.03));
}

.summary-panel h3,
.summary-panel strong {
  display: block;
  margin: 0 0 10px;
  color: var(--text);
}

.summary-panel h3 {
  font-size: 28px;
  line-height: 1.05;
}

.summary-panel strong {
  font-size: 20px;
  line-height: 1.15;
}

.summary-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.metric,
.content-card {
  padding: 20px;
  background: var(--surface-strong);
}

.metric {
  border: 1px solid #f0e5d2;
}

.metric .eyebrow {
  color: var(--blue);
}

.metric strong {
  display: block;
  font-size: 30px;
  margin-top: 6px;
  color: var(--text);
}

.content-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-card h4 {
  margin: 0 0 10px;
  color: var(--accent-red);
  font-size: 22px;
  line-height: 1.1;
}

.content-card p {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
}

.workspace-panel {
  max-width: none;
  margin-bottom: 22px;
}

.inline-panel-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.catalog-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.catalog-controls button {
  border: 0;
  border-radius: var(--radius);
  padding: 12px 16px;
  min-height: 48px;
  background: linear-gradient(135deg, var(--accent-red), var(--accent-coral));
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 12px 22px rgba(189, 23, 36, 0.14);
}

.catalog-meta {
  margin-bottom: 14px;
  color: var(--muted);
}

.table-shell {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.data-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f2e7d7;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  top: 0;
  background: #fff5e4;
  color: var(--accent-red);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.data-table tr:hover td {
  background: #fffaf1;
}

.data-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@keyframes premioHeroRotate {
  0% { opacity: 0; transform: scale(1.03); }
  4% { opacity: 1; }
  20% { opacity: 1; transform: scale(1); }
  24% { opacity: 0; }
  100% { opacity: 0; }
}

@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .hero,
  .content-grid,
  .workspace-summary { grid-template-columns: 1fr; }
  .inline-panel-header {
    align-items: start;
    flex-direction: column;
  }
  .auth-screen {
    grid-template-columns: 1fr;
    padding: 22px;
    gap: 22px;
  }
  .auth-visual {
    min-height: 420px;
  }
  .hero-content {
    padding: 30px;
  }
  .auth-visual h3 {
    font-size: 36px;
    max-width: 420px;
  }
  .hero-copy {
    font-size: 16px;
  }
  .login-card h2,
  .topbar h2,
  .hero h3 {
    font-size: 28px;
  }
}
