.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(rgba(13, 36, 66, 0.72), rgba(13, 36, 66, 0.72)),
    url("https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&w=1800&q=85") center / cover;
}

.login-card {
  width: min(1020px, 100%);
  padding: 28px;
  border-radius: 8px;
  background: var(--surface-0);
  box-shadow: var(--shadow);
}

.login-header {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.login-card h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}

.login-card p {
  color: var(--text-700);
}

.login-role-grid,
.metric-grid,
.quick-create-grid,
.photo-grid,
.catalog-grid {
  display: grid;
  gap: 14px;
}

.login-role-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.login-role {
  min-height: 180px;
  display: grid;
  gap: 12px;
  align-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-1);
  text-align: left;
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.login-role:hover {
  border-color: var(--navy-600);
  background: #eef5ff;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.login-role h2 {
  margin: 0;
}

.login-role-actions {
  display: grid;
  gap: 8px;
}

.button,
.icon-button,
.chip,
.tab-button,
.quick-create {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(23, 32, 51, 0.1);
}

.button .icon {
  width: 1rem;
  height: 1rem;
}

.button-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
}

.button-accent {
  color: var(--navy-900);
  background: linear-gradient(180deg, #f1b23b, var(--gold-600));
}

.button-ghost {
  color: var(--navy-700);
  border-color: var(--line);
  background: var(--surface-0);
}

.button-danger {
  color: #fff;
  background: var(--red-600);
}

.icon-button {
  width: 44px;
  display: grid;
  place-items: center;
  color: var(--text-700);
  border-color: var(--line);
  background: var(--surface-0);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, color 160ms ease;
}

.icon-button:hover,
.button-ghost:hover {
  border-color: var(--navy-600);
  color: var(--navy-700);
}

.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.1);
}

.button:focus-visible,
.icon-button:focus-visible,
.tab-button:focus-visible,
.login-role:focus-within {
  outline: 3px solid rgba(232, 160, 32, 0.35);
  outline-offset: 2px;
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.panel,
.metric-card,
.table-card,
.form-card,
.kanban-column,
.report-card,
.timeline,
.pdf-preview,
.portal-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-0);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.panel:hover,
.metric-card:hover,
.report-card:hover,
.stock-card:hover,
.product-card:hover,
.approval-item:hover,
.action-item:hover,
.job-item:hover {
  border-color: #c9d6e5;
  box-shadow: 0 14px 34px rgba(23, 32, 51, 0.08);
}

.panel,
.table-card,
.form-card,
.timeline,
.pdf-preview,
.portal-panel {
  padding: 18px;
}

.section-header {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-header h2,
.section-header h3 {
  margin: 0;
  line-height: 1.2;
}

.section-header p,
.muted {
  color: var(--text-500);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold-600);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-grid {
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.metric-card {
  min-height: 120px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  line-height: 1.05;
}

.metric-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--navy-700);
  background: var(--blue-100);
}

.tour-button {
  min-width: max-content;
}

.tour-button .icon {
  color: var(--gold-600);
}

.toolbar {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.search-field,
.select-field,
.input-field,
.textarea-field {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-900);
  background: var(--surface-0);
}

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

.search-wrap .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-500);
}

.search-field {
  padding: 0 12px 0 40px;
}

.select-field,
.input-field {
  padding: 0 12px;
}

.textarea-field {
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
}

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

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

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-weight: 700;
  color: var(--text-700);
}

.form-row {
  align-items: flex-end;
  gap: 10px;
}

.inline-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text-700);
  background: var(--surface-1);
  font-size: 13px;
}

tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge-success {
  color: var(--green-600);
  background: var(--green-100);
}

.badge-warning {
  color: #8a5a00;
  background: var(--gold-100);
}

.badge-danger {
  color: var(--red-600);
  background: var(--red-100);
}

.badge-neutral {
  color: var(--text-700);
  background: var(--surface-2);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-button {
  padding: 0 14px;
  color: var(--text-700);
  background: var(--surface-0);
  border-color: var(--line);
  font-weight: 700;
}

.tab-button.is-active {
  color: #fff;
  background: var(--navy-700);
  border-color: var(--navy-700);
}

.pagination {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 44px 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--text-500);
  text-align: center;
}

.empty-state .icon {
  width: 34px;
  height: 34px;
  color: var(--navy-600);
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: grid;
  gap: 10px;
}

.toast {
  width: min(380px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-0);
  box-shadow: var(--shadow);
}

.toast-success {
  border-color: #a8e3c5;
}

.toast-error {
  border-color: #ffc2c2;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(13, 36, 66, 0.62);
}

.modal {
  width: min(620px, 100%);
  max-height: min(86vh, 900px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 8px;
  background: var(--surface-0);
  box-shadow: var(--shadow);
}

.modal-wide {
  width: min(1100px, 100%);
}

.modal-header {
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
}

.modal-body {
  overflow: auto;
  padding: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

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

.quick-create {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 120px;
  padding: 14px;
  color: var(--navy-700);
  border-color: var(--line);
  background: var(--surface-1);
  font-weight: 800;
}

.quick-create .icon {
  width: 28px;
  height: 28px;
}

.bar-chart {
  height: 240px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 12px;
  padding-top: 18px;
}

.bar-group {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(20px, 1fr) auto;
  gap: 8px;
  height: 100%;
  align-items: end;
}

.bar-fill {
  width: 100%;
  min-height: 8px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--navy-600), var(--navy-800));
}

.bar-group small {
  overflow: hidden;
  color: var(--text-500);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green-600);
}

.tour-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(13, 36, 66, 0.98), rgba(26, 60, 110, 0.86)),
    url("https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&w=1400&q=85") center / cover;
}

.tour-hero h3 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.12;
}

.tour-hero p {
  color: #dce8f8;
}

.tour-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: var(--gold-600);
  background: rgba(255, 255, 255, 0.1);
}

.tour-mark .icon {
  width: 34px;
  height: 34px;
}

.tour-section {
  margin-top: 18px;
}

.tour-section h3 {
  margin: 0 0 12px;
}

.tour-step-grid,
.tour-button-grid,
.tour-module-grid {
  display: grid;
  gap: 12px;
}

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

.tour-step,
.tour-button-grid article,
.tour-module-chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-0);
}

.tour-step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}

.tour-step span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--navy-900);
  background: var(--gold-600);
  font-weight: 900;
}

.tour-step p,
.tour-button-grid p {
  margin: 4px 0 0;
  color: var(--text-500);
}

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

.tour-button-grid article {
  padding: 12px;
}

.tour-module-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.tour-module-chip {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--navy-700);
  font-weight: 800;
}

.tour-module-chip:hover {
  border-color: var(--navy-600);
  background: #eef5ff;
}
