.fat-wrap {
  margin: 30px 0;
}

.fat-card {
  border: 1px solid #e8e2e2;
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(180deg, #fffefe 0%, #fff9fb 100%);
  box-shadow: 0 8px 24px rgba(232, 77, 114, 0.06);
}

.fat-card * {
  box-sizing: border-box;
}

.fat-kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff0f4;
  color: #d9476c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.fat-kicker-large {
  padding: 8px 14px;
  font-size: 14px;
}

.fat-section-title {
  margin: 0 0 10px;
  padding: 0;
  border: none;
  position: relative;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .01em;
  color: #222;
}

.fat-section-title::after {
  content: "";
  display: block;
  width: 290px;
  max-width: 42%;
  height: 3px;
  margin-top: 12px;
  border-radius: 999px;
  background: #e08a34;
}

.fat-help {
  margin: 0 0 18px;
  color: #555;
  font-size: 15px;
  line-height: 1.8;
}

.fat-alert {
  border-radius: 14px;
  padding: 12px 14px;
  margin: 14px 0;
  font-size: 14px;
}

.fat-alert-success {
  background: #fff0f4;
  color: #be185d;
}

.fat-alert-error {
  background: #fff7ed;
  color: #9a3412;
}

.fat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px 18px;
  margin: 0 0 18px;
}

.fat-form label,
.fat-filters label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #ece7e7;
  border-radius: 14px;
  background: #fff;
}

.fat-form label span,
.fat-filters label span {
  min-width: 88px;
  flex: 0 0 88px;
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: #222;
  margin: 0;
  word-break: keep-all;
}

.fat-form input[type="number"],
.fat-form input[type="month"],
.fat-form select,
.fat-filters select {
  min-width: 220px;
  width: auto;
  max-width: 100%;
  height: 46px;
  border: 1px solid #ddd6c8;
  border-radius: 14px;
  padding: 0 12px;
  font-size: 16px;
  background-color: #fbf7ea;
  color: #222;
  box-sizing: border-box;
}

.fat-form input[type="number"] {
  background: #fff;
}

.fat-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, opacity .2s ease;
}

.fat-button:hover {
  opacity: .95;
  transform: translateY(-1px);
}

.fat-button-submit {
  background: linear-gradient(135deg, #ea5c7f 0%, #df3f69 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(223, 63, 105, 0.18);
}

.fat-button-secondary,
.fat-button-filter {
  background: #374151;
  color: #fff;
  box-shadow: none;
}

.fat-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px 18px;
  align-items: end;
  margin: 18px 0 12px;
}

.fat-filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  white-space: nowrap;
}

.fat-button-filter {
  min-width: 110px;
  padding: 12px 18px;
}

.fat-reset-link {
  color: #4b5563;
  font-size: 14px;
  text-decoration: underline;
}

.fat-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.fat-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  color: #374151;
}

.fat-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin: 16px 0 20px;
}

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

.fat-stat-box {
  border: 1px solid #efe7e7;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.fat-stat-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: #666;
}

.fat-stat-box span {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.4;
  color: #222;
}

.fat-chart {
  display: grid;
  gap: 12px;
  margin-bottom: 4px;
}

.fat-chart-row {
  display: grid;
  grid-template-columns: 86px 1fr 120px;
  gap: 12px;
  align-items: center;
}

.fat-chart-label {
  font-size: 14px;
  color: #374151;
}

.fat-chart-bar-wrap {
  height: 14px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
}

.fat-chart-bar {
  height: 100%;
  background: linear-gradient(90deg, #111827 0%, #6b7280 100%);
  border-radius: 999px;
}

.fat-chart-value-wrap {
  text-align: right;
  white-space: nowrap;
}

.fat-chart-value {
  font-size: 14px;
  font-weight: 800;
  color: #111827;
}

.fat-chart-meta {
  font-size: 12px;
  color: #6b7280;
}

.fat-table-wrap {
  overflow-x: auto;
}

.fat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.fat-table th {
  background: #e08a34;
  color: #fff;
  font-weight: 700;
}

.fat-table th,
.fat-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.fat-admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fat-admin-wrap .fat-card {
  margin-top: 20px;
}

#fat-trend-dashboard {
  scroll-margin-top: 24px;
}

