:root {
  --bg: #fff9fb;
  --surface: #ffffff;
  --surface-soft: #fff3f6;
  --surface-muted: #f8f0f3;
  --line: #f1d9e1;
  --text: #313444;
  --text-soft: #7f8397;
  --primary: #ee2b5b;
  --primary-deep: #d91f4c;
  --pink-soft: #fff0f3;
  --blue-soft: #e0f2fe;
  --yellow-soft: #fef9c3;
  --green-soft: #dcfce7;
  --shadow: 0 20px 48px rgba(238, 43, 91, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --content-width: min(1320px, calc(100% - 32px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 2px 2px, rgba(238, 43, 91, 0.05) 1px, transparent 0),
    linear-gradient(180deg, #fffafb 0%, var(--bg) 100%);
  background-size: 32px 32px, auto;
  color: var(--text);
  font-family: "Quicksand", "Plus Jakarta Sans", "Noto Sans JP", sans-serif;
}

#app {
  min-height: 100vh;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

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

.catalog-site-shell {
  background: linear-gradient(180deg, #fffdf9 0%, #fffaf6 100%);
}

.admin-site-shell {
  background: linear-gradient(180deg, #f6f3ef 0%, #fbfaf8 100%);
}

.app-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid rgba(238, 43, 91, 0.08);
  background: rgba(255, 255, 255, 0.55);
  padding: 30px 22px;
}

.catalog-sidebar {
  border-right-color: rgba(179, 153, 121, 0.14);
  background: linear-gradient(180deg, rgba(255, 254, 250, 0.94), rgba(255, 250, 244, 0.9));
}

.sidebar-inner {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 26px;
}

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

.brand-logo {
  width: 74px;
  height: auto;
  display: block;
}

.brand-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-copy {
  margin: 3px 0 0;
  color: rgba(238, 43, 91, 0.6);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.side-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 18px;
  color: #60677d;
  font-size: 0.92rem;
  font-weight: 700;
}

.side-link.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 28px rgba(238, 43, 91, 0.24);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.tag-pill.pink {
  background: var(--pink-soft);
  color: var(--primary);
}

.tag-pill.blue {
  background: var(--blue-soft);
  color: #3b82f6;
}

.tag-pill.yellow {
  background: var(--yellow-soft);
  color: #b8860b;
}

.helper-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(238, 43, 91, 0.05);
  border: 1px solid rgba(238, 43, 91, 0.1);
}

.helper-card::after {
  content: "★";
  position: absolute;
  right: 10px;
  bottom: 0;
  font-size: 4rem;
  color: rgba(238, 43, 91, 0.06);
}

.helper-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.helper-card p {
  margin: 0;
  color: #6b7084;
  font-size: 0.76rem;
  line-height: 1.7;
}

.catalog-sidebar-box {
  background: rgba(255, 248, 237, 0.88);
}

.catalog-sidebar-box strong {
  display: block;
  margin-bottom: 8px;
  color: #8e6543;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.catalog-guide-tags .tag-pill {
  font-size: 0.7rem;
}

.admin-sidebar {
  background: linear-gradient(180deg, rgba(245, 242, 236, 0.95), rgba(255, 255, 255, 0.86));
  border-right-color: rgba(84, 94, 72, 0.12);
}

.admin-sidebar .brand-copy {
  color: rgba(84, 94, 72, 0.72);
}

.admin-sidebar .side-link {
  background: rgba(255, 255, 255, 0.62);
}

.admin-sidebar .side-link.is-active {
  background: #5f7054;
  box-shadow: 0 14px 28px rgba(95, 112, 84, 0.2);
}

.admin-sidebar-box {
  background: rgba(245, 250, 240, 0.9);
}

.admin-helper-card {
  background: rgba(95, 112, 84, 0.06);
  border-color: rgba(95, 112, 84, 0.16);
}

.admin-helper-card::after {
  color: rgba(95, 112, 84, 0.08);
}

.admin-helper-card strong {
  color: #5f7054;
}

.main-panel {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(238, 43, 91, 0.08);
  backdrop-filter: blur(18px);
}

.catalog-topbar {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(179, 153, 121, 0.12);
}

.admin-topbar {
  background: rgba(250, 249, 246, 0.92);
  border-bottom-color: rgba(84, 94, 72, 0.12);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 700;
}

.topbar-logo {
  width: 72px;
  height: auto;
  display: block;
}

.search-input {
  position: relative;
  width: min(100%, 360px);
}

.topbar-note {
  flex: 1;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 18px;
  background: rgba(255, 240, 243, 0.62);
  color: #6f7488;
  font-size: 0.82rem;
  line-height: 1.5;
}

.catalog-topbar-note {
  background: rgba(255, 248, 237, 0.9);
  color: #75695d;
}

.search-input input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px 0 44px;
  border: 2px solid rgba(238, 43, 91, 0.06);
  border-radius: 18px;
  background: rgba(255, 240, 243, 0.38);
  outline: none;
  color: var(--text);
}

.search-input .material-symbols-outlined {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(238, 43, 91, 0.5);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-box,
.cart-button,
.profile-badge {
  display: inline-grid;
  place-items: center;
  border-radius: 18px;
}

.icon-box,
.cart-button {
  width: 46px;
  height: 46px;
}

.icon-box {
  background: var(--pink-soft);
  color: var(--primary);
}

.icon-box.blue {
  background: var(--blue-soft);
  color: #2563eb;
}

.cart-button {
  position: relative;
  background: var(--blue-soft);
  color: #2563eb;
}

.cart-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
}

.profile-badge {
  width: 46px;
  height: 46px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffd2df, #ffdce7);
  color: var(--primary);
  font-weight: 700;
}

.page {
  padding: 26px 28px 48px;
}

.page-header-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.page-title,
.section-title,
.hero-title,
.product-name,
.profile-name {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Quicksand", sans-serif;
}

.page-title {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
}

.hero-title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.page-lead,
.section-copy,
.product-meta,
.small-text,
.profile-subline,
.helper-text {
  margin: 0;
  color: var(--text-soft);
}

.section-eyebrow,
.hero-eyebrow {
  margin: 0 0 10px;
  color: rgba(238, 43, 91, 0.6);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-actions,
.hero-actions,
.toolbar-actions,
.catalog-actions,
.history-actions,
.summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.secondary-button,
.outline-button,
.filter-chip,
.mode-chip,
.tab-chip {
  min-height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 18px;
  font-weight: 800;
}

.primary-button,
.secondary-button,
.outline-button,
.filter-chip,
.mode-chip,
.tab-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-button {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 30px rgba(238, 43, 91, 0.22);
}

.secondary-button {
  background: var(--pink-soft);
  color: var(--primary);
}

.outline-button {
  background: #fff;
  color: #5f6578;
  border: 2px solid rgba(238, 43, 91, 0.08);
}

.hero-panel,
.page-card,
.sidebar-card,
.summary-card,
.metric-card,
.product-card,
.history-card,
.cart-card,
.table-card,
.profile-panel,
.menu-panel,
.support-panel,
.empty-card {
  background: rgba(255, 255, 255, 0.94);
  border: 4px solid #fff;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
}

.login-hero-panel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  isolation: isolate;
  grid-template-columns: 1fr;
}

.login-background-image,
.login-background-overlay {
  position: absolute;
  inset: 0;
}

.login-background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-background-overlay {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(255, 250, 251, 0.94) 0%, rgba(255, 250, 251, 0.76) 45%, rgba(255, 250, 251, 0.52) 100%),
    linear-gradient(180deg, rgba(255, 244, 230, 0.08) 0%, rgba(255, 249, 251, 0.14) 100%);
}

.login-hero-layout {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
  gap: 24px;
  align-items: end;
}

.login-hero-copy {
  max-width: 720px;
  padding: 12px 8px 12px 4px;
}

.login-hero-side {
  display: grid;
  gap: 14px;
  align-self: stretch;
  justify-content: end;
}

.hero-brand {
  margin-bottom: 12px;
}

.hero-brand-logo {
  width: 148px;
  height: auto;
  display: block;
}

.hero-copy {
  max-width: 650px;
  margin-top: 16px;
  font-size: 0.98rem;
  line-height: 1.9;
  color: var(--text-soft);
}

.hero-points {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.hero-points li {
  position: relative;
  padding-left: 22px;
  color: #6c7286;
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

.hero-visual-note {
  max-width: 240px;
  margin-left: auto;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 36px rgba(49, 52, 68, 0.08);
}

.hero-visual-note p {
  margin: 8px 0 0;
  color: #6f7488;
  font-size: 0.8rem;
  line-height: 1.7;
}

.hero-visual-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(247, 177, 49, 0.16);
  color: #d38a12;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.soft-stat,
.soft-box {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  padding: 16px 18px;
}

.admin-login-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
}

.admin-login-card strong {
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 800;
}

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

.soft-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.soft-box {
  margin-top: auto;
}

.catalog-layout,
.summary-layout,
.dashboard-layout,
.category-grid,
.metrics-grid,
.menu-grid,
.product-grid,
.history-list {
  display: grid;
  gap: 18px;
}

.catalog-layout {
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: start;
}

.summary-layout,
.dashboard-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
}

.admin-management-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.school-layout {
  grid-template-columns: minmax(0, 1fr) 420px;
}

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

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

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

.product-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.sidebar-card,
.page-card,
.summary-card,
.table-card,
.menu-panel,
.support-panel,
.admin-card {
  padding: 22px;
}

.page-card-nested {
  padding: 0;
  box-shadow: none;
  border: 1px solid var(--line);
}

.sticky-panel {
  position: sticky;
  top: 100px;
}

.search-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--surface-muted);
}

