:root {
  --black: #000000;
  --ink: #151515;
  --muted: #696969;
  --line: #e2e2e2;
  --soft: #f6f6f6;
  --white: #ffffff;
  --orange: #FA481C;
  --pink: #F08FBA;
  --focus: rgba(250, 72, 28, 0.28);
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--white);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.is-hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, var(--black) 0 38%, transparent 38%),
    linear-gradient(135deg, var(--white), #fafafa);
}

.brand-mark {
  position: fixed;
  left: 28px;
  top: 28px;
  display: flex;
  gap: 8px;
}

.brand-mark span {
  width: 34px;
  height: 34px;
  display: block;
}

.brand-mark span:first-child {
  background: var(--orange);
}

.brand-mark span:last-child {
  background: var(--pink);
}

.login-panel {
  width: min(520px, 100%);
  padding: 40px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.18);
}

.login-panel h1,
.dashboard-header h1 {
  margin: 0;
  color: var(--black);
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.94;
  letter-spacing: 0;
}

.login-panel label,
.filters label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.login-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 24px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.login-row button,
.primary-button {
  min-height: 42px;
  padding: 0 18px;
  color: var(--white);
  background: var(--orange);
  font-weight: 800;
  border-radius: 4px;
}

.secondary-button,
.ghost-button {
  min-height: 42px;
  padding: 0 16px;
  font-weight: 800;
  border-radius: 4px;
}

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

.ghost-button {
  color: var(--white);
  background: #242424;
}

.message {
  min-height: 22px;
  margin: 16px 0 0;
  color: var(--orange);
  font-weight: 700;
}

.dashboard-view {
  min-height: 100vh;
  padding: 30px;
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 24px;
  border-bottom: 6px solid var(--black);
}

.section-label {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0;
  overflow-x: auto;
}

.tab-button {
  min-width: 112px;
  min-height: 44px;
  padding: 0 18px;
  color: var(--black);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-weight: 900;
}

.tab-button.is-active {
  color: var(--white);
  background: var(--black);
  border-color: var(--black);
}

.report-panel {
  display: none;
}

.report-panel.is-active {
  display: block;
}

.filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 18px;
  background: var(--soft);
  border-left: 8px solid var(--orange);
}

[data-panel="global"] .filters,
[data-panel="media"] .filters {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.total-card {
  min-height: 82px;
  padding: 16px;
  color: var(--white);
  background: var(--black);
  border-left: 8px solid var(--orange);
}

.total-card:nth-child(even) {
  border-left-color: var(--pink);
}

.total-card span {
  display: block;
  color: #d8d8d8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.total-card strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--white);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 10px;
  color: var(--white);
  background: var(--black);
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  white-space: nowrap;
}

tbody tr:nth-child(even) {
  background: #fff0f6;
}

tbody tr:hover {
  background: #ffe5de;
}

.numeric {
  text-align: right;
}

.empty-row td {
  padding: 28px 10px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .login-view {
    background: linear-gradient(180deg, var(--black) 0 170px, var(--white) 170px);
  }

  .dashboard-view {
    padding: 18px;
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions,
  .header-actions button {
    width: 100%;
  }

  .filters,
  [data-panel="global"] .filters,
  [data-panel="media"] .filters,
  .totals {
    grid-template-columns: 1fr;
  }

  .login-row {
    grid-template-columns: 1fr;
  }
}
