/* Typography */
h1, h2, h3, h4 {
  color: var(--text-main);
  margin-bottom: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 5px rgba(79, 70, 229, 0.3);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-ai {
  background: var(--ai-accent);
  color: white;
  box-shadow: 0 4px 15px var(--ai-glow);
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-color);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  position: sticky;
  top: 0;
  background: var(--bg-color);
  z-index: 10;
  border-bottom: 1px solid var(--border-color);
}

.header-title h1 {
  font-size: 1.25rem;
  margin: 0;
}

.header-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Avatar */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}
.avatar-sm { width: 32px; height: 32px; }

/* Cards */
.card {
  background-color: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}

/* Task Card */
.task-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

.task-card:active {
  transform: scale(0.98);
}

.task-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.task-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.task-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
}

/* Badges */
.badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-new { background-color: rgba(59, 130, 246, 0.1); color: var(--status-new); }
.badge-progress { background-color: rgba(245, 158, 11, 0.1); color: var(--status-progress); }
.badge-done { background-color: rgba(16, 185, 129, 0.1); color: var(--status-done); }
.badge-late { background-color: rgba(239, 68, 68, 0.1); color: var(--status-late); }

/* Progress Bar */
.progress-container {
  width: 100%;
  height: 6px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  margin-top: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* AI Element */
.ai-box {
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  gap: 12px;
}
.ai-box i {
  color: #a855f7;
  font-size: 1.5rem;
}

/* Inputs */
.form-group {
  margin-bottom: 16px;
}

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

.form-control {
  width: 100%;
  padding: 14px 16px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
}

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

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background-color: var(--surface-color);
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  border-top: 1px solid var(--border-color);
  z-index: 100;
  /* iPhone home indicator space */
  padding-bottom: calc(12px + env(safe-area-inset-bottom)); 
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  gap: 4px;
  transition: color 0.2s;
}

.nav-item i {
  font-size: 1.5rem;
}

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

.nav-item.active i {
  /* Filled icon hack for boxicons */
  font-weight: 900;
}
