:root {
  --bg: #f8f9fa;
  --card: #ffffff;
  --text: #1f1f1f;
  --muted: #5f6368;
  --border: #e0e0e0;
  --pill: #f1f3f4;
  --accent: #4285f4;
  --danger: #d93025;
  --sidebar: #f9fafa;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}
.app {
  display: flex;
  flex: 1;
  min-height: 0;
}
.sidebar {
  width: 240px;
  background: #f8f9fa;
  border-right: none;
  padding: 12px 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: calc(100vh - 60px);
}
.sidebar-image {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  align-self: flex-start;
}
.sidebar-image img {
  display: block;
  width: 100%;
  height: auto;
}
.range-image {
  margin-top: -15px;
  margin-bottom: -30px;
}
.range-image img {
  display: block;
  max-width: 280px;
  width: 100%;
  height: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 17px;
  margin-left: 12px;
}
.brand-logo { 
  display: inline-block;
  height: 35px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.nav-section {
  margin-top: 16px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 0 14px 14px 0;
  color: #3c4043;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}
.nav-item .nav-icon {
  color: #3c4043;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.nav-item .label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}
.nav-item .tag {
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}
.nav-item.active {
  background: #e8f0fe;
  color: #1a73e8;
  font-weight: 500;
  border-radius: 0 18px 18px 0;
}
.nav-item.active .nav-icon {
  color: #1a73e8;
  font-weight: 500;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.nav-item:hover {
  background: #eef1f3;
  color: var(--text);
}
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 10;
}
.top-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}
.menu-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.menu-btn .material-icons-outlined {
  color: var(--muted);
  font-size: 24px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f1f3f4;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  flex: 1 1 1040px;
  max-width: 1120px;
  min-height: 48px;
}
.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 15px;
  color: var(--text);
}
.search-box input::placeholder {
  color: #6f7074;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.top-actions .material-icons-outlined {
  font-size: 22px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  background: transparent;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.content {
  padding: 20px 82px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
  align-items: stretch;
  flex: 1;
}
.page-title {
  font-family: 'Roboto', 'Google Sans', Arial, sans-serif;
  font-size: 1.300rem;
  line-height: 1.75rem;
  letter-spacing: 0;
  font-weight: 400;
  color: #202124;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.totals-card {
  padding: 19px 20px;
  background: #5f6368;
  color: #fff;
  border: none;
  display: block;
  min-height: 140px;
  width: 100%;
}
.totals-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Roboto', 'Google Sans', Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.5rem;
  letter-spacing: 0;
  font-weight: 400;
  margin-bottom: 14px;
}
.totals-info {
  font-size: 18px;
  color: #dfe1e5;
}
.totals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}
.total-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  align-items: flex-start;
}
.total-item .label {
  font-size: 13px;
  font-weight: 400;
  opacity: 1;
}
.total-item .value {
  font-family: 'Roboto', 'Google Sans', Arial, sans-serif;
  font-size: 1.65rem;
  line-height: 2.25rem;
  letter-spacing: 0;
  font-weight: 400;
  color: #fff;
}
.performance-card {
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 50%;
  align-self: flex-start;
  margin-top: 12px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 0;
  border-bottom: none;
}
.range {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pill {
  background: var(--pill);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--muted);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 28px 40px;
  align-items: start;
}
.metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.ecpm-metric {
  grid-column: 1 / span 2;
  max-width: 280px;
  margin-left: 0;
}
.metric-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.metric .heading {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}
.info-icon {
  font-size: 16px;
  color: #8a8c90;
}
.metric .value {
  font-family: 'Google Sans', 'Roboto', 'Arial', sans-serif;
  font-size: 1.300rem;
  line-height: 1.75rem;
  letter-spacing: 0;
  font-weight: 400;
  color: #202124;
}
.metric .delta {
  font-size: 12px;
  color: #c5221f;
}
.metric-graph {
  width: 110px;
  height: 60px;
  display: block;
  object-fit: contain;
}
.footer-link {
  font-size: 14px;
  color: #1967d2;
  margin-top: 12px;
  padding-bottom: 6px;
  display: inline-block;
  cursor: pointer;
}
.footer-link:hover {
  text-decoration: underline;
}
.performance-footer {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #e0e0e0;
  margin-left: -18px;
  margin-right: -18px;
  padding-left: 18px;
  padding-right: 18px;
}
.icon-muted {
  color: var(--muted);
}
.icon16 {
  font-size: 16px;
}
.card-title {
  font-size: 1.125rem;
  font-weight: 400;
  margin-bottom: 10px;
}
.footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 32px 24px;
  color: #5f6368;
  font-size: 12px;
  margin-top: auto;
  width: 100%;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: #fff;
  border-radius: 12px;
  width: 420px;
  max-width: 92vw;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  padding: 18px 18px 16px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #202124;
}
.modal-title.small {
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}
.modal-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 8px 0;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #5f6368;
}
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(80vh - 70px);
  overflow-y: auto;
}
.modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #3c4043;
}
.modal-field input {
  height: 36px;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
  outline: none;
}
.modal-field input:focus {
  border-color: #4285f4;
  box-shadow: 0 0 0 1px #4285f4;
}
.modal-field select {
  height: 36px;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
  outline: none;
  background: #fff;
}
.modal-field select:focus {
  border-color: #4285f4;
  box-shadow: 0 0 0 1px #4285f4;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}
.btn-secondary,
.btn-primary {
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
}
.btn-primary {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
}
.btn-secondary:hover {
  background: #f1f3f4;
}
.btn-primary:hover {
  background: #1967d2;
}
.footer-link-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #1969d2;
  text-decoration: none;
  font-weight: 500;
}
.footer-link-item:hover {
  text-decoration: underline;
}
.footer-icon {
  font-size: 14px;
  line-height: 1;
}
@media (max-width: 1080px) {
  .performance-card {
    max-width: 100%;
  }
}
@media (max-width: 960px) {
  .sidebar {
    width: 200px;
  }
  .search-box {
    width: 100%;
  }
}
@media (max-width: 720px) {
  .app {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
  }
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .main {
    width: 100%;
  }
}

