:root{--b:#2563eb;--bg:#f4f7fb;--text:#172033;--muted:#6b7280;--line:#e5e7eb;--card:#fff}*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}a{color:var(--b);text-decoration:none}.topbar{height:64px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:24px;padding:0 24px;position:sticky;top:0;z-index:5}.topbar .brand{font-weight:800;font-size:22px;color:var(--b);margin-right:auto}.linkbtn{border:0;background:none;color:#374151;cursor:pointer}.shell{display:flex;min-height:calc(100vh - 64px)}.sidebar{width:220px;background:#111827;padding:24px 14px;display:flex;flex-direction:column;gap:8px}.sidebar a{color:#dbe4f0;padding:11px 14px;border-radius:10px}.sidebar a:hover{background:#1f2937;color:#fff}.content{padding:28px;max-width:1400px;width:calc(100% - 220px);margin:0 auto}.content.full{width:100%;max-width:1300px}.hero{max-width:820px;margin:10vh auto;text-align:center}.hero h1{font-size:52px;line-height:1.05;margin:18px 0}.hero p{font-size:20px;color:var(--muted)}.badge{display:inline-block;padding:7px 12px;background:#dbeafe;color:#1d4ed8;border-radius:999px;font-weight:700}.actions{display:flex;gap:12px;justify-content:center;margin-top:28px}.btn{display:inline-flex;align-items:center;justify-content:center;border:0;background:var(--b);color:white;border-radius:10px;padding:11px 17px;font-weight:700;cursor:pointer}.btn.secondary{background:#fff;color:#1f2937;border:1px solid #d1d5db}.btn.small{padding:8px 12px;font-size:13px}.btn.wide{width:100%}.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:22px;margin-bottom:22px;box-shadow:0 5px 16px rgba(15,23,42,.04)}.authcard{max-width:560px;margin:6vh auto}.card h2{margin-top:0}.pagehead{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.pagehead h1{margin:0}.pagehead p{margin:4px 0 0;color:var(--muted)}label{display:block;font-weight:650;margin-bottom:15px}input,select,textarea{display:block;width:100%;margin-top:6px;padding:11px 12px;border:1px solid #cfd6e3;border-radius:9px;background:#fff;font:inherit}textarea{min-height:90px;resize:vertical}small,.muted{color:var(--muted)}.check{display:flex;align-items:center;gap:8px;font-weight:400}.check input{width:auto;margin:0}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}.stat{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px}.stat b{font-size:28px;display:block}.stat span{color:var(--muted)}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{padding:12px 10px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}th{color:#64748b;font-size:12px;text-transform:uppercase}.pill{display:inline-block;padding:5px 9px;border-radius:999px;background:#eef2ff;color:#4338ca;font-size:12px;font-weight:700}.pill.ok{background:#dcfce7;color:#166534}.pill.off{background:#fee2e2;color:#991b1b}.rowitem{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid var(--line);gap:16px}.rowitem:last-child{border-bottom:0}.rowitem span{display:block;color:var(--muted);font-size:13px;margin-top:3px}.search,.inlineform{display:flex;gap:10px;align-items:end;margin-bottom:18px}.search input{max-width:360px}.inlineform{flex-wrap:wrap}.inlineform label{flex:1 1 180px}.timeline{border-left:3px solid #dbeafe;padding:0 0 16px 16px;margin-bottom:12px}.timeline p{white-space:pre-wrap}.alert{padding:12px 16px;border-radius:10px;margin-bottom:16px}.alert.success{background:#dcfce7;color:#166534}.alert.error{background:#fee2e2;color:#991b1b}hr{border:0;border-top:1px solid var(--line);margin:20px 0}@media(max-width:900px){.sidebar{width:76px}.sidebar a{font-size:0}.sidebar a:first-letter{font-size:18px}.content{width:calc(100% - 76px);padding:18px}.grid2,.stats{grid-template-columns:1fr}.hero h1{font-size:38px}.pagehead{align-items:flex-start;gap:12px;flex-direction:column}}

/* === Expediente premium DentaIA === */
.record-shell{max-width:1500px;margin:0 auto}.record-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:20px}.patient-identity{display:flex;align-items:center;gap:16px}.avatar-circle{width:58px;height:58px;border-radius:18px;background:linear-gradient(135deg,#2563eb,#06b6d4);color:#fff;display:grid;place-items:center;font-weight:850;font-size:18px;box-shadow:0 10px 26px rgba(37,99,235,.22)}.eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:800;color:#7c8ba1;margin-bottom:5px}.record-hero h1{margin:0;font-size:31px;letter-spacing:-.025em}.patient-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:7px}.patient-meta span{background:#fff;border:1px solid #e6ebf2;border-radius:999px;padding:5px 9px;font-size:12px;color:#64748b}.record-actions{display:flex;gap:10px}.record-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.record-kpi{background:#fff;border:1px solid #e7ebf1;border-radius:18px;padding:16px 18px;display:flex;align-items:center;gap:13px;box-shadow:0 8px 26px rgba(15,23,42,.035)}.record-kpi strong{display:block;font-size:22px;line-height:1.1}.record-kpi span{display:block;color:#758397;font-size:12px;margin-top:4px}.kpi-icon{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;font-weight:900}.kpi-icon.blue{background:#eaf2ff;color:#2563eb}.kpi-icon.violet{background:#f1edff;color:#7c3aed}.kpi-icon.green{background:#e9fbf2;color:#059669}.kpi-icon.amber{background:#fff5dd;color:#d97706}.record-tabs{display:flex;gap:6px;background:#fff;border:1px solid #e7ebf1;border-radius:14px;padding:6px;overflow:auto;margin-bottom:20px;position:sticky;top:76px;z-index:4;box-shadow:0 8px 20px rgba(15,23,42,.04)}.record-tabs a{white-space:nowrap;padding:9px 13px;border-radius:10px;color:#526176;font-size:13px;font-weight:750}.record-tabs a:hover{background:#eef5ff;color:#2563eb}.record-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.premium-card{background:#fff;border:1px solid #e5eaf1;border-radius:20px;padding:22px;margin-bottom:18px;box-shadow:0 8px 28px rgba(15,23,42,.045)}.section-title{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:18px}.section-title h2{margin:0;font-size:20px;letter-spacing:-.015em}.section-title p{margin:6px 0 0;color:#78869a;font-size:13px}.section-title.split{align-items:center}.clinical-alerts{display:grid;gap:10px}.clinical-line{border:1px solid #edf0f4;border-radius:14px;padding:13px 14px;display:flex;gap:11px;align-items:flex-start}.clinical-line b{font-size:13px}.clinical-line p{margin:3px 0 0;color:#66758a;font-size:13px}.clinical-line .signal{width:9px;height:9px;border-radius:999px;margin-top:5px;flex:none}.clinical-line.ok .signal{background:#10b981}.clinical-line.warning .signal{background:#f59e0b}.clinical-line.danger .signal{background:#ef4444}.clinical-line.neutral .signal{background:#94a3b8}.odontogram-card{padding:24px;overflow:hidden}.odontogram-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:12px;color:#69788d}.odontogram-legend span{display:flex;align-items:center;gap:6px}.legend-dot{width:9px;height:9px;border-radius:50%}.legend-dot.healthy{background:#cbd5e1}.legend-dot.active{background:#ef4444}.legend-dot.resolved{background:#3b82f6}.mouth-label{text-align:center;font-size:11px;color:#94a3b8;font-weight:800;text-transform:uppercase;letter-spacing:.12em;margin:8px 0 6px}.mouth-label.bottom{margin-top:6px}.teeth-row{display:grid;grid-template-columns:repeat(16,minmax(42px,1fr));gap:5px;align-items:end;padding:7px 0}.lower-row{align-items:start}.tooth-button{position:relative;border:1px solid transparent;background:transparent;border-radius:14px;padding:5px 2px 7px;cursor:pointer;min-width:0;transition:.18s ease}.tooth-button:hover{background:#f7faff;transform:translateY(-2px)}.tooth-button.selected{background:#eef6ff;border-color:#93c5fd;box-shadow:0 0 0 3px rgba(59,130,246,.08)}.tooth-image-wrap{display:flex;height:92px;align-items:flex-end;justify-content:center;border-radius:10px;overflow:hidden;background:#fff}.lower-row .tooth-image-wrap{align-items:flex-start}.tooth-button img{max-width:100%;max-height:88px;object-fit:contain;mix-blend-mode:multiply}.tooth-number{display:block;text-align:center;font-size:10px;color:#64748b;font-weight:800;margin:2px 0}.tooth-button.has-active .tooth-image-wrap{box-shadow:inset 0 -4px 0 #ef4444}.tooth-button.has-resolved .tooth-image-wrap{box-shadow:inset 0 -4px 0 #3b82f6}.tooth-count{position:absolute;right:2px;top:2px;min-width:18px;height:18px;border-radius:999px;background:#ef4444;color:#fff;font-size:10px;display:grid;place-items:center;font-weight:850;border:2px solid white}.tooth-button.has-resolved .tooth-count{background:#3b82f6}.arch-divider{height:1px;background:linear-gradient(90deg,transparent,#d9e1ea 20%,#d9e1ea 80%,transparent);position:relative;margin:4px 0}.arch-divider span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#fff;padding:0 8px;color:#b1bcc9;font-size:9px}.guided-panel{margin-top:24px;background:linear-gradient(135deg,#f8fbff,#f6f7ff);border:1px solid #dfe9f7;border-radius:18px;padding:20px}.guided-heading{display:flex;align-items:center;gap:15px;margin-bottom:18px}.selected-tooth-preview{width:74px;height:74px;border-radius:16px;background:#fff;border:1px solid #e5ebf3;display:grid;place-items:center;overflow:hidden}.selected-tooth-preview img{max-width:66px;max-height:68px;mix-blend-mode:multiply}.guided-heading h3{margin:0;font-size:21px}.guided-heading p{margin:4px 0 0;color:#6f7d90;font-size:13px}.guided-step{border-top:1px solid #e2e8f0;padding-top:16px;margin-top:16px}.guided-step>b{display:block;margin-bottom:10px;font-size:13px}.choice-row{display:flex;flex-wrap:wrap;gap:8px}.choice-chip{border:1px solid #d8e1ec;background:#fff;border-radius:999px;padding:8px 11px;font-weight:700;color:#536277;cursor:pointer}.choice-chip.selected{border-color:#2563eb;background:#eaf2ff;color:#1d4ed8;box-shadow:0 0 0 2px rgba(37,99,235,.08)}.finding-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.finding-option{border:1px solid #dfe5ed;background:#fff;border-radius:13px;padding:10px;display:flex;align-items:center;gap:8px;cursor:pointer;text-align:left;font-weight:700;color:#38475b}.finding-option:hover,.finding-option.selected{border-color:#93c5fd;background:#f2f7ff}.finding-symbol{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;font-size:11px;font-weight:900}.finding-symbol.red{background:#fee2e2;color:#b91c1c}.finding-symbol.blue{background:#dbeafe;color:#1d4ed8}.finding-symbol.violet{background:#ede9fe;color:#6d28d9}.finding-symbol.teal{background:#ccfbf1;color:#0f766e}.finding-symbol.purple{background:#f3e8ff;color:#7e22ce}.finding-symbol.orange{background:#ffedd5;color:#c2410c}.finding-symbol.gray{background:#e5e7eb;color:#4b5563}.finding-symbol.amber{background:#fef3c7;color:#b45309}.custom-finding{margin-top:11px}.compact-step{display:grid;grid-template-columns:180px 1fr;gap:12px;align-items:start}.compact-step label{margin:0}.finding-history{margin-top:22px;border-top:1px solid #eef1f5;padding-top:18px}.finding-history h3{font-size:15px;margin:0 0 10px}.history-item{display:grid;grid-template-columns:58px 1fr auto;gap:12px;align-items:center;padding:11px 0;border-bottom:1px solid #eef1f5}.history-tooth{width:54px;height:54px;border-radius:13px;background:#f8fafc;border:1px solid #e6ebf1;position:relative;display:grid;place-items:center;overflow:hidden}.history-tooth img{max-height:48px;max-width:46px;mix-blend-mode:multiply}.history-tooth span{position:absolute;right:3px;bottom:3px;background:#fff;border-radius:999px;padding:1px 4px;font-size:9px;font-weight:800}.history-main span{display:block;color:#78869a;font-size:12px;margin-top:3px}.status-chip{padding:5px 8px;border-radius:999px;font-size:11px;font-weight:800}.status-active{background:#fee2e2;color:#b91c1c}.status-resolved{background:#dbeafe;color:#1d4ed8}.empty-premium{text-align:center;border:1px dashed #dce4ed;border-radius:15px;padding:22px;color:#8290a3}.empty-premium>span{display:block;font-size:28px;color:#c0c9d4}.empty-premium b{display:block;color:#526176;margin:5px}.empty-premium p{font-size:12px;margin:0}.small-empty{padding:17px}.three-fields{display:grid;grid-template-columns:120px 120px 1fr;gap:10px}.treatment-list{margin-top:16px;border-top:1px solid #edf0f4}.treatment-row{display:grid;grid-template-columns:42px 1fr auto;gap:11px;align-items:center;padding:12px 0;border-bottom:1px solid #eef1f5}.treatment-piece{width:38px;height:38px;border-radius:11px;background:#eef5ff;color:#2563eb;display:grid;place-items:center;font-weight:900}.treatment-row span{display:block;color:#7b899b;font-size:12px;margin-top:3px}.coming-badge{background:#f2f4f8;color:#758397;border-radius:999px;padding:6px 9px;font-size:11px;font-weight:800}.image-preview-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.upload-placeholder{min-height:126px;border:1px dashed #cfd8e4;border-radius:15px;background:#fafcff;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:12px}.upload-placeholder>span{width:34px;height:34px;border-radius:10px;background:#eaf2ff;color:#2563eb;display:grid;place-items:center;font-size:20px;margin-bottom:7px}.upload-placeholder b{font-size:12px}.upload-placeholder small{font-size:10px;margin-top:4px}.module-note{color:#8793a3;font-size:11px;margin:12px 0 0}.account-totals{display:flex;gap:10px;flex-wrap:wrap}.account-totals span{background:#f7f9fc;border:1px solid #e9edf3;border-radius:11px;padding:8px 10px;font-size:11px;color:#778599}.account-totals b{display:block;color:#26364a;font-size:14px;margin-top:2px}.account-totals .balance-total{background:#fff7e6;border-color:#fde3ae}.premium-timeline{padding-left:4px}.premium-timeline-item{position:relative;padding:0 0 22px 24px;border-left:2px solid #e4ebf4}.premium-timeline-item:last-child{border-left-color:transparent}.timeline-dot{position:absolute;width:10px;height:10px;border-radius:50%;background:#2563eb;border:3px solid #dbeafe;box-sizing:content-box;left:-7px;top:1px}.timeline-content{background:#f9fbfd;border:1px solid #edf1f5;border-radius:13px;padding:12px 14px}.timeline-head{display:flex;justify-content:space-between;gap:10px}.timeline-head span{font-size:11px;color:#8794a4}.timeline-content p{margin:7px 0 0;white-space:pre-wrap;color:#536176;font-size:13px}.payment-form{align-items:flex-end}.quick-note textarea{min-height:105px}@media(max-width:1200px){.teeth-row{grid-template-columns:repeat(8,minmax(48px,1fr))}.record-kpis{grid-template-columns:repeat(2,1fr)}.finding-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:900px){.record-grid{grid-template-columns:1fr}.record-hero{align-items:flex-start;flex-direction:column}.record-actions{width:100%}.record-actions .btn{flex:1}.record-tabs{top:70px}.teeth-row{grid-template-columns:repeat(4,minmax(58px,1fr))}.record-kpis{grid-template-columns:1fr 1fr}.compact-step,.three-fields{grid-template-columns:1fr}.finding-grid{grid-template-columns:1fr 1fr}.section-title.split{align-items:flex-start;flex-direction:column}.image-preview-grid{grid-template-columns:1fr}.account-totals{width:100%}}@media(max-width:520px){.record-kpis{grid-template-columns:1fr}.finding-grid{grid-template-columns:1fr}.patient-meta{gap:5px}.tooth-image-wrap{height:78px}.tooth-button img{max-height:74px}}