.search-block input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip,
.mode-chip,
.tab-chip {
  background: #fff;
  color: #687085;
  border: 2px solid rgba(238, 43, 91, 0.08);
  font-size: 0.8rem;
}

.filter-chip.is-active,
.mode-chip.is-active,
.tab-chip.is-active {
  background: var(--pink-soft);
  border-color: rgba(238, 43, 91, 0.16);
  color: var(--primary);
}

.count-text {
  margin: 10px 0 8px;
  color: var(--primary);
  font-size: 1.6rem;
  font-weight: 800;
}

.summary-box {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 240, 243, 0.4);
}

.admin-header-block {
  margin-bottom: 20px;
}

.admin-operations-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.admin-ops-card {
  padding: 20px 22px;
  border: 1px solid rgba(95, 112, 84, 0.14);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(242, 246, 238, 0.92), rgba(255, 255, 255, 0.98));
  box-shadow: 0 18px 36px rgba(84, 94, 72, 0.08);
}

.admin-overview-card {
  background:
    radial-gradient(circle at top right, rgba(222, 231, 212, 0.7), transparent 28%),
    linear-gradient(180deg, rgba(255, 248, 250, 0.95), rgba(255, 255, 255, 0.98));
}

.admin-preview-banner {
  margin-bottom: 20px;
  border: 1px solid rgba(95, 112, 84, 0.14);
  background: linear-gradient(180deg, rgba(240, 246, 236, 0.94), rgba(255, 255, 255, 0.98));
}

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

