:root {
  --bg: #faf8f1;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-border: rgba(0, 0, 0, 0.08);
  --text: #000000;
  --muted: #5f5a49;
  --primary: #eeb704;
  --primary-dark: #bb8f00;
  --success: #129c74;
  --warning: #cf8d16;
  --hero-a: #fff8dc;
  --hero-b: #fff3b3;
}

html,
body {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(15, 109, 255, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(18, 156, 116, 0.15), transparent 22%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
}

body.login-page {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.34), transparent 20%),
    radial-gradient(circle at 82% 16%, rgba(255, 255, 255, 0.18), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(238, 183, 4, 0.12), transparent 42%),
    linear-gradient(145deg, #fff8dc 0%, #fff3b3 45%, #f9e27b 100%);
}

*,
.title,
.hero-title,
button,
input,
select,
textarea {
  font-family: "DM Sans", sans-serif;
}

.app-shell {
  min-height: 100vh;
}

.app-hero {
  background:
    linear-gradient(120deg, rgba(255, 248, 220, 0.98), rgba(255, 243, 179, 0.98)),
    linear-gradient(45deg, rgba(238, 183, 4, 0.06), transparent 50%);
  color: var(--text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.06);
}

.hero-title {
  color: var(--text);
  margin-bottom: 0.25rem !important;
}

.hero-subtitle,
.user-panel p,
.nav-brand-text span {
  color: rgba(0, 0, 0, 0.68);
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-height: 72px;
}

.brand-logo {
  max-height: 72px;
  max-width: 240px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.08));
}

.nav-logo {
  max-height: 36px;
  max-width: 140px;
  filter: none;
}

.preview-logo {
  max-height: 90px;
  max-width: 100%;
  filter: none;
}

.brand-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(238, 183, 4, 0.18);
  color: #000;
  font-size: 1.45rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.app-hero .eyebrow {
  color: rgba(0, 0, 0, 0.5);
}

.user-badge {
  display: inline-block;
  margin-bottom: 0.5rem;
  border-radius: 999px;
  background: #000;
  color: #eeb704;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}

.user-panel .has-text-right {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  min-width: 250px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.user-card-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.user-card-link:hover,
.user-card-link:focus {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.08);
  outline: none;
}

.user-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.user-panel strong {
  color: #000;
}

.top-user-avatar,
.table-avatar,
.avatar-preview {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid rgba(238, 183, 4, 0.7);
  background: #fff;
}

.top-user-avatar.placeholder,
.table-avatar.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000;
  background: rgba(238, 183, 4, 0.18);
}

.table-avatar {
  width: 42px;
  height: 42px;
  border-width: 2px;
}

.main-navbar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--panel-border);
}

.main-navbar .navbar-item {
  gap: 0.5rem;
  font-weight: 600;
  color: #000;
}

.main-navbar .navbar-item i {
  color: var(--primary);
}

.nav-brand-text {
  gap: 0.6rem;
  font-weight: 700;
}

.main-content {
  padding: 2rem 1.5rem 3rem;
}

.login-page-main {
  min-height: 100vh;
  padding: 0;
}

.overdue-alert {
  border: 1px solid rgba(207, 62, 47, 0.18);
  box-shadow: 0 16px 36px rgba(207, 62, 47, 0.12);
}

.soft-box,
.metric-card,
.product-card,
.mini-card,
.login-card {
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  box-shadow: 0 18px 50px rgba(16, 36, 58, 0.08);
}

.metric-card {
  border-radius: 24px;
  padding: 1.4rem;
}

.metric-card.is-warning {
  background: linear-gradient(135deg, rgba(255, 243, 212, 0.95), rgba(255, 255, 255, 0.85));
}

.metric-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(238, 183, 4, 0.14);
  color: #000;
  margin-bottom: 0.9rem;
}

.metric-label,
.small-label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.metric-value {
  font-size: 2rem;
  font-family: "DM Sans", sans-serif;
  font-weight: 800;
}

.page-header,
.content-block-title,
.order-card-head,
.product-card-head,
.print-head,
.login-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.page-header {
  margin-bottom: 1.25rem;
}

.search-inline {
  min-width: 320px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
  gap: 1rem;
  justify-content: start;
}

