* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: #eef3f8; color: #1f2937; }
.topbar { background: linear-gradient(135deg, #123b63, #0f766e); color: white; padding: 20px 28px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.topbar h1 { margin: 0; font-size: 28px; }
.topbar p { margin: 5px 0 0; opacity: .9; }
.container { max-width: 1250px; margin: auto; padding: 24px; }
.tabs { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.tab { border: 0; padding: 12px 16px; border-radius: 999px; background: #dbe4ef; font-weight: bold; cursor: pointer; }
.tab.active { background: #123b63; color: white; }
.panel { display: none; }
.panel.active { display: block; }
.card, .quick-card { background: white; border-radius: 14px; padding: 18px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.card h2 { margin: 0 0 14px; }
.quick-form { display: grid; grid-template-columns: 1fr 170px 140px auto auto; gap: 10px; }
input, select, textarea { width: 100%; padding: 11px; border: 1px solid #cbd5e1; border-radius: 9px; font-size: 14px; font-family: Arial, sans-serif; }
textarea { resize: vertical; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: bold; font-size: 14px; }
.btn { border: 0; padding: 10px 14px; border-radius: 9px; cursor: pointer; font-weight: bold; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.primary { background: #0f766e; color: white; }
.secondary { background: #e5e7eb; color: #111827; }
.danger { background: #dc2626; color: white; }
.light { background: rgba(255,255,255,.18); color: white; border: 1px solid rgba(255,255,255,.4); }
.toolbar { display: flex; gap: 10px; margin: 16px 0; }
.toolbar input { flex: 1; }
.toolbar select { width: 160px; }
.list { display: grid; gap: 10px; }
.reminder { background: white; border-radius: 12px; padding: 13px; border-left: 6px solid #64748b; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; box-shadow: 0 1px 8px rgba(0,0,0,.06); }
.reminder.done { opacity: .62; }
.reminder.urgente { border-left-color: #dc2626; }
.reminder.importante { border-left-color: #f59e0b; }
.reminder-text { font-size: 16px; font-weight: bold; }
.reminder-meta { margin-top: 5px; color: #64748b; font-size: 13px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid.small { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.form { display: grid; gap: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.projects-list { display: grid; gap: 10px; }
.project-item { border: 1px solid #e5e7eb; border-radius: 12px; padding: 13px; cursor: pointer; background: #fff; }
.project-item:hover { background: #f8fafc; }
.project-title { font-weight: bold; font-size: 16px; }
.project-meta { color: #64748b; font-size: 13px; margin-top: 4px; }
.progress { height: 12px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress-bar { height: 100%; background: #0f766e; width: 0%; }
.detail-header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.detail-title { font-size: 22px; font-weight: bold; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.badge { background: #e5e7eb; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: bold; }
.task-add { display: flex; gap: 10px; margin: 18px 0 12px; }
.task-add input { flex: 1; }
.task-list { display: grid; gap: 8px; }
.project-task { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid #e5e7eb; border-radius: 10px; }
.project-task.done span { text-decoration: line-through; color: #6b7280; }
.empty { color: #6b7280; text-align: center; padding: 25px; }
@media (max-width: 900px) { .quick-form, .grid.two, .grid.small { grid-template-columns: 1fr; } .topbar { flex-direction: column; align-items: flex-start; } .toolbar { flex-direction: column; } .toolbar select { width: 100%; } .reminder { grid-template-columns: 1fr; } .row-actions { justify-content: flex-start; } }

.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.grid.two-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.summary-grid { display: grid; gap: 10px; }
.summary-card { border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; background: #f8fafc; }
.summary-card strong { display: block; font-size: 14px; margin-bottom: 5px; }
.summary-card span { display: block; color: #64748b; font-size: 13px; line-height: 1.45; }
.materials-card { margin-top: 18px; }
.materials-toolbar { display: grid; grid-template-columns: 1fr 160px 230px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid #e5e7eb; vertical-align: top; font-size: 14px; }
th { background: #f8fafc; color: #334155; position: sticky; top: 0; }
.num { text-align: right; white-space: nowrap; }
.muted { color: #64748b; font-size: 13px; }
.pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #e5e7eb; font-weight: bold; font-size: 12px; }
.pill.compra { background: #dcfce7; color: #166534; }
.pill.cotizacion { background: #dbeafe; color: #1e40af; }
@media (max-width: 900px) { .grid.two-inner, .materials-toolbar { grid-template-columns: 1fr; } }

canvas { width: 100%; max-width: 100%; height: auto; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; margin-top: 12px; }
.mini-table { margin-top: 14px; }
.sensa-claims-grid { margin-top: 18px; }
.pill.estado-abierto { background: #fee2e2; color: #991b1b; }
.pill.estado-en-revisión, .pill.estado-en-revision { background: #fef3c7; color: #92400e; }
.pill.estado-resuelto { background: #dcfce7; color: #166534; }
