:root {
  --orange: #ffa66b;
  --orange-dark: #f0873f;
  --orange-light: #ffe6d3;
  --green: #2e7d32;
  --red: #c62828;
  --gray: #666;
  --bg: #ffffff;
  --card-bg: #ffffff;
  --border: #e8e8e8;
  --black: #1a1a1a;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Tahoma, Geneva, Verdana, sans-serif; background: var(--bg); color: var(--black); }
.screen { min-height: 100vh; }
.hidden { display: none !important; }
#login-screen { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #000000, #2a2a2a); min-height: 100vh; }
.login-card { background: var(--card-bg); padding: 40px; border-radius: 12px; width: 320px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); text-align: center; }
.login-card h1 { margin: 0 0 5px; font-size: 1.6em; color: var(--black); font-family: "Poppins", sans-serif; font-weight: 700; }
.subtitle { color: var(--gray); margin-bottom: 25px; font-size: 0.9em; }
.login-card label { display: block; text-align: left; font-size: 0.85em; margin: 12px 0 4px; font-weight: 600; }
.login-card select, .login-card input { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 1em; }
.login-card button, form button[type="submit"] { width: 100%; margin-top: 20px; padding: 12px; background: var(--orange); color: var(--black); border: none; border-radius: 6px; font-size: 1em; font-weight: 700; cursor: pointer; font-family: "Poppins", sans-serif; }
.login-card button:hover, form button[type="submit"]:hover { background: var(--orange-dark); }
.error-msg { color: var(--red); font-size: 0.85em; margin-top: 10px; min-height: 1em; }
header { display: flex; justify-content: space-between; align-items: center; background: var(--black); color: white; padding: 15px 25px; }
header h1 { margin: 0; font-size: 1.3em; font-family: "Poppins", sans-serif; font-weight: 700; }
.header-right { display: flex; align-items: center; gap: 15px; }
.btn-secondary { background: transparent; border: 1px solid #888; color: white; padding: 6px 14px; border-radius: 6px; cursor: pointer; }
.btn-secondary:hover { background: #333; }
.tabs { display: flex; background: white; border-bottom: 2px solid var(--border); padding: 0 20px; gap: 5px; }
.tab-btn { padding: 14px 18px; border: none; background: none; cursor: pointer; font-size: 0.95em; font-weight: 600; color: var(--gray); border-bottom: 3px solid transparent; font-family: "Poppins", sans-serif; }
.tab-btn.active { color: var(--orange-dark); border-bottom-color: var(--orange); }
.tab-content { display: none; padding: 25px; max-width: 1100px; margin: 0 auto; }
.tab-content.active { display: block; }
.cards-row { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 30px; }
.card { flex: 1; min-width: 180px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.card h3 { margin: 0 0 8px; font-size: 0.8em; text-transform: uppercase; color: var(--gray); font-family: "Poppins", sans-serif; font-weight: 600; }
.big-number { font-size: 1.6em; font-weight: 700; margin: 0; color: var(--black); font-family: "Poppins", sans-serif; }
.big-number.positive { color: var(--green); }
.big-number.negative { color: var(--red); }
.big-number.warning { color: var(--orange-dark); }
.balance-card { background: var(--black); color: white; }
.balance-card h3 { color: #ccc; }
.balance-card .big-number { color: var(--orange); }
.section-title { margin-top: 30px; margin-bottom: 10px; font-size: 1.1em; font-family: "Poppins", sans-serif; font-weight: 600; }
.category-list { display: flex; flex-wrap: wrap; gap: 10px; }
.category-pill { background: var(--orange-light); color: var(--black); padding: 8px 14px; border-radius: 20px; font-size: 0.9em; font-weight: 600; }
#movement-form { max-width: 480px; }
#movement-form label { display: block; font-size: 0.85em; font-weight: 600; margin: 14px 0 4px; }
#movement-form input, #movement-form select { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 1em; }
.movement-type-toggle { display: flex; gap: 10px; margin-bottom: 20px; }
.type-btn { padding: 10px 20px; border: 2px solid var(--border); background: white; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--black); }
.type-btn.active { border-color: var(--orange); background: var(--orange-light); }
.data-table { width: 100%; border-collapse: collapse; margin-top: 10px; background: white; }
.data-table th, .data-table td { padding: 10px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.9em; }
.data-table th { background: #fafafa; font-weight: 700; color: var(--black); }
.badge { padding: 3px 8px; border-radius: 4px; font-size: 0.8em; font-weight: 600; }
.badge-pending { background: #fde8e8; color: var(--red); }
.badge-paid { background: #e3f5e3; color: var(--green); }
.person-tag { display: inline-block; padding: 3px 10px; border-radius: 12px; color: white; font-size: 0.8em; font-weight: 600; }
.person-pill { color: white; }
.link-btn { background: none; border: none; color: var(--orange-dark); cursor: pointer; text-decoration: underline; font-size: 0.85em; }
.filter-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.filter-row select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95em; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-card { background: white; border-radius: 12px; padding: 30px; width: 360px; box-shadow: 0 15px 40px rgba(0,0,0,0.3); }
.modal-card h3 { margin: 0 0 5px; font-family: "Poppins", sans-serif; font-weight: 700; }
.modal-card label { display: block; font-size: 0.85em; font-weight: 600; margin: 12px 0 4px; }
.modal-card input, .modal-card select { width: 100%; padding: 9px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95em; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { flex: 1; padding: 10px; border-radius: 6px; border: none; font-weight: 600; cursor: pointer; }
#saldar-confirmar { background: var(--orange); color: var(--black); }
#saldar-confirmar:hover { background: var(--orange-dark); }
.btn-secondary-light { background: #f0f0f0; color: var(--black); }
.btn-secondary-light:hover { background: #e0e0e0; }
.debt-meta { font-size: 0.78em; color: var(--gray); display: block; margin-top: 3px; }
.filtro-total { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 1.1em; margin: 6px 0 0; }
@media (max-width: 700px) {
  .cards-row { flex-direction: column; }
  header { flex-direction: column; gap: 10px; align-items: flex-start; }
  .tabs { overflow-x: auto; }
}
