* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #1a1a1a;
  background: #f5f5f0;
}

/* ログイン画面 */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #f5f5f0;
}

.login-wrap {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 0.5px solid #ddd;
  margin: 20px;
}

.login-header {
  background: #185FA5;
  padding: 28px 24px 24px;
  text-align: center;
}

.login-header h1 {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
}

.login-header p {
  color: #B5D4F4;
  font-size: 12px;
  margin-top: 4px;
}

.login-wrap form {
  padding: 24px 24px 0;
}

.login-hint {
  font-size: 11px;
  color: #888;
  text-align: center;
  padding: 16px 24px 24px;
  line-height: 1.6;
}

/* フォーム部品 */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: #555;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 0.5px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a1a;
  background: #fff;
  outline: none;
}

.form-group input:focus {
  border-color: #185FA5;
}

/* ボタン */
.btn-primary {
  padding: 11px 20px;
  background: #185FA5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.btn-primary:hover {
  background: #0C447C;
}

.btn-block {
  width: 100%;
}

.btn-secondary {
  padding: 8px 16px;
  background: transparent;
  color: #555;
  border: 0.5px solid #ccc;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-danger {
  background: #A32D2D;
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

/* アラート */
.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin: 16px 24px 0;
}

.alert-error {
  background: #FCEBEB;
  color: #791F1F;
  border: 0.5px solid #F09595;
}

.alert-success {
  background: #EAF3DE;
  color: #27500A;
  border: 0.5px solid #97C459;
}

/* レイアウト */
.layout {
  display: flex;
  min-height: 100vh;
}

/* サイドバー */
.sidebar {
  width: 210px;
  flex-shrink: 0;
  background: #0C447C;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.25s ease;
}

.sidebar-logo {
  padding: 16px 14px 12px;
  border-bottom: 0.5px solid rgba(255,255,255,0.1);
}

.sidebar-logo h1 {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.sidebar-logo p {
  color: #85B7EB;
  font-size: 11px;
  margin-top: 2px;
}

.sidebar-user {
  padding: 10px 14px;
  border-bottom: 0.5px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #185FA5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  font-weight: 500;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 12px;
  color: #B5D4F4;
}

.sidebar-user-role {
  font-size: 11px;
  color: #378ADD;
}

.menu-section {
  padding: 8px 0;
}

.menu-section-label {
  font-size: 10px;
  color: #378ADD;
  font-weight: 500;
  padding: 4px 14px 5px;
  letter-spacing: 0.06em;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 22px;
  font-size: 12px;
  color: #B5D4F4;
  text-decoration: none;
  border-left: 2px solid transparent;
}

.menu-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.menu-item.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-left-color: #fff;
}

.menu-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  flex-shrink: 0;
}

.menu-divider {
  height: 0.5px;
  background: rgba(255,255,255,0.1);
  margin: 2px 0;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 10px 14px;
  border-top: 0.5px solid rgba(255,255,255,0.1);
}

.sidebar-bottom a {
  font-size: 12px;
  color: #85B7EB;
  text-decoration: none;
}

/* メインコンテンツ */
.main {
  flex: 1;
  margin-left: 210px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: #fff;
  border-bottom: 0.5px solid #e0e0e0;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}

.topbar-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #333;
  border-radius: 1px;
}

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

.breadcrumb-cur {
  color: #1a1a1a;
  font-weight: 500;
}

.content {
  padding: 20px;
  flex: 1;
}

/* カード */
.card {
  background: #fff;
  border: 0.5px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.card-header {
  padding: 12px 16px;
  border-bottom: 0.5px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 14px;
  font-weight: 500;
}

/* メトリクス */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.metric {
  background: #fff;
  border: 0.5px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
}

.metric-label {
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 24px;
  font-weight: 500;
}

/* バッジ */
.badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 6px;
}

.badge-mandatory { background: #FCEBEB; color: #791F1F; }
.badge-optional  { background: #f0f0f0; color: #888; }
.badge-venue     { background: #E6F1FB; color: #0C447C; }
.badge-video     { background: #EAF3DE; color: #27500A; }
.badge-pending   { background: #FAEEDA; color: #633806; }
.badge-absent    { background: #FCEBEB; color: #791F1F; }
.badge-done      { background: #EAF3DE; color: #27500A; }

/* テーブル */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tbl th {
  text-align: left;
  font-size: 11px;
  color: #888;
  font-weight: 500;
  padding: 6px 12px;
  border-bottom: 0.5px solid #e0e0e0;
  background: #f8f8f8;
}

.tbl td {
  padding: 10px 12px;
  border-bottom: 0.5px solid #f0f0f0;
  vertical-align: middle;
}

.tbl tr:last-child td {
  border-bottom: none;
}

/* プログレスバー */
.progress-wrap {
  padding: 0 16px 4px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
}

.progress-track {
  height: 5px;
  background: #f0f0f0;
  border-radius: 3px;
}

.progress-fill {
  height: 5px;
  background: #185FA5;
  border-radius: 3px;
}

/* ウェルカムバナー */
.welcome {
  background: #185FA5;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.welcome-title {
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}

.welcome-sub {
  color: #B5D4F4;
  font-size: 12px;
  margin-top: 3px;
}

/* スマホ対応 */
.sp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 90;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-210px);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sp-overlay.open {
    display: block;
  }

  .main {
    margin-left: 0;
  }

  .topbar-menu-btn {
    display: flex;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}