.product-card,
.mini-card,
.order-card {
  border-radius: 24px;
  padding: 1.25rem;
}

.product-card {
  width: 100%;
}

.product-card-square {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.product-cover img {
  border-radius: 18px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  height: auto;
  width: 100%;
}

.product-card .tags {
  min-height: 48px;
}

.sku-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: rgba(238, 183, 4, 0.18);
  color: #000;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.price-preview {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(238, 183, 4, 0.09);
}

.order-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px dashed rgba(16, 36, 58, 0.12);
}

.order-line-main {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.order-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.order-list-item {
  width: 100%;
}

.order-list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.order-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 1rem;
}

.signature-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.signature-box {
  min-height: 120px;
  border-top: 2px solid #10243a;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.75rem;
}

.icon-pill {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(15, 109, 255, 0.16), rgba(18, 156, 116, 0.18));
  color: var(--primary);
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-screen .columns {
  width: 100%;
  margin: 0;
  justify-content: center;
}

.login-screen .column {
  display: flex;
  justify-content: center;
  padding: 0.75rem;
}

.login-card {
  width: min(100%, 520px);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 26px 60px rgba(187, 143, 0, 0.12);
  overflow: hidden;
}

.login-card-content {
  width: 100%;
  padding: 2.25rem 2.25rem 2rem;
}

.login-logo-box {
  display: flex;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.login-form-logo {
  max-height: 58px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
}

.login-form-logo.placeholder {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #000;
  font-size: 1.6rem;
}

.login-card .input {
  height: 3.4rem;
  border-radius: 16px;
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  box-shadow: none;
}

.login-card .label {
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
}

.login-card .control.has-icons-left .input {
  padding-left: 2.75rem;
}

.login-card .input:focus {
  border-color: rgba(238, 183, 4, 0.9);
  box-shadow: 0 0 0 0.125em rgba(238, 183, 4, 0.16);
}

.login-footer-actions {
  margin-top: 1.5rem;
}

.login-footer-actions .button.is-dark {
  background: #000;
  color: #fff;
  border-color: #000;
}

.login-footer-actions .button.is-dark:hover,
.login-footer-actions .button.is-dark:focus {
  background: #111;
  border-color: #111;
  color: #fff;
}

.variation-row {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(16, 36, 58, 0.08);
}

.logo-preview-box {
  min-height: 110px;
  border-radius: 18px;
  border: 1px dashed rgba(16, 36, 58, 0.18);
  background: rgba(238, 183, 4, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.soft-note {
  border: 1px solid rgba(238, 183, 4, 0.24);
  background: rgba(238, 183, 4, 0.1);
  color: #000;
}

.dropzone-card {
  position: relative;
  border: 1px dashed rgba(16, 36, 58, 0.18);
  border-radius: 18px;
  background: rgba(238, 183, 4, 0.08);
  transition: 0.2s ease;
  cursor: pointer;
}

.dropzone-card:hover,
.dropzone-card.is-dragover {
  border-color: rgba(238, 183, 4, 0.7);
  background: rgba(238, 183, 4, 0.14);
  transform: translateY(-1px);
}

.dropzone-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone-preview {
  min-height: 150px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
}

.dropzone-preview.compact {
  min-height: 124px;
}

.dropzone-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(238, 183, 4, 0.18);
  color: #000;
  font-size: 1.2rem;
}

.dropzone-title {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.dropzone-help,
.dropzone-file-name {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.dropzone-image-preview {
  max-width: 100%;
  max-height: 140px;
  border-radius: 14px;
  object-fit: contain;
}

.avatar-preview {
  max-width: none;
  max-height: none;
}

.report-page .print-box {
  background: #fff;
}

@media print {
  body {
    background: #fff;
  }

  .app-hero,
  .main-navbar,
  .no-print,
  .notification {
    display: none !important;
  }

  .main-content {
    padding: 0;
  }

  .print-box,
  .soft-box {
    box-shadow: none;
    border: none;
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .order-list-header {
    flex-direction: column;
  }

  .order-meta-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .user-card {
    align-items: flex-start;
  }

  .login-screen {
    padding: 1rem;
  }

  .login-card {
    width: 100%;
  }

  .login-card-content {
    padding: 1.5rem 1.25rem 1.4rem;
  }
}
