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

body {
  font-family: Arial, sans-serif;
  background: #F5F6FA;
  color: #333;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  padding: 24px 0 16px;
  border-bottom: 3px solid #1F3864;
  margin-bottom: 20px;
}

header h1 {
  color: #1F3864;
  font-size: 24px;
  margin-bottom: 2px;
}

header .subtitle {
  color: #666;
  font-size: 13px;
}

header .date {
  color: #2E75B6;
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #DDD;
}

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

.tab.active {
  color: #1F3864;
  border-bottom-color: #2E75B6;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Form */
form {
  background: #FFF;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group.wide { flex: 2; }
.form-group.full { flex: 1 0 100%; }

label {
  font-size: 12px;
  font-weight: 600;
  color: #1F3864;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select {
  padding: 10px 12px;
  border: 1px solid #DDD;
  border-radius: 6px;
  font-size: 14px;
  font-family: Arial, sans-serif;
  transition: border-color 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: #2E75B6;
  box-shadow: 0 0 0 2px rgba(46,117,182,0.15);
}

.toggle-group {
  display: flex;
  gap: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #DDD;
}

.toggle {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: #FFF;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #999;
  transition: all 0.2s;
}

.toggle.active {
  background: #1F3864;
  color: #FFF;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: #2E75B6;
  color: #FFF;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

.btn-submit:hover { background: #1F3864; }
.btn-submit:disabled { background: #CCC; cursor: not-allowed; }

.confirmation {
  background: #C6EFCE;
  color: #2E7D32;
  padding: 14px 20px;
  border-radius: 6px;
  margin-top: 16px;
  font-weight: 600;
  text-align: center;
}

.btn-link {
  background: none;
  border: none;
  color: #2E75B6;
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
  margin-left: 8px;
}

.my-entries {
  margin-top: 20px;
  background: #FFF;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.my-entries h3 {
  color: #1F3864;
  font-size: 14px;
  margin-bottom: 12px;
}

.my-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #F0F0F0;
  font-size: 13px;
}

.my-entry:last-child { border-bottom: none; }

.my-entry .task-info { flex: 1; }
.my-entry .task-name { font-weight: 600; color: #1F3864; }
.my-entry .task-desc { color: #666; margin-left: 8px; }
.my-entry .task-meta { color: #999; font-size: 12px; }

.btn-delete {
  background: none;
  border: none;
  color: #C62828;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.btn-delete:hover { opacity: 1; }

/* Dashboard */
.metrics-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.metric {
  flex: 1;
  background: #1F3864;
  color: #FFF;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.metric.accent { background: #2E75B6; }

.metric-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 2px;
}

.metric-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

h3 {
  color: #1F3864;
  font-size: 15px;
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #DDD;
}

.summary-table, .detail-table {
  width: 100%;
  border-collapse: collapse;
  background: #FFF;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  font-size: 13px;
  margin-bottom: 16px;
}

.summary-table th, .detail-table th {
  background: #1F3864;
  color: #FFF;
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.summary-table td, .detail-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #F0F0F0;
}

.summary-table tr:nth-child(even), .detail-table tr:nth-child(even) {
  background: #F8F9FA;
}

.admin-bar {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #DDD;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-rollup {
  padding: 10px 20px;
  background: #1F3864;
  color: #FFF;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-rollup:hover { background: #2E75B6; }

#rollupStatus {
  font-size: 13px;
  color: #2E7D32;
  font-weight: 600;
}

.ai-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.ai-badge.yes { background: #E3F2FD; color: #1565C0; }
.ai-badge.no { background: #F5F5F5; color: #999; }

/* Task rows */
.section-label {
  font-size: 12px;
  font-weight: 600;
  color: #1F3864;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  margin-top: 8px;
}

.task-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 12px;
  background: #F8F9FA;
  border-radius: 6px;
  border: 1px solid #EEE;
}

.task-row:nth-child(even) {
  background: #FFF;
}

.task-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1F3864;
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.task-row-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  margin-bottom: 4px;
}

.task-input-header, .desc-input-header, .sp-header, .ai-header {
  font-size: 10px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.task-input-header { width: 140px; flex-shrink: 0; }
.desc-input-header { flex: 1; }
.sp-header { width: 52px; text-align: center; flex-shrink: 0; }
.ai-header { width: 140px; text-align: center; flex-shrink: 0; }

.task-input {
  width: 140px;
  flex-shrink: 0;
}

.desc-input {
  flex: 1;
}

.sp-select {
  width: 52px;
  padding: 6px 4px;
  border: 1px solid #DDD;
  border-radius: 4px;
  font-size: 13px;
  font-family: Arial, sans-serif;
  text-align: center;
  flex-shrink: 0;
}

.ai-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.toggle-label {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: 0;
}

.ai-btn {
  padding: 6px 14px;
  border: 1px solid #DDD;
  border-radius: 4px;
  background: #FFF;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #999;
  transition: all 0.2s;
  min-width: 40px;
  text-align: center;
}

.ai-btn.yes {
  background: #2E75B6;
  color: #FFF;
  border-color: #2E75B6;
}

.btn-add-row {
  width: 100%;
  padding: 8px;
  border: 2px dashed #CCC;
  border-radius: 6px;
  background: none;
  color: #999;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.btn-add-row:hover {
  border-color: #2E75B6;
  color: #2E75B6;
  background: #F0F7FF;
}

.ai-tool-select {
  padding: 6px 8px;
  border: 1px solid #DDD;
  border-radius: 4px;
  font-size: 12px;
  font-family: Arial, sans-serif;
  width: 110px;
}

/* Responsive */
@media (max-width: 640px) {
  .form-row { flex-direction: column; gap: 12px; }
  .metrics-bar { flex-wrap: wrap; }
  .metric { min-width: 45%; }
  .summary-table, .detail-table { font-size: 12px; }
}
