:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f8;
  color: #1f2933;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.filing-footer {
  position: fixed;
  right: 0;
  bottom: 12px;
  left: 0;
  z-index: 20;
  text-align: center;
  font-size: 12px;
}

.filing-footer a {
  color: #52616f;
  text-decoration: none;
}

.filing-footer a:hover,
.filing-footer a:focus-visible {
  color: #1f5eff;
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid #1f5eff;
  background: #1f5eff;
  color: #fff;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary {
  border-color: #c9d2dc;
  background: #fff;
  color: #243447;
}

.hidden {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  padding: 28px;
  display: grid;
  gap: 12px;
}

.login-panel h1,
.sidebar h1,
.topbar h2,
.detail-header h3 {
  margin: 0;
}

label {
  display: grid;
  gap: 6px;
  color: #52616f;
  font-size: 13px;
}

.field-control {
  display: grid;
  gap: 6px;
  color: #52616f;
  font-size: 13px;
}

input,
select {
  min-height: 38px;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: #1f2933;
}

.status {
  min-height: 20px;
  margin: 0;
  color: #52616f;
  font-size: 13px;
}

.status.error {
  color: #b42318;
}

.status.success {
  color: #067647;
}

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

.sidebar {
  border-right: 1px solid #d9e0e7;
  background: #fff;
  padding: 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
}

.sidebar p,
.topbar p,
.detail-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.nav-item {
  width: 100%;
  text-align: left;
  border-color: transparent;
  background: transparent;
  color: #243447;
}

.nav-item.active {
  background: #e9f0ff;
  border-color: #b8caff;
}

.nav-item.sub-nav {
  min-height: 34px;
  padding-left: 26px;
  color: #52616f;
  font-size: 13px;
}

.nav-item.sub-nav.active {
  color: #1f2933;
  font-weight: 700;
}

.nav-item.main-nav {
  font-weight: 700;
}

.nav-item.disabled {
  background: #f4f6f8;
  color: #8a99a8;
}

.content {
  min-width: 0;
  padding: 20px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  align-items: end;
  gap: 12px;
  background: #fff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  padding: 14px;
}

.compact-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
}

.trend-filters {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid #e1e7ee;
  border-radius: 8px;
  background: #f8fafc;
}

.trend-field {
  min-width: 0;
}

.trend-date-field,
.trend-dimension-field {
  grid-column: span 2;
}

.trend-link-field {
  grid-column: span 4;
}

.trend-sku-field {
  grid-column: span 3;
}

.trend-clear-button {
  grid-column: span 2;
  min-height: 38px;
  align-self: end;
}

.trend-apply-button {
  grid-column: span 3;
  min-height: 38px;
  align-self: end;
}

.multi-select {
  position: relative;
}

.multi-select details {
  position: relative;
}

.multi-select summary {
  min-height: 38px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  cursor: pointer;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: #334155;
  list-style: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.multi-select summary::-webkit-details-marker {
  display: none;
}

.multi-select summary::after {
  content: "";
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #64748b;
  border-bottom: 1.5px solid #64748b;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 120ms ease;
}

.multi-select details[open] summary {
  border-color: #1f5eff;
  box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.1);
}

.multi-select details[open] summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.multi-select:focus-within summary {
  border-color: #1f5eff;
}

.multi-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  width: max-content;
  min-width: 100%;
  max-width: 320px;
  max-height: 260px;
  overflow: auto;
  padding: 7px;
  border: 1px solid #c9d2dc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.multi-option-search {
  width: 100%;
  min-height: 32px;
  margin: 0 0 6px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.multi-option-search:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: var(--primary);
}

.multi-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 3px 6px;
  color: #334155;
  font-size: 13px;
  white-space: nowrap;
}

.multi-option[hidden] {
  display: none;
}

.multi-option:hover {
  background: #eff6ff;
  border-radius: 4px;
}

.multi-option input {
  min-height: auto;
  margin: 0;
}

.multi-option.all-option {
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 4px;
  padding-bottom: 6px;
  font-weight: 600;
}

