/* ══════════════════════════════════════════════
   CAIS Federal Portal — Shared Components
   Reusable styles for both desktop and mobile.
   ══════════════════════════════════════════════ */

/* ── Buttons ── */
.btn {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-button);
  border: none;
  cursor: pointer;
  transition: background 0.15s var(--ease-out), transform 0.15s var(--ease-out);
  line-height: 1;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--copper); color: #fff; }
.btn-primary:hover { background: #b0632f; }

.btn-secondary {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--copper); }

.btn-sm { font-size: 0.75rem; padding: 6px 14px; border-radius: 8px; }
.btn-full { width: 100%; }

a.btn { display: inline-block; text-decoration: none; }

.invoice-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ── Inputs ── */
.input {
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--white);
  color: var(--black);
  outline: none;
  transition: border-color 0.15s var(--ease-out), background 0.3s;
  width: 100%;
}
.input:focus { border-color: var(--copper); box-shadow: var(--copper-glow-shadow); }
.input::placeholder { color: var(--light-gray); }

.textarea {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--black);
  line-height: 1.65;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--white);
  resize: vertical;
  outline: none;
  width: 100%;
  transition: border-color 0.15s var(--ease-out), background 0.3s, color 0.3s;
}
.textarea:focus { border-color: var(--copper); box-shadow: var(--copper-glow-shadow); }

.select {
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--white);
  color: var(--black);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  transition: border-color 0.15s var(--ease-out), background 0.3s, color 0.3s;
}
.select:focus { border-color: var(--copper); }

/* ── Cards ── */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.3s, border-color 0.3s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--black);
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light-gray);
}

.card-body {
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.6;
}

/* ── Status Chips ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s, border-color 0.3s;
}

.chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chip.green .dot { background: var(--green); }
.chip.amber .dot { background: var(--amber); }
.chip.red .dot { background: var(--red); }
.chip.copper .dot { background: var(--copper); }

/* ── Badges ── */
.badge {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  background: var(--copper-light);
  color: var(--copper);
  padding: 2px 6px;
  border-radius: var(--radius-badge);
  min-width: 18px;
  text-align: center;
}

/* ── Priority Pills ── */
.priority {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.priority.urgent { color: var(--red); background: var(--red-light); }
.priority.high { color: var(--amber); background: var(--amber-light); }
.priority.normal { color: var(--green); background: var(--green-light); }

/* ── Author Tag ── */
.author-tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--copper);
  background: var(--copper-light);
  padding: 2px 6px;
  border-radius: var(--radius-badge);
}

/* ── Checkboxes ── */
.checkbox {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-checkbox);
  border: 2px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
}
.checkbox:hover { border-color: var(--copper); }
.checkbox.done { background: var(--copper); border-color: var(--copper); }
.checkbox.done::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

/* ── Delete Button ── */
.delete-btn {
  background: none;
  border: none;
  color: var(--light-gray);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}
.delete-btn:hover { color: var(--red); background: var(--red-light); }

/* ── Section Labels ── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light-gray);
  margin-bottom: 1.2rem;
}

/* ── Dividers ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
  transition: background 0.3s;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--light-gray);
  font-size: 0.88rem;
}

/* ── Progress Bar ── */
.progress-track {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  transition: background 0.3s;
}
.progress-fill {
  height: 100%;
  background: var(--copper);
  border-radius: var(--radius-pill);
  transition: width 0.5s var(--ease-out);
}

/* ── Avatar ── */
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--copper-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--copper);
  flex-shrink: 0;
}

/* ── Theme Toggle ── */
.theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease-out);
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--copper); transform: scale(1.08); }
.theme-toggle:active { transform: scale(0.95); }

/* ── Utilities ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 12px; }
.gap-lg { gap: 16px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mb-md { margin-bottom: 16px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
