:root {
    --color-primary: #2563eb;
    --color-secondary: #64748b;
    --color-accent: #0ea5e9;
    --color-bg: #f8fafc;
    --color-text: #1e293b;
    --color-border: #e2e8f0;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
  }

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

  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Sans", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
  }
  
  /* ログイン・登録画面 */
  .auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    padding: 20px;
  }
  
  .auth-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.5s ease-out;
  }
  
  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .auth-header {
    text-align: center;
    margin-bottom: 30px;
  }
  
  .auth-header h1 {
    font-size: 36px;
    color: var(--color-primary);
    margin-bottom: 10px;
  }
  
  .auth-header p {
    color: #666;
    font-size: 14px;
  }
  
  .auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
  }
  
  .auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
  }
  
  .auth-tab.active {
    background: var(--color-primary);
    color: white;
  }
  
  .auth-form {
    display: none;
  }
  
  .auth-form.active {
    display: block;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
  }
  
  .form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
  }
  
  .form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
  }
  
  .form-textarea {
    resize: vertical;
  }
  
  .btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .btn-primary {
    background: var(--color-primary);
    color: white;
  }
  
  .btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
  }

  .btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
  }

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

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

  .btn-success {
    background: #2ecc71;
    color: white;
  }
  
  .btn-success:hover {
    background: #27ae60;
  }
  
  .btn-large {
    padding: 15px 40px;
    font-size: 16px;
  }
  
  .auth-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
    min-height: 20px;
  }
  
  /* メインアプリ */
  #mainApp {
    display: none;
  }
  
  /* ヘッダー */
  .app-header {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }
  
  .header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .header-left h1 {
    font-size: 20px;
    color: var(--color-primary);
  }
  
  .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
  }
  
  .user-badge {
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
  }
  
  .admin-btn {
    background: var(--color-secondary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
  }

  .admin-btn:hover {
    background: #475569;
  }

  .logout-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
  }

  .logout-btn:hover {
    background: #5568d3;
  }
  
  /* 日付選択UI */
  .date-selector {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .date-selector::-webkit-scrollbar {
    display: none;
  }
  
  .date-item {
    min-width: 80px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
  }
  
  .date-item:hover {
    background: #e8e8e8;
  }
  
  .date-item.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: scale(1.05);
  }
  
  .date-day {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
  }
  
  .date-number {
    font-size: 20px;
    font-weight: bold;
  }
  
  /* ボトムナビゲーション */
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 100;
  }
  
  .nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px 12px;
    transition: all 0.3s;
    color: #999;
  }
  
  .nav-btn.active {
    color: var(--color-primary);
  }
  
  .nav-icon {
    font-size: 24px;
  }
  
  .nav-label {
    font-size: 11px;
    font-weight: 500;
  }
  
  /* メインコンテンツ */
  .main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 80px;
  }
  
  .content-section {
    display: none;
  }
  
  .content-section.active {
    display: block;
  }
  
  /* タスクリスト */
  .date-group {
    margin-bottom: 30px;
    animation: fadeIn 0.3s;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .date-group-header {
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .date-group-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
  }
  
  .date-group-subtitle {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
  }
  
  .task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  /* タスクカード */
  .task-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
    border-left: 4px solid var(--color-primary);
  }
  
  .task-card.priority-high {
    border-left-color: #ff4757;
  }
  
  .task-card.priority-medium {
    border-left-color: #ffa502;
  }
  
  .task-card.priority-low {
    border-left-color: #1e90ff;
  }
  
  .task-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
  }
  
  .task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
  }
  
  .task-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    flex: 1;
  }
  
  .priority-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 10px;
  }
  
  .priority-high {
    background: #ff4757;
    color: white;
  }
  
  .priority-medium {
    background: #ffa502;
    color: white;
  }
  
  .priority-low {
    background: #1e90ff;
    color: white;
  }
  
  .task-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
  }
  
  .task-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
  }
  
  /* 出欠管理 */
  .attendance-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .attendance-submit {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
  }
  
  .attendance-submit h3 {
    margin-bottom: 20px;
    font-size: 20px;
  }
  
  .date-input-large {
    width: 100%;
    max-width: 300px;
    padding: 15px;
    font-size: 16px;
    border: 2px solid var(--color-primary);
    border-radius: 12px;
    margin-bottom: 20px;
  }
  
  .attendance-list {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .attendance-list h3 {
    margin-bottom: 15px;
    font-size: 18px;
  }
  
  .attendance-date-selector {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
  }
  
  .attendance-date-btn {
    min-width: 100px;
    padding: 10px 15px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
  }
  
  .attendance-date-btn:hover {
    background: #e8e8e8;
  }
  
  .attendance-date-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
  }
  
  .attendance-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  
  .stat-box {
    flex: 1;
    min-width: 120px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
  }
  
  .stat-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
  }
  
  .stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-primary);
  }
  
  .attendee-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .attendee-item {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .attendee-name {
    font-weight: 500;
  }
  
  .attendee-team {
    font-size: 12px;
    color: #999;
  }
  
  /* FAB */
  .fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    transition: all 0.3s;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .fab:hover {
    transform: scale(1.1);
  }
  
  /* モーダル */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
  }
  
  .modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 50px auto;
    width: 90%;
    max-width: 600px;
    animation: slideUp 0.3s;
  }
  
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
  }
  
  .modal-title {
    font-size: 22px;
    font-weight: bold;
  }
  
  .close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
  }
  
  .close-btn:hover {
    color: #333;
  }
  
  .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
  }
  
  /* タスク回答エリア */
  .response-area {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
  }
  
  .response-area h4 {
    margin-bottom: 15px;
    font-size: 16px;
  }
  
  .choice-option {
    padding: 12px;
    margin-bottom: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .choice-option:hover {
    border-color: var(--color-primary);
    background: white;
  }
  
  .choice-option.selected {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
  }
  
  .checklist-item {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
  }
  
  .checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
  }
  
  .response-submitted {
    padding: 20px;
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
  }
  
  .response-submitted h4 {
    color: #155724;
    margin-bottom: 10px;
  }

  .response-submitted p {
    color: #155724;
  }

  /* Task Responses Table */
  .all-responses {
    margin-top: 24px;
  }

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

  .responses-header h4 {
    font-size: 18px;
    color: var(--color-text);
    margin: 0;
  }

  .responses-table-container {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    overflow-x: auto;
  }

  .responses-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
  }

  .responses-table thead {
    background: var(--color-bg);
    border-bottom: 2px solid var(--color-border);
  }

  .responses-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--color-text);
    font-size: 14px;
    white-space: nowrap;
  }

  .responses-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 14px;
    vertical-align: top;
  }

  .responses-table tbody tr:hover {
    background: var(--color-bg);
  }

  .responses-table tbody tr:last-child td {
    border-bottom: none;
  }

  .responses-table .response-user {
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
  }

  .responses-table .response-team {
    color: var(--color-secondary);
    font-size: 13px;
  }

  .responses-table .response-content {
    max-width: 400px;
  }

  .responses-table .response-time {
    color: var(--color-secondary);
    font-size: 13px;
    white-space: nowrap;
  }

  .response-summary {
    font-size: 14px;
    color: var(--color-secondary);
    margin-top: 5px;
  }

  .not-submitted {
    color: #999;
    font-style: italic;
  }

  .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
  }

  .status-badge.completed {
    background: #d4edda;
    color: #155724;
  }

  .status-badge.pending {
    background: #f8d7da;
    color: #721c24;
  }

  .responses-table tbody tr.not-responded {
    background: #f8f9fa;
  }

  .responses-table tbody tr.responded {
    background: white;
  }

  /* Responsive table */
  @media (max-width: 768px) {
    .responses-table {
      font-size: 12px;
    }

    .responses-table th,
    .responses-table td {
      padding: 10px 8px;
    }

    .responses-table .response-content {
      max-width: 200px;
    }
  }
/* カスタムラジオボタン */
.radio-group {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 12px 20px;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  transition: all 0.2s;
  flex: 1;
}

.radio-option:hover {
  border-color: var(--color-primary);
  background: var(--color-bg);
}

.radio-option input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  position: relative;
  transition: all 0.2s;
}

.radio-option input[type="radio"]:checked + .radio-custom {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

.radio-option input[type="radio"]:checked ~ span {
  font-weight: 600;
  color: var(--color-primary);
}

/* ボタンの改善 */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn-submit .btn-icon {
  transition: transform 0.3s;
}

.btn-submit:hover .btn-icon {
  transform: translateX(4px);
}

.btn-submit::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-submit:hover::before {
  width: 300px;
  height: 300px;
}