.admin-checklist {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.admin-form {
  display: grid;
}

.admin-form-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-mini-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-block {
  display: grid;
  gap: 8px;
}

.field-block label {
  color: #5f6578;
  font-size: 0.82rem;
  font-weight: 700;
}

.field-help {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.75rem;
  line-height: 1.6;
}

.field-block-full {
  grid-column: 1 / -1;
}

.text-input,
.text-area,
.file-input {
  width: 100%;
  border: 2px solid rgba(238, 43, 91, 0.08);
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.text-input {
  min-height: 50px;
  padding: 0 14px;
}

.text-input[readonly] {
  background: var(--surface-soft);
  color: var(--text-soft);
}

.text-area {
  min-height: 140px;
  padding: 14px;
  resize: vertical;
}

.text-area-compact {
  min-height: 100px;
}

.file-input {
  min-height: 50px;
  padding: 12px 14px;
  background: var(--surface-soft);
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.checkbox-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.admin-preview {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 2px dashed rgba(238, 43, 91, 0.12);
  border-radius: 24px;
  background: var(--surface-soft);
  color: var(--text-soft);
  text-align: center;
  overflow: hidden;
}

.admin-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-list {
  display: grid;
  gap: 16px;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-search-block {
  min-height: 50px;
}

.admin-status-select {
  min-width: 0;
}

.admin-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  border-radius: 28px;
  background: rgba(255, 240, 243, 0.28);
}

.admin-card-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface-soft);
}

.admin-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-card-thumb:empty::before,
.bulk-thumb:empty::before,
.cart-thumb:empty::before,
.history-thumb:empty::before {
  content: "画像なし";
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.summary-row,
.total-row,
.history-card-head,
.cart-item-head,
.price-row,
.menu-link,
.metric-card,
.cart-row {
  display: flex;
  align-items: center;
}

.summary-row,
.total-row,
.history-card-head,
.cart-item-head,
.price-row,
.menu-link {
  justify-content: space-between;
  gap: 12px;
}

.product-card {
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(238, 43, 91, 0.12);
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--pink-soft);
}

.product-media img,
.bulk-thumb img,
.cart-thumb img,
.history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-top,
.media-bottom {
  position: absolute;
  left: 16px;
  right: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 1;
}

.media-top {
  top: 16px;
}

.media-bottom {
  bottom: 16px;
}

.media-badge,
.tiny-badge,
.status-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.media-badge {
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
}

.tiny-badge {
  background: rgba(224, 242, 254, 0.85);
  color: #2563eb;
}

.admin-feature-chip {
  border: 0;
  cursor: pointer;
}

.published-chip {
  background: rgba(220, 252, 231, 0.92);
  color: #137a3b;
}

.admin-note {
  margin-top: 12px;
}

.school-note-card {
  grid-template-columns: 1fr;
}

.school-note-list {
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
}

.status-badge.shipping {
  background: var(--pink-soft);
  color: var(--primary);
}

.status-badge.completed {
  background: var(--surface-muted);
  color: var(--text-soft);
}

.status-badge.pending {
  background: var(--yellow-soft);
  color: #b8860b;
}

.product-body {
  padding: 22px;
}

.product-name {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 8px;
}

.price-strong,
.total-strong {
  color: var(--primary);
  font-size: 1.36rem;
  font-weight: 800;
}

.product-meta {
  font-size: 0.82rem;
  line-height: 1.7;
}

.favorite-button {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 18px;
  background: var(--surface-soft);
  color: #c5a7b1;
}

.favorite-button.is-active {
  background: var(--pink-soft);
  color: var(--primary);
}

.stepper {
  display: inline-flex;
  align-items: center;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface-muted);
}

