/* 単発バイトマッチングアプリ 共通スタイル */

/* ========== 基本設定 ========== */
* {
  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;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

/* ========== モバイルアプリ 共通レイアウト ========== */
.mobile-app {
  max-width: 414px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f5f5f5;
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.mobile-header {
  background: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.mobile-content {
  padding: 16px;
  padding-bottom: 80px;
}

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 414px;
  background: white;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
}

.nav-item {
  flex: 1;
  text-align: center;
  padding: 8px;
  text-decoration: none;
  color: #666;
  font-size: 14px;
  transition: color 0.2s;
  position: relative;
}

.nav-item:hover,
.nav-item.active {
  color: #3b82f6;
}

.nav-item .badge {
  position: absolute;
  top: 0;
  right: 20%;
  background: #ef4444;
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
}

/* ========== 学生アプリ（青系） ========== */
.student-app {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --bg-primary: #eff6ff;
}

.student-app .mobile-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.student-app .btn-primary {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}

.student-app .btn-primary:hover {
  background: var(--primary-dark);
}

.student-app .btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.student-app .btn-secondary:hover {
  background: var(--bg-primary);
}

.student-app .nav-item.active {
  color: var(--primary-color);
}

.student-app .message-bubble.student {
  background: var(--primary-color);
  color: white;
  margin-left: auto;
}

/* ========== 企業アプリ（緑系） ========== */
.company-app {
  --primary-color: #10b981;
  --primary-dark: #059669;
  --primary-light: #34d399;
  --bg-primary: #ecfdf5;
}

.company-app .mobile-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.company-app .btn-primary {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}

.company-app .btn-primary:hover {
  background: var(--primary-dark);
}

.company-app .btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.company-app .btn-secondary:hover {
  background: var(--bg-primary);
}

.company-app .nav-item.active {
  color: var(--primary-color);
}

.company-app .message-bubble.company {
  background: var(--primary-color);
  color: white;
  margin-left: auto;
}

/* ========== 管理者Web（デスクトップ） ========== */
.admin-web {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --bg-primary: #eef2ff;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f9fafb;
}

.admin-header {
  background: white;
  padding: 20px 32px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-content {
  padding: 24px 32px;
}

.admin-web .btn-primary {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.admin-web .btn-primary:hover {
  background: var(--primary-dark);
}

/* ========== カード共通 ========== */
.card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: box-shadow 0.2s;
  cursor: pointer;
}

.card:hover {
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card-header {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #111;
}

.card-subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: #444;
  margin-top: 8px;
}

.card-info-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.badge-available {
  background: #dbeafe;
  color: #1e40af;
}

.badge-applied {
  background: #fef3c7;
  color: #92400e;
}

.badge-confirmed {
  background: #d1fae5;
  color: #065f46;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-resolved {
  background: #e5e7eb;
  color: #374151;
}

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

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #3b82f6;
}

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

/* ========== チャット ========== */
.chat-header {
  background: #f3f4f6;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.chat-messages {
  height: calc(100vh - 300px);
  overflow-y: auto;
  padding: 16px;
  background: white;
  border-radius: 8px;
  margin-bottom: 16px;
}

.message-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  margin-bottom: 12px;
  word-wrap: break-word;
}

.message-bubble.admin {
  background: #f3f4f6;
  color: #111;
  margin-right: auto;
}

.message-time {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  text-align: right;
}

.chat-input-container {
  display: flex;
  gap: 8px;
  position: sticky;
  bottom: 0;
  background: #f5f5f5;
  padding: 12px 0;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 24px;
  font-size: 16px;
}

.chat-send-btn {
  padding: 12px 20px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  font-size: 16px;
}

/* ========== サマリーカード ========== */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.summary-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.summary-number {
  font-size: 32px;
  font-weight: 700;
  color: #111;
}

.summary-label {
  font-size: 14px;
  color: #666;
  margin-top: 4px;
}

/* ========== ログイン画面 ========== */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
  background: white;
  padding: 40px 32px;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #111;
}

.login-subtitle {
  font-size: 14px;
  color: #666;
}

/* ========== タブ ========== */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e5e7eb;
}

.tab {
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

.tab:hover {
  color: #3b82f6;
}

/* ========== ユーティリティ ========== */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
