/* Daily Sales — page-specific styles (yis- prefix) */

.yis-page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px 24px;
}

/* Header */
.yis-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.yis-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.yis-date-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.yis-date-form { display: inline-flex; align-items: center; }

.yis-date-input {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  outline: none;
}
.yis-date-input:focus { border-color: #3b82f6; }

.yis-date-display {
  font-size: 13px;
  color: var(--muted);
}

/* Gross/Net Toggle */
.yis-toggle {
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}

.yis-toggle-btn {
  padding: 6px 16px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  color: var(--muted);
  transition: all 0.15s;
}

.yis-toggle-btn--active {
  background: var(--ink);
  color: #fff;
}

/* Channel Filter Chip */
.yis-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.yis-filter-chip a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
}

.yis-filter-chip a:hover {
  color: #fff;
}

/* Headline Metric Cards */
.yis-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.yis-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
}

.yis-kpi-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.yis-kpi-label svg {
  width: 10px;
  height: 10px;
  color: var(--muted);
}

.yis-kpi-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 14px;
  color: var(--ink);
}

.yis-benchmarks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.yis-benchmark-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.yis-benchmark-label {
  font-size: 11px;
  color: var(--light);
}

.yis-delta {
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.yis-delta-positive { color: var(--green); }
.yis-delta-negative { color: var(--red); }
.yis-delta-neutral { color: var(--muted); }

/* Channel Breakdown */
.yis-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 20px;
}

.yis-card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--ink);
}

.yis-channel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.yis-channel-row {
  display: grid;
  grid-template-columns: 140px 1fr 80px 60px;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  padding: 2px 0;
  transition: background 0.1s;
}

.yis-channel-row:hover {
  background: var(--surface-alt);
}

.yis-channel-row.yis-channel-row--active {
  background: #f0f0ec;
}

.yis-channel-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.yis-channel-name--other {
  font-weight: 500;
  color: var(--muted);
  font-style: italic;
}

.yis-channel-bar-container {
  height: 20px;
  border-radius: 4px;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}

.yis-channel-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s;
}

.yis-channel-bar-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
}

.yis-channel-bar-label--inside {
  left: 8px;
  color: #fff;
}

.yis-channel-bar-label--outside {
  color: var(--ink);
}

.yis-channel-pct {
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.yis-channel-pct--other {
  color: var(--muted);
}

.yis-channel-units {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

/* Subtitle Tables (side by side) */
.yis-subtitle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.yis-subtitle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.yis-subtitle-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.yis-subtitle-header svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.yis-subtitle-title {
  font-size: 13px;
  font-weight: 700;
}

.yis-subtitle-hint {
  font-size: 10px;
  color: var(--muted);
  margin-left: auto;
}

.yis-subtitle-thead {
  display: grid;
  grid-template-columns: 1fr 70px 50px 56px;
  gap: 6px;
  padding: 8px 18px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--light);
  border-bottom: 1px solid var(--border-light);
}

.yis-subtitle-row {
  display: grid;
  grid-template-columns: 1fr 70px 50px 56px;
  gap: 6px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
  transition: background 0.1s;
  text-decoration: none;
  color: inherit;
}

.yis-subtitle-row:hover {
  background: var(--surface-alt);
}

.yis-subtitle-name {
  font-weight: 700;
  font-size: 12px;
  color: var(--ink);
}

.yis-subtitle-rev {
  text-align: right;
  font-size: 12px;
  font-weight: 600;
}

.yis-subtitle-units {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

.yis-subtitle-change {
  text-align: right;
  font-size: 11px;
  font-weight: 700;
}

.yis-subtitle-change--up { color: var(--green); }
.yis-subtitle-change--down { color: var(--red); }
.yis-subtitle-change--new {
  color: var(--blue);
  font-size: 10px;
  font-weight: 600;
}

/* Sales By Product */
.yis-product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.yis-product-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.yis-product-header svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.yis-product-title {
  font-size: 13px;
  font-weight: 700;
}

.yis-product-count {
  font-size: 10px;
  color: var(--muted);
  margin-left: auto;
}

.yis-product-thead {
  display: grid;
  grid-template-columns: 1fr 60px 80px;
  gap: 8px;
  padding: 10px 18px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--light);
  border-bottom: 1px solid var(--border-light);
}

.yis-product-row {
  display: grid;
  grid-template-columns: 1fr 60px 80px;
  gap: 8px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
  transition: background 0.1s;
  text-decoration: none;
  color: inherit;
}

.yis-product-row:hover {
  background: var(--surface-alt);
}

.yis-product-name {
  font-weight: 600;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.yis-product-units {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

.yis-product-revenue {
  text-align: right;
  font-size: 12px;
  font-weight: 700;
}

.yis-product-footer {
  display: grid;
  grid-template-columns: 1fr 60px 80px;
  gap: 8px;
  padding: 10px 18px;
  background: var(--surface-alt);
  font-size: 12px;
  font-weight: 700;
}

.yis-empty-state {
  padding: 40px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
  .yis-page {
    padding: 20px 12px;
  }

  .yis-title {
    font-size: 18px;
  }

  .yis-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .yis-kpi-card {
    padding: 16px 14px;
  }

  .yis-kpi-value {
    font-size: 26px;
  }

  .yis-channel-row {
    grid-template-columns: 100px 1fr 50px;
  }

  .yis-channel-units {
    display: none;
  }

  .yis-subtitle-grid {
    grid-template-columns: 1fr;
  }

  .yis-product-thead,
  .yis-product-row,
  .yis-product-footer {
    grid-template-columns: 1fr 50px 60px;
  }
}