.stepper button {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
}

.stepper span {
  min-width: 40px;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 800;
}

.table-card {
  overflow: hidden;
}

.bulk-table {
  width: 100%;
  border-collapse: collapse;
}

.bulk-table th,
.bulk-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.bulk-table th {
  background: rgba(255, 240, 243, 0.42);
  color: var(--text-soft);
  font-size: 0.78rem;
  text-align: left;
}

.bulk-table tr:last-child td {
  border-bottom: none;
}

.bulk-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
}

.bulk-thumb,
.cart-thumb,
.history-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface-soft);
}

.cart-list,
.history-list {
  display: grid;
  gap: 16px;
}

.cart-card,
.history-card {
  padding: 22px;
}

.cart-row {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.history-summary {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.total-row {
  padding: 9px 0;
  color: #6f7488;
}

.total-row.is-grand {
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-weight: 800;
}

.profile-panel {
  padding: 30px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.avatar {
  width: 92px;
  height: 92px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd5e0, #ffb8cc);
  color: var(--primary);
  font-size: 2rem;
  font-weight: 800;
}

.profile-name {
  font-size: 2rem;
  font-weight: 800;
}

.metric-card {
  flex-direction: column;
  justify-content: center;
  min-height: 150px;
  padding: 20px;
  text-align: center;
}

.metric-icon {
  width: 56px;
  height: 56px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pink-soft);
  color: var(--primary);
  margin-bottom: 10px;
}

.metric-value {
  color: var(--primary);
  font-size: 1.7rem;
  font-weight: 800;
}

.menu-panel {
  display: grid;
  gap: 12px;
}

.menu-link {
  padding: 18px 20px;
  border-radius: 22px;
  background: var(--surface-soft);
}

.menu-link-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

button.menu-link {
  width: 100%;
  border: none;
  color: inherit;
}

.support-panel {
  padding: 24px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.support-icon {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
}

.screen-message {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 240, 243, 0.72);
  color: var(--primary-deep);
  border: 1px solid rgba(238, 43, 91, 0.12);
}

.empty-card {
  padding: 28px;
  text-align: center;
  color: var(--text-soft);
}

.site-footer {
  padding: 20px 28px 36px;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.footer-copy {
  font-weight: 600;
}

.footer-links,
.public-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-links a,
.public-legal-links a {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.public-legal-links {
  margin-top: 16px;
  font-size: 0.84rem;
}

.legal-page {
  padding-top: 28px;
}

.legal-content {
  display: grid;
  gap: 18px;
}

.legal-header-card {
  margin-bottom: 20px;
}

.legal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  flex-wrap: wrap;
}

.legal-page-header {
  margin-bottom: 0;
}

.legal-section-card {
  padding: 28px 30px;
}

.legal-copy {
  color: #5d6272;
  line-height: 1.9;
}

.legal-copy p {
  margin: 0 0 12px;
}

.legal-copy p:last-child {
  margin-bottom: 0;
}

.legal-list {
  margin: 0;
  padding-left: 1.2em;
}

.legal-list li + li {
  margin-top: 8px;
}

.no-print {
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

@media (max-width: 1180px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .hero-panel,
  .catalog-layout,
  .summary-layout,
  .dashboard-layout,
  .admin-operations-strip,
  .admin-management-layout,
  .school-layout {
    grid-template-columns: 1fr;
  }

  .login-hero-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 920px) {
  .topbar,
  .page-header-block,
  .legal-header-row,
  .site-footer-inner {
    flex-direction: column;
    align-items: start;
  }

  .search-input {
    width: 100%;
  }

  .topbar-note {
    width: 100%;
  }

  .category-grid,
  .menu-grid,
  .metrics-grid,
  .admin-metrics-grid,
  .admin-form-grid,
  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .history-summary,
  .cart-row,
  .admin-card,
  .admin-form-head {
    grid-template-columns: 1fr;
    display: grid;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 20px 16px 36px;
  }

  .topbar {
    padding: 14px 16px;
  }

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

  .page-actions,
  .hero-actions,
  .toolbar-actions,
  .catalog-actions,
  .history-actions,
  .summary-actions {
    width: 100%;
  }

  .primary-button,
  .secondary-button,
  .outline-button {
    width: 100%;
  }

  .bulk-table,
  .bulk-table thead,
  .bulk-table tbody,
  .bulk-table tr,
  .bulk-table th,
  .bulk-table td {
    display: block;
    width: 100%;
  }

  .bulk-table thead {
    display: none;
  }

  .bulk-item {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar,
  .topbar,
  .site-footer,
  .no-print {
    display: none !important;
  }

  .page {
    padding: 0;
  }

  .hero-panel,
  .page-card,
  .legal-section-card,
  .sidebar-card,
  .summary-card,
  .metric-card,
  .admin-ops-card,
  .product-card,
  .history-card,
  .cart-card,
  .admin-card,
  .table-card,
  .profile-panel,
  .menu-panel,
  .support-panel {
    box-shadow: none !important;
    border: 1px solid #eadbe2;
  }

  .catalog-layout,
  .summary-layout,
  .dashboard-layout,
  .category-grid,
  .metrics-grid,
  .menu-grid,
  .product-grid,
  .history-list {
    display: block;
  }

  .product-card,
  .history-card,
  .cart-card,
  .table-card,
  .page-card,
  .summary-card,
  .metric-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 8mm;
  }
}
