/* 花はな Study Manager - Main Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

:root {
  --primary-color: #FF6B9D;
  --secondary-color: #FFA8C5;
  --text-dark: #333;
  --text-light: #666;
  --border-color: #ddd;
  --bg-white: #fff;
  --bg-gray: #f5f5f5;
}

/* ログイン画面 */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-box {
  background: var(--bg-white);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.login-title {
  font-size: 28px;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 30px;
  font-weight: bold;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.btn {
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.btn:hover {
  background: #FF5088;
}

.btn-secondary {
  background: var(--secondary-color);
}

.btn-secondary:hover {
  background: #FF92B5;
}

.error-message {
  background: #ffebee;
  color: #c62828;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

/* ダッシュボードレイアウト */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* サイドバー */
.sidebar {
  width: 250px;
  background: var(--bg-white);
  border-right: 1px solid var(--border-color);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s;
}

.sidebar.mobile-hidden {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: 20px;
  background: var(--primary-color);
  color: white;
}

.sidebar-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 5px;
}

.sidebar-user {
  font-size: 14px;
  opacity: 0.9;
}

.sidebar-menu {
  list-style: none;
  padding: 10px 0;
}

.menu-item {
  padding: 15px 20px;
  color: var(--text-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: background 0.2s;
  cursor: pointer;
}

.menu-item:hover {
  background: var(--bg-gray);
}

.menu-item.active {
  background: var(--bg-gray);
  color: var(--primary-color);
  font-weight: bold;
  border-right: 3px solid var(--primary-color);
}

.menu-icon {
  margin-right: 12px;
  font-size: 18px;
}

/* メインコンテンツ */
.main-content {
  flex: 1;
  margin-left: 250px;
  padding: 20px;
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
  }
}

.page-header {
  background: var(--bg-white);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.page-title {
  font-size: 24px;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.page-description {
  color: var(--text-light);
  font-size: 14px;
}

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

.card-title {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--text-dark);
  font-weight: bold;
}

/* テーブル */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background: var(--bg-gray);
  font-weight: bold;
  color: var(--text-dark);
}

.table tr:hover {
  background: var(--bg-gray);
}

/* モバイルメニュートグル */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 15px;
  font-size: 20px;
  cursor: pointer;
  z-index: 101;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
}

/* グリッドレイアウト */
.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* バッジ */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.badge-primary {
  background: var(--secondary-color);
  color: var(--primary-color);
}

.badge-success {
  background: #c8e6c9;
  color: #2e7d32;
}

/* モーダル */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-white);
  padding: 30px;
  border-radius: 15px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
}
