/* ============================================================
   基本設定
   ============================================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN',
               'Noto Sans JP', sans-serif;
  font-size: 14px;
  color: #333;
  background: #f5f5f5;
}

a { color: #2196F3; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   ログイン画面
   ============================================================ */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
}

.login-wrap {
  width: 100%;
  max-width: 400px;
  padding: 1rem;
}

.login-box {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.login-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #1a73e8;
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* ============================================================
   フォーム
   ============================================================ */
.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.4rem;
  color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

/* ============================================================
   ボタン
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  text-align: center;
}

.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.98); }

.btn-primary  { background: #1a73e8; color: #fff; }
.btn-success  { background: #34a853; color: #fff; }
.btn-warning  { background: #fbbc04; color: #333; }
.btn-danger   { background: #ea4335; color: #fff; }
.btn-secondary{ background: #9e9e9e; color: #fff; }
.btn-block    { display: block; width: 100%; }
.btn-sm       { padding: 0.4rem 0.8rem; font-size: 12px; }

/* ============================================================
   アラート
   ============================================================ */
.alert {
  padding: 0.8rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 13px;
}

.alert-error   { background: #fce8e6; color: #c62828; border: 1px solid #ef9a9a; }
.alert-warning { background: #fff8e1; color: #e65100; border: 1px solid #ffe082; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-info    { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }

/* ============================================================
   レイアウト（ログイン後）
   ============================================================ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* サイドバー */
.sidebar {
  width: 220px;
  background: #1a1a2e;
  color: #ccc;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 1.5rem 1rem;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
  border-bottom: 1px solid #333;
  text-align: center;
}

.sidebar-nav { flex: 1; padding: 1rem 0; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.2rem;
  color: #bbb;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  font-size: 13px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: #16213e;
  color: #fff;
}

.sidebar-nav .nav-section {
  padding: 1rem 1.2rem 0.3rem;
  font-size: 10px;
  text-transform: uppercase;
  color: #666;
  letter-spacing: 1px;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid #333;
  font-size: 12px;
  color: #888;
}

/* メインコンテンツ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
}

.topbar-user {
  font-size: 13px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

/* ============================================================
   カード
   ============================================================ */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  font-weight: bold;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body { padding: 1.5rem; }

/* ============================================================
   テーブル
   ============================================================ */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  background: #f8f9fa;
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: bold;
  color: #555;
  border-bottom: 2px solid #e0e0e0;
  white-space: nowrap;
}

td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

tr:hover td { background: #fafafa; }

/* ============================================================
   ステータスバッジ
   ============================================================ */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
}

.badge-confirmed  { background: #e3f2fd; color: #1565c0; }
.badge-called     { background: #fff8e1; color: #e65100; }
.badge-in_exam    { background: #f3e5f5; color: #6a1b9a; }
.badge-done       { background: #e8f5e9; color: #2e7d32; }
.badge-cancelled  { background: #f5f5f5; color: #757575; }
.badge-no_show    { background: #fce8e6; color: #c62828; }

/* ============================================================
   ダッシュボード統計
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.2rem;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-top: 4px solid #1a73e8;
}

.stat-card.green  { border-top-color: #34a853; }
.stat-card.orange { border-top-color: #fbbc04; }
.stat-card.red    { border-top-color: #ea4335; }

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 12px;
  color: #888;
}

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .sidebar-logo,
  .sidebar-nav .nav-section,
  .sidebar-nav a span,
  .sidebar-footer { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
/* チェックボックス横並び */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  white-space: nowrap;
  font-weight: normal;
}
