@import './ManagementPage.shared.css';

.token-setting-management-page__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.token-setting-management-page__quota-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.token-setting-management-page__app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.token-setting-management-page__app-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.token-setting-management-page__app-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.token-setting-management-page__app-card-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.token-setting-management-page__helper {
  margin-top: -2px;
}

.token-setting-management-page__detail-tabs,
.token-setting-management-page__detail-tabs .ant-tabs-content-holder,
.token-setting-management-page__detail-tabs .ant-tabs-content,
.token-setting-management-page__detail-tabs .ant-tabs-tabpane {
  min-height: 0;
  height: 100%;
}

.token-setting-management-page__detail-tabs {
  flex: 1 1 auto;
  overflow: hidden;
}

.token-setting-management-page__detail-tabs .ant-tabs-nav {
  margin-bottom: 10px;
}

.token-setting-management-page__detail-tabs .ant-tabs-nav-wrap {
  padding-bottom: 2px;
}

.token-setting-management-page__detail-tabs .ant-tabs-tab {
  border-radius: 999px;
  padding-inline: 14px;
}

.token-setting-management-page__detail-tabs .ant-tabs-content-holder {
  overflow: hidden;
}

.token-setting-management-page__section-scroll {
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 2px 2px calc(10px + env(safe-area-inset-bottom, 0px)) 0;
}

.token-setting-management-page__form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 12px 0 calc(4px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e5e7eb;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), #ffffff 36%);
}

.token-setting-management-page__form-actions .ant-space {
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .token-setting-management-page__quota-grid,
  .token-setting-management-page__app-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .token-setting-management-page__detail-tabs .ant-tabs-nav {
    margin-bottom: 8px;
  }

  .token-setting-management-page__detail-tabs .ant-tabs-nav-list {
    gap: 4px;
  }

  .token-setting-management-page__detail-tabs .ant-tabs-tab {
    padding-inline: 12px;
  }

  .token-setting-management-page__form-actions {
    align-items: stretch;
  }

  .token-setting-management-page__form-actions .ant-space {
    width: 100%;
  }

  .token-setting-management-page__form-actions .ant-space-item {
    flex: 1 1 calc(50% - 4px);
  }

  .token-setting-management-page__form-actions .ant-btn {
    width: 100%;
  }
}
