* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, "Segoe UI", Arial, sans-serif; }
body { background: #0E0D0C; color: #F2EEE6; min-height: 100vh; }
a { color: inherit; }

.oculto { display: none !important; }

/* ---------- LOGIN ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: #161412; border-radius: 16px; padding: 2.5rem 1.75rem; width: 100%; max-width: 360px; text-align: center; }
.login-logo { width: 52px; height: 52px; border-radius: 12px; background: #C9A24A; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #161412; font-size: 20px; }
.login-card h1 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.login-card p.sub { color: #8A8578; font-size: 13px; margin-bottom: 24px; }
.login-card input { width: 100%; background: #1E1B18; border: 1px solid #2A2622; border-radius: 8px; padding: 12px; color: #F2EEE6; font-size: 14px; margin-bottom: 10px; }
.login-card input:focus { outline: none; border-color: #C9A24A; }
.btn-gold { width: 100%; background: #C9A24A; border: none; border-radius: 8px; padding: 12px; color: #161412; font-weight: 600; font-size: 14px; cursor: pointer; margin-top: 6px; }
.btn-gold:active { opacity: 0.85; }
.error-msg { color: #E8846B; font-size: 13px; margin-top: 10px; min-height: 18px; }

/* ---------- DASHBOARD ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #161412; position: sticky; top: 0; z-index: 5; }
.topbar h1 { font-size: 15px; font-weight: 600; }
.topbar .user { font-size: 12px; color: #8A8578; }
.icon-btn { background: none; border: none; color: #8A8578; font-size: 20px; cursor: pointer; padding: 4px; }

.container { padding: 14px 16px 90px; max-width: 640px; margin: 0 auto; }

.toolbar { display: flex; gap: 8px; margin-bottom: 14px; }
.toolbar input, .toolbar select { background: #1E1B18; border: 1px solid #2A2622; border-radius: 8px; padding: 10px; color: #F2EEE6; font-size: 13px; }
.toolbar input { flex: 1; }
.toolbar select { width: 120px; }

.fab { position: fixed; bottom: 22px; right: 22px; width: 54px; height: 54px; border-radius: 50%; background: #C9A24A; border: none; color: #161412; font-size: 26px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

.card { background: #161412; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; border-left: 3px solid #4A4640; cursor: pointer; }
.card-row { display: flex; justify-content: space-between; align-items: flex-start; }
.card h3 { font-size: 14px; font-weight: 600; }
.card .meta { font-size: 12px; color: #8A8578; margin-top: 3px; }
.badge { font-size: 10px; padding: 3px 9px; border-radius: 6px; font-weight: 600; white-space: nowrap; }

.b-nuevo { background: #85B7EB; color: #042C53; }
.b-negociando { background: #FAC775; color: #412402; }
.b-cerrado { background: #97C459; color: #173404; }
.b-perdido { background: #B4B2A9; color: #2C2C2A; }
.border-nuevo { border-left-color: #378ADD; }
.border-negociando { border-left-color: #EF9F27; }
.border-cerrado { border-left-color: #639922; }
.border-perdido { border-left-color: #888780; }

.empty-msg { text-align: center; color: #6B6659; font-size: 13px; padding: 60px 20px; }

/* ---------- MODAL / FORM ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #161412; border-radius: 16px 16px 0 0; padding: 20px 18px 24px; width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; }
.modal h2 { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.modal label { font-size: 12px; color: #8A8578; display: block; margin: 10px 0 4px; }
.modal input, .modal select, .modal textarea { width: 100%; background: #1E1B18; border: 1px solid #2A2622; border-radius: 8px; padding: 10px; color: #F2EEE6; font-size: 14px; }
.modal textarea { min-height: 70px; resize: vertical; }
.modal .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.btn-ghost { flex: 1; background: none; border: 1px solid #2A2622; border-radius: 8px; padding: 12px; color: #F2EEE6; font-size: 14px; cursor: pointer; }
.btn-danger { color: #E8846B; }

/* ---------- DETALLE ---------- */
.detail-table { width: 100%; font-size: 13px; margin: 12px 0; }
.detail-table td { padding: 6px 0; border-bottom: 1px solid #2A2622; }
.detail-table td:first-child { color: #8A8578; }
.detail-table td:last-child { text-align: right; }
.detail-notes { font-size: 13px; color: #C7C2B6; line-height: 1.5; margin-top: 10px; }
