/* 管理画面のスタイル */
body {
  font-family: "メイリオ", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #333;
}

/* 共通コンテナ */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ヘッダー */
.admin-header {
  background-color: #1e90ff;
  color: white;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

/* ログインフォーム */
.login-form {
  background-color: white;
  padding: 30px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 0 auto;
}

.login-form h2 {
  margin-top: 0;
  text-align: center;
  margin-bottom: 20px;
}

/* フォームグループ */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-group textarea {
  min-height: 200px;
  resize: vertical;
}

/* ボタン */
.btn-primary,
.btn-secondary,
.btn-danger {
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background-color 0.3s;
}

.btn-primary {
  background-color: #1e90ff;
  color: white;
}

.btn-primary:hover {
  background-color: #007acc;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #c82333;
}

/* テーブル */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-table th,
.admin-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.admin-table th {
  background-color: #f9f9f9;
  font-weight: bold;
}

.admin-table tr:hover {
  background-color: #f5f5f5;
}

/* エラーメッセージ */
.error-message {
  color: #dc3545;
  margin-bottom: 15px;
  font-weight: bold;
}

/* 成功メッセージ */
.success-message {
  color: #28a745;
  margin-bottom: 15px;
  font-weight: bold;
}

/* メニュー */
.admin-menu {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  background-color: white;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* カード */
.admin-card {
  background-color: white;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.admin-card h2 {
  margin-top: 0;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

/* ツールバー */
.toolbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* アクションボタン */
.action-buttons {
  display: flex;
  gap: 5px;
}

.action-buttons button {
  padding: 5px 10px;
  font-size: 0.9rem;
}

/* トグルスイッチ */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* モーダル */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 20px;
  border-radius: 4px;
  max-width: 600px;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 28px;
  cursor: pointer;
}

/* ドラッグハンドル */
.drag-handle {
  cursor: grab;
  color: #aaa;
  margin-right: 5px;
}

/* 状態表示 */
.status-active {
  color: #28a745;
  font-weight: bold;
}

.status-future {
  color: #ffc107;
  font-weight: bold;
}

.status-expired {
  color: #dc3545;
  font-weight: bold;
}

.status-unlimited {
  color: #17a2b8;
  font-weight: bold;
}

.status-none {
  color: #6c757d;
  font-weight: bold;
}

/* モバイル対応 */
@media screen and (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    text-align: center;
  }
  
  .admin-table {
    font-size: 0.9rem;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 8px 10px;
  }
  
  .action-buttons {
    flex-direction: column;
  }
}
