:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --success: #16A34A;
  --success-light: #DCFCE7;
  --danger: #DC2626;
  --danger-light: #FEE2E2;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --bg-page: #F1F5F9;
  --bg-card: #FFFFFF;
  --border: #E2E8F0;
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.app-wrapper {
  width: 100%;
  max-width: 480px;
  background-color: var(--bg-page);
  min-height: 100vh;
  padding: 16px;
  display: flex;
  flex-direction: column;
  padding-bottom: 40px;
}

/* Auth View */
.auth-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}

.auth-card {
  background: var(--bg-card);
  padding: 32px 24px;
  border-radius: 20px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
  border: 1px solid var(--border);
}

.auth-logo {
  font-size: 54px;
  margin-bottom: 12px;
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.auth-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.btn-social {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  border: none;
  margin-bottom: 12px;
  transition: transform 0.1s ease;
}

.btn-social:active {
  transform: scale(0.98);
}

.btn-google {
  background: #FFFFFF;
  color: #1F2937;
  border: 1px solid #D1D5DB;
}

.btn-tiktok {
  background: #000000;
  color: #FFFFFF;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  font-size: 32px;
}

.user-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.user-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary);
  text-transform: uppercase;
}

.btn-logout {
  background: var(--danger-light);
  color: var(--danger);
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

/* Meta Card */
.card-meta {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

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

.meta-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.meta-points {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

.progress-track {
  width: 100%;
  height: 10px;
  background: #E2E8F0;
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB, #3B82F6);
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* Secciones */
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 16px 0 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Integrantes */
.members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.member-item {
  background: var(--bg-card);
  padding: 12px 14px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
}

.member-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-name {
  font-size: 14px;
  font-weight: 600;
}

.member-role {
  font-size: 11px;
  color: var(--text-muted);
}

.member-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pts-badge {
  font-size: 13px;
  font-weight: 800;
  color: var(--success);
  background: var(--success-light);
  padding: 4px 8px;
  border-radius: 20px;
}

.btn-del {
  background: var(--danger-light);
  color: var(--danger);
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 13px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Selector Días */
.days-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.days-bar::-webkit-scrollbar {
  display: none;
}

.day-chip {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.day-chip.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* Tareas */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.task-item {
  background: var(--bg-card);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
}

.task-item.completed {
  background: #F0FDF4;
  border-color: #BBF7D0;
}

.task-info {
  flex: 1;
}

.task-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.task-item.completed .task-title {
  text-decoration: line-through;
  color: #94A3B8;
}

.task-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-check {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

/* Formularios */
.card-form {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  outline: none;
  background: #FFF;
}

input:focus, select:focus {
  border-color: var(--primary);
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: #FFF;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-accent {
  background: var(--success);
}