@media (max-width: 767px) {
  .fat-wrap {
    margin: 24px 0;
  }

  .fat-card {
    padding: 14px;
    border-radius: 18px;
  }

  .fat-kicker {
    margin-bottom: 8px;
  }

  .fat-kicker-large {
    padding: 7px 12px;
    font-size: 13px;
  }

  .fat-section-title {
    font-size: 22px;
    line-height: 1.45;
  }

  .fat-section-title::after {
    width: 150px;
    max-width: 55%;
    margin-top: 10px;
  }

  .fat-help {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 14px;
  }

  .fat-grid,
  .fat-filters,
  .fat-stats,
  .fat-stats-2,
  .fat-stats-3 {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .fat-form label,
  .fat-filters label {
    padding: 10px 10px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    border-radius: 16px;
  }

  .fat-form label span,
  .fat-filters label span {
    min-width: 0;
    flex: none;
    font-size: 13px;
    line-height: 1.4;
  }

  .fat-form input[type="number"],
  .fat-form input[type="month"],
  .fat-form select,
  .fat-filters select {
    width: 100%;
    min-width: 0;
    height: 40px;
    font-size: 15px;
    border-radius: 12px;
  }

  .fat-filter-actions {
    gap: 10px;
  }

  .fat-button {
    padding: 12px 18px;
    font-size: 14px;
  }

  .fat-button-filter {
    min-width: 0;
    padding: 10px 16px;
  }

  .fat-chip-row {
    gap: 6px;
    margin-bottom: 12px;
  }

  .fat-chip {
    padding: 5px 8px;
    font-size: 11px;
  }

  .fat-stat-box {
    padding: 12px 14px;
  }

  .fat-stat-box strong {
    font-size: 12px;
  }

  .fat-stat-box span {
    font-size: 18px;
  }

  .fat-chart {
    gap: 10px;
  }

  .fat-chart-row {
    grid-template-columns: 62px 1fr 84px;
    gap: 7px;
  }

  .fat-chart-label {
    font-size: 11px;
  }

  .fat-chart-value {
    font-size: 12px;
  }

  .fat-chart-meta {
    font-size: 10px;
    line-height: 1.35;
  }

  .fat-chart-bar-wrap {
    height: 10px;
  }
}



/* v0.3.9 UI adjustments */
.fat-kicker-large{
  padding: 9px 16px;
  font-size: 15px;
  font-weight: 800;
}

.fat-form label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #ece7e7;
  border-radius: 14px;
  background: #fff;
}

.fat-form label span {
  min-width: 88px;
  flex: 0 0 88px;
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: #222;
  margin: 0;
  word-break: keep-all;
}

.fat-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
  align-items: stretch;
  margin: 18px 0 12px;
}

.fat-filters label {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #ece7e7;
  border-radius: 14px;
  background: #fff;
  min-width: 0;
}

.fat-filters label span {
  min-width: 0;
  flex: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: #222;
  margin: 0;
}

.fat-filters select {
  width: 100%;
  min-width: 0;
}

.fat-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  padding-top: 2px;
}

.fat-button-filter {
  min-width: 120px;
  padding: 12px 18px;
}

.fat-chip-row {
  margin: 4px 0 16px;
}

@media (max-width: 1024px) {
  .fat-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .fat-filters {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .fat-form label,
  .fat-filters label {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
  }

  .fat-form label span,
  .fat-filters label span {
    min-width: 0;
    flex: none;
  }

  .fat-form input[type="number"],
  .fat-form input[type="month"],
  .fat-form select,
  .fat-filters select {
    width: 100%;
    min-width: 0;
  }

  .fat-filter-actions {
    padding-top: 0;
  }

  .fat-button-filter {
    min-width: 0;
  }
}


/* v0.4.0 mobile month field and submit note */
.fat-submit-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: #6b7280;
}

.fat-form input[type="month"] {
  width: 100%;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  background-clip: padding-box;
  line-height: normal;
}

.fat-form input[type="month"]::-webkit-calendar-picker-indicator {
  opacity: 1;
}

@supports (-webkit-touch-callout: none) {
  .fat-form input[type="month"] {
    min-height: 46px;
    padding-right: 14px;
  }
}

@media (max-width: 767px) {
  .fat-submit-note {
    font-size: 11px;
    margin-top: 8px;
  }

  .fat-form input[type="month"] {
    min-height: 44px;
    height: 44px;
    font-size: 16px;
    line-height: 1.2;
    padding-right: 12px;
  }
}