.hourly-filters {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.margin-daily-filters {
  grid-template-columns: repeat(8, minmax(120px, 1fr));
}

.compact-filters button {
  white-space: nowrap;
}

.page-panel {
  display: none;
}

.page-panel:not(.active) {
  display: none !important;
}

.page-panel.active {
  display: grid;
  align-content: start;
}

#hourlyPage,
#statusPage,
.tools-page,
.margin-daily-page {
  background: #fff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  padding: 14px;
  gap: 12px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-header h3 {
  margin: 0;
  font-size: 16px;
}

.section-header h4 {
  margin: 0;
  font-size: 15px;
}

.section-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.hourly-trend-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.hourly-trend-filters {
  grid-template-columns: minmax(180px, 240px) minmax(120px, 160px);
  justify-content: start;
}

.hourly-trend-chart-area {
  margin-top: 0;
  padding: 8px 6px;
  background: #fff;
}

.hourly-trend-chart-area svg {
  height: 270px;
}

.hourly-grid {
  display: grid;
  gap: 10px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #52616f;
  font-size: 13px;
}

.pager-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.pager button {
  min-height: 32px;
}

.page-size-control {
  display: inline-flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.page-size-control select {
  min-height: 32px;
  width: 76px;
}

.hourly-card {
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.hourly-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e1e7ee;
}

.hourly-card header div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.hourly-card header span {
  color: #52616f;
  font-size: 13px;
  font-weight: 700;
}

.hourly-card header strong {
  color: #1f2933;
  font-size: 15px;
}

.hourly-matrix-wrap {
  overflow-x: auto;
}

.hourly-matrix {
  min-width: 980px;
  margin: 0 auto;
  table-layout: fixed;
}

.hourly-matrix th,
.hourly-matrix td {
  padding: 8px 10px;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
}

.hourly-matrix thead th {
  color: #64748b;
  background: #fbfcfd;
  font-weight: 700;
}

.hourly-matrix tbody th {
  width: 132px;
  color: #334155;
  white-space: nowrap;
  text-align: center;
}

.hourly-matrix tbody tr + tr th,
.hourly-matrix tbody tr + tr td {
  border-top: 1px solid #edf1f5;
}

.hourly-matrix tbody tr:first-child th,
.hourly-matrix tbody tr:first-child td {
  font-size: 13px;
}

.hourly-matrix td strong,
.hourly-matrix td span {
  display: block;
}

.hourly-matrix td strong {
  color: #1f2933;
  font-weight: 700;
}

.hourly-matrix td span {
  margin-top: 2px;
  font-weight: 700;
}

.hourly-matrix .empty {
  color: #94a3b8;
}

.delta-up {
  color: #067647;
}

.delta-down {
  color: #b42318;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  gap: 12px;
}

.tool-card {
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
  display: grid;
  gap: 14px;
}

.tool-card h4 {
  margin: 0;
  font-size: 16px;
}

.tool-card p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.tool-card-header {
  display: grid;
  gap: 4px;
}

.email-code-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.email-code-result {
  display: grid;
  gap: 10px;
}

.email-code-result.hidden {
  display: none !important;
}

.email-code-card {
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.email-code-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.email-code-label {
  color: #64748b;
  font-size: 13px;
  margin-bottom: 4px;
}

.email-code-value {
  font-size: 34px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: 0;
  color: #1f5eff;
}

.email-code-time {
  color: #64748b;
  white-space: nowrap;
  font-size: 13px;
}

.email-code-meta {
  margin: 0;
  display: grid;
}

.email-code-meta > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #d7e0ea;
}

.email-code-meta dt {
  color: #64748b;
}

.email-code-meta dd {
  margin: 0;
  word-break: break-word;
}

.data-note {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

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

.metric {
  background: #fff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  padding: 14px;
}

.metric span {
  display: block;
  color: #64748b;
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.home-trend {
  background: #fff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.trend-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.trend-header h3 {
  margin: 0;
  font-size: 18px;
}

.trend-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.home-chart-area {
  margin-top: 0;
  padding: 8px 6px;
}

.home-chart-area svg {
  height: 270px;
}

.trend-data-table {
  overflow: auto;
  border: 1px solid #e1e7ee;
  border-radius: 8px;
  background: #fbfcfd;
}

.trend-data-table .muted {
  margin: 0;
  padding: 12px;
}

.trend-table {
  min-width: 760px;
}

.trend-table th,
.trend-table td {
  font-size: 12px;
  padding: 8px 10px;
  white-space: nowrap;
}

.margin-daily-table {
  min-width: 1760px;
}

.operation-daily-page {
  background: #fff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.operation-review-marker {
  cursor: pointer;
}

.operation-review-events {
  display: grid;
  gap: 8px;
  border: 1px solid #e1e7ee;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.operation-review-events h4,
.operation-review-event-group strong {
  margin: 0;
}

.operation-review-event-group {
  display: grid;
  gap: 7px;
  border-left: 3px solid #2563eb;
  padding: 9px 10px;
  background: #fff;
}

.operation-review-event-group.focused {
  border-left-color: #d97706;
  background: #fffbeb;
}

.operation-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.operation-event-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.operation-event-line time {
  width: 38px;
  color: #64748b;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.operation-badge {
  border: 1px solid #d9e0e7;
  border-radius: 4px;
  padding: 3px 7px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}

.operation-badge.price-up {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.operation-badge.price-down {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
}

.operation-badge.price-neutral {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.operation-badge.ad-up {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
}

.operation-badge.ad-down {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.operation-badge.super {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.operation-badge.promotion {
  border-color: #fde68a;
  background: #fffbeb;
  color: #a16207;
}

.operation-note {
  color: #64748b;
  font-size: 12px;
}

.operation-daily-filters {
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  padding: 14px;
  border: 1px solid #e1e7ee;
  border-radius: 8px;
  background: #f8fafc;
}

.operation-registration-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #fbfcfe;
}

.operation-registration-panel h4 {
  margin: 0;
  font-size: 14px;
}

.operation-registration-panel p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
}

.operation-registration-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.operation-conflict-summary {
  border: 1px solid #f0c7a1;
  border-radius: 8px;
  background: #fffaf5;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.operation-conflict-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.operation-conflict-list {
  display: grid;
  gap: 6px;
}

.operation-conflict-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #7a3d00;
  font-size: 13px;
}

.operation-conflict-row button,
.operation-row-actions button,
.operation-timeline-header button,
.operation-timeline-item button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.operation-daily-table {
  min-width: 1340px;
}

.operation-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.operation-link-trigger {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.operation-link-trigger:hover,
.operation-link-trigger:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
}

.operation-timeline {
  border-top: 1px solid #d9e0e7;
  padding-top: 14px;
  display: grid;
  gap: 12px;
}

.operation-timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.operation-timeline-header h4,
.operation-form-section h4 {
  margin: 0;
  font-size: 15px;
}

.operation-timeline-list {
  display: grid;
  gap: 8px;
}

.operation-timeline-item {
  border: 1px solid #e1e7ee;
  border-radius: 6px;
  background: #fbfcfd;
  padding: 12px;
}

.operation-timeline-item p,
.operation-revisions p {
  margin: 6px 0 0;
  font-size: 13px;
}

.operation-revisions {
  margin-top: 10px;
  border-top: 1px solid #d9e0e7;
  padding-top: 10px;
  font-size: 13px;
}

.operation-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.35);
}

.operation-modal-panel {
  width: min(880px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.operation-modal-header,
.operation-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.operation-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.operation-modal-header p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
}

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

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

.operation-form-section {
  display: grid;
  gap: 10px;
  border-top: 1px solid #e7edf3;
  padding-top: 12px;
}

.operation-batch-panel {
  width: min(1060px, 100%);
}

.operation-batch-panel .operation-modal-actions {
  position: sticky;
  bottom: -18px;
  z-index: 1;
  margin: 0 -18px -18px;
  padding: 12px 18px;
  border-top: 1px solid #dfe7ef;
  background: #fff;
}

.operation-batch-section h4 span,
.operation-section-title > span {
  margin-left: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
}

.operation-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.operation-section-title h4 {
  margin: 0;
}

.operation-batch-ad-list {
  display: grid;
  gap: 8px;
}

.operation-batch-ad-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) repeat(3, minmax(110px, 0.8fr)) auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  background: #fbfcfd;
}

.operation-batch-ad-row:has(.batch-cpo-scope) {
  grid-template-columns: minmax(130px, 1fr) repeat(4, minmax(105px, 0.8fr)) auto;
}

.operation-ad-remove {
  min-height: 36px;
}

textarea {
  resize: vertical;
  min-height: 86px;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  color: #1f2933;
}

.margin-daily-table tbody tr {
  cursor: default;
}

.table-wrap {
  min-height: 0;
  overflow: auto;
  background: #fff;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
}

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

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #e7edf3;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #52616f;
  font-weight: 600;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: #f5f8ff;
}

.muted {
  color: #8a99a8;
}

.detail-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(460px, 100vw);
  z-index: 5;
  border-left: 1px solid #d9e0e7;
  background: #fff;
  padding: 18px;
  overflow: auto;
  box-shadow: -18px 0 40px rgba(15, 23, 42, 0.18);
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chart-area {
  margin-top: 16px;
  border: 1px solid #e1e7ee;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 8px;
}

.metric-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.metric-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d6dee7;
  border-radius: 6px;
  padding: 7px 9px;
  color: #243447;
  background: #fff;
  font-size: 13px;
}

.metric-toggle input {
  min-height: auto;
  width: 14px;
  height: 14px;
  padding: 0;
}

svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-point {
  pointer-events: none;
}

.chart-value-label {
  font-size: 11px;
  font-weight: 700;
  paint-order: stroke;
  pointer-events: none;
  stroke: #fff;
  stroke-linejoin: round;
  stroke-width: 4px;
}

.chart-tooltip {
  position: fixed;
  z-index: 20;
  max-width: min(760px, calc(100vw - 32px));
  max-height: 48vh;
  overflow: auto;
  pointer-events: none;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  background: #fff;
  color: #1f2933;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-line;
}

.detail-panel h4 {
  margin: 18px 0 8px;
}

.detail-list {
  display: grid;
  gap: 8px;
}

.detail-row {
  border: 1px solid #e1e7ee;
  border-radius: 6px;
  padding: 10px;
  font-size: 13px;
}

@media (max-width: 1160px) {
  .app-view {
    grid-template-columns: 180px minmax(0, 1fr);
  }

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

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

  .trend-filters {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .trend-date-field,
  .trend-dimension-field {
    grid-column: span 2;
  }

  .trend-link-field,
  .trend-sku-field {
    grid-column: span 3;
  }

  .trend-clear-button,
  .trend-apply-button {
    grid-column: span 3;
  }

  .margin-daily-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .operation-daily-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .sidebar {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    border-right: 0;
    border-bottom: 1px solid #d9e0e7;
  }

  nav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }

  .filters,
  .summary-grid,
  .compact-filters {
    grid-template-columns: 1fr;
  }

  .trend-filters {
    grid-template-columns: 1fr;
  }

  .trend-date-field,
  .trend-dimension-field,
  .trend-link-field,
  .trend-sku-field,
  .trend-clear-button,
  .trend-apply-button {
    grid-column: span 1;
  }

  .margin-daily-filters {
    grid-template-columns: 1fr;
  }

  .operation-daily-filters,
  .operation-registration-panel,
  .operation-form-grid,
  .operation-price-grid,
  .operation-batch-ad-row,
  .operation-batch-ad-row:has(.batch-cpo-scope) {
    grid-template-columns: 1fr;
  }

  .operation-registration-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .operation-registration-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .operation-modal {
    padding: 12px;
  }

  .operation-modal-panel {
    max-height: calc(100vh - 24px);
  }

  .operation-conflict-row,
  .operation-timeline-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .email-code-main {
    flex-direction: column;
  }

  .email-code-time {
    white-space: normal;
  }

  .email-code-meta > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
