.atc-usage-page {
  background: #F5F0E3;
  color: #17212B;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.atc-usage-main {
  flex: 1 0 auto;
  padding: 24px 16px 48px;
}

.atc-usage-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.atc-usage-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px 0 4px;
  color: #76583D;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}
.atc-usage-back:hover,
.atc-usage-back:focus-visible {
  background: #EDE4D1;
  outline: 2px solid #76583D;
  outline-offset: 2px;
}

.atc-usage-refresh,
.atc-usage-more-btn,
.atc-usage-retry-btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid rgba(118, 88, 61, 0.35);
  background: #FFFDF8;
  color: #17212B;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}
.atc-usage-refresh:hover,
.atc-usage-more-btn:hover,
.atc-usage-retry-btn:hover {
  background: #EDE4D1;
}
.atc-usage-refresh:focus-visible,
.atc-usage-more-btn:focus-visible,
.atc-usage-retry-btn:focus-visible,
.atc-usage-select:focus-visible,
.atc-usage-detail-btn:focus-visible {
  outline: 2px solid #76583D;
  outline-offset: 2px;
}

.atc-usage-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.atc-usage-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.atc-usage-title-row h1 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
  color: #17212B;
}

.atc-usage-access-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #EDE4D1;
  color: #4A3828;
  font-size: 0.8125rem;
  font-weight: 600;
}

.atc-usage-subtitle {
  margin: 0;
  color: #4E5861;
  font-size: 1rem;
}

.atc-usage-card {
  background: #FFFDF8;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 12px;
  padding: 20px;
}

.atc-usage-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.atc-usage-card-head h2 {
  margin: 0;
  font-size: 1.125rem;
  color: #17212B;
}

.atc-usage-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: #EDE4D1;
  color: #4A3828;
}
.atc-usage-status-pill.is-good { background: #E3EFE6; color: #1E5631; }
.atc-usage-status-pill.is-warn { background: #F9ECD2; color: #7A4B00; }
.atc-usage-status-pill.is-exhausted { background: #F7DFDC; color: #8B261D; }
.atc-usage-status-pill.is-info { background: #EDE4D1; color: #4A3828; }

.atc-usage-progress-track {
  width: 100%;
  height: 12px;
  background: #EDE4D1;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.atc-usage-progress-fill {
  height: 100%;
  background: #76583D;
  border-radius: 999px;
  transition: width 0.25s ease;
}
.atc-usage-progress-fill.is-warn { background: #B06A12; }
.atc-usage-progress-fill.is-exhausted { background: #A33127; }

.atc-usage-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.atc-usage-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.atc-usage-stat-label {
  font-size: 0.8125rem;
  color: #55606A;
}
.atc-usage-stat-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: #17212B;
}

.atc-usage-meta-line {
  margin: 6px 0 0;
  font-size: 0.9375rem;
  color: #4E5861;
}
.atc-usage-reserved-note {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: #F5F0E3;
  color: #4A3828;
  font-size: 0.875rem;
}

.atc-usage-select {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(23, 33, 43, 0.2);
  background: #FFFDF8;
  color: #17212B;
  font-size: 0.9375rem;
}

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

.atc-usage-metric {
  background: #F5F0E3;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.atc-usage-metric-label {
  font-size: 0.8125rem;
  color: #55606A;
}
.atc-usage-metric strong {
  font-size: 1rem;
  color: #17212B;
}

.atc-usage-muted {
  color: #55606A;
  font-size: 0.9375rem;
  margin: 0;
}

.atc-usage-table {
  width: 100%;
  border-collapse: collapse;
}
.atc-usage-table th,
.atc-usage-table td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(23, 33, 43, 0.1);
  font-size: 0.9375rem;
  vertical-align: top;
}
.atc-usage-table th {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #55606A;
  font-weight: 600;
}
.atc-usage-table td.num,
.atc-usage-table th.num {
  text-align: right;
  white-space: nowrap;
}

.atc-usage-detail-btn {
  background: none;
  border: 1px solid rgba(118, 88, 61, 0.35);
  border-radius: 6px;
  color: #76583D;
  padding: 6px 10px;
  min-height: 36px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.atc-usage-detail-btn:hover {
  background: #EDE4D1;
}

.atc-usage-detail-panel {
  margin-top: 8px;
  padding: 12px;
  border-radius: 8px;
  background: #F5F0E3;
  font-size: 0.875rem;
  color: #17212B;
}
.atc-usage-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 14px;
  margin: 0;
}
.atc-usage-detail-grid dt {
  font-size: 0.75rem;
  color: #55606A;
}
.atc-usage-detail-grid dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.atc-usage-detail-grid > div { min-width: 0; }
.atc-usage-detail-panel { max-width: 100%; overflow-wrap: anywhere; }

.atc-usage-entry-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #EDE4D1;
  color: #4A3828;
}
.atc-usage-entry-status.is-settled { background: #E3EFE6; color: #1E5631; }
.atc-usage-entry-status.is-released { background: #EEF2F5; color: #3B4A54; }
.atc-usage-entry-status.is-pending { background: #F9ECD2; color: #7A4B00; }

.atc-usage-pagination {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.atc-usage-rules {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #2C3740;
}

.atc-usage-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.atc-usage-skel-bar {
  height: 12px;
  border-radius: 999px;
  background: #EDE4D1;
}
.atc-usage-skel-line {
  height: 20px;
  width: 60%;
  border-radius: 6px;
  background: #EDE4D1;
}

.atc-usage-error-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

@media (max-width: 700px) {
  .atc-usage-card { padding: 16px; }
  .atc-usage-stats-row { grid-template-columns: 1fr; gap: 8px; }
  .atc-usage-breakdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atc-usage-table thead { display: none; }
  .atc-usage-table,
  .atc-usage-table tbody,
  .atc-usage-table tr,
  .atc-usage-table td {
    display: block;
    width: 100%;
  }
  .atc-usage-table tr {
    padding: 12px 0;
    border-bottom: 1px solid rgba(23, 33, 43, 0.12);
  }
  .atc-usage-table td {
    border: none;
    padding: 3px 0;
  }
  .atc-usage-table td.num {
    text-align: left;
  }
}
