
:root {
  --card-radius: 16px;
  --app-side-padding: clamp(12px, 2vw, 32px);
}

body {
  background: #f5f7fb;
  min-width: 320px;
}

.app-main {
  width: 100%;
  max-width: none;
  padding-left: var(--app-side-padding);
  padding-right: var(--app-side-padding);
}

.card {
  border: 0;
  border-radius: var(--card-radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.table {
  background: #fff;
}

.table th,
.table td {
  vertical-align: middle;
}

.badge {
  font-weight: 600;
}

.login-wrap {
  max-width: 440px;
  margin: 8vh auto;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: .04em;
}

.small-muted {
  color: #64748b;
  font-size: .9rem;
}

.form-required::after {
  content: ' *';
  color: #dc3545;
}

/* 横幅を広く使うための共通調整 */
@media (min-width: 1400px) {
  .app-main {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (min-width: 1700px) {
  .app-main {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* テーブル系画面の横スクロールを必要な時だけ出す */
.table-responsive,
.customer-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.customer-table-wrap {
  padding-bottom: .25rem;
}

.customer-summary-table {
  width: 100%;
}

/* 大きい画面では顧客一覧をなるべく1画面に収める */
@media (min-width: 1500px) {
  .customer-summary-table {
    min-width: 0 !important;
    table-layout: auto;
    font-size: .86rem;
  }

  .customer-summary-table th,
  .customer-summary-table td {
    padding: .72rem .42rem;
  }

  .customer-summary-table th {
    font-size: .8rem;
    line-height: 1.25;
  }

  .customer-summary-table .company-col {
    min-width: 128px !important;
    max-width: 160px;
    white-space: normal !important;
  }

  .customer-summary-table .notes-col {
    min-width: 120px !important;
    max-width: 180px !important;
  }

  .customer-summary-table .actions-col {
    min-width: 150px !important;
  }

  .customer-summary-table .btn-sm {
    padding: .18rem .42rem;
    font-size: .78rem;
  }
}

/* 中くらいのPCでは横スクロールを許容しつつ、余白は最小限に */
@media (max-width: 1499.98px) {
  .app-main {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* スマホでは詰まりすぎないようにカード・フォームを縦積みに近づける */
@media (max-width: 767.98px) {
  .app-main {
    padding-left: 10px;
    padding-right: 10px;
    margin-top: 1rem !important;
  }

  .card {
    border-radius: 12px;
    padding: 1rem !important;
  }

  h1.h4,
  .h4 {
    font-size: 1.15rem;
  }

  .navbar .btn-sm {
    margin-top: .5rem;
  }

  .table {
    font-size: .86rem;
  }

  .customer-summary-table {
    min-width: 1180px !important;
  }
}
