:root{font-family:Segoe UI,system-ui,-apple-system,sans-serif;line-height:1.6;font-weight:400;color:#0f172a;background-color:#f8fafc;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{color:inherit}body{margin:0;min-width:320px;background:#f8fafc}*{box-sizing:border-box}.layout{min-height:100vh;display:flex;flex-direction:column}.topbar{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;background:#0f172a;color:#f8fafc}.brand{font-weight:700;letter-spacing:.4px}.topbar-right{display:flex;align-items:center;gap:.75rem}.shell{display:flex;flex:1;background:#f8fafc}.sidebar{width:230px;padding:1rem;background:#111827;display:flex;flex-direction:column;gap:.4rem}.nav-link{padding:.6rem .8rem;color:#e5e7eb;text-decoration:none;border-radius:8px}.nav-link.active{background:#2563eb;color:#fff}.content{flex:1;padding:1.5rem}.page{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:1.5rem;box-shadow:0 1px 2px #0000000d}.pill-list{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.75rem}.pill-list li{list-style:none;background:#eef2ff;color:#4338ca;padding:.35rem .7rem;border-radius:999px;border:1px solid #e0e7ff}.login-shell{min-height:100vh;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 20% 20%,#e0f2fe,#eff6ff 45%,#fff);padding:1rem}.card{width:360px;background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:1.5rem;box-shadow:0 10px 30px #0000000f;display:flex;flex-direction:column;gap:1rem}.field{display:flex;flex-direction:column;gap:.35rem}.field span{font-size:.9rem;color:#475569}input{border:1px solid #cbd5e1;border-radius:8px;padding:.55rem .7rem;font-size:1rem}button.primary{padding:.7rem;border-radius:10px;border:none;background:#2563eb;color:#fff;font-weight:600;cursor:pointer}button.ghost{padding:.4rem .7rem;border-radius:8px;border:1px solid #334155;background:transparent;color:#e2e8f0;cursor:pointer}.user-pill{padding:.3rem .6rem;background:#1f2937;border-radius:999px;border:1px solid #334155;font-size:.9rem}.error{color:#b91c1c;background:#fee2e2;border:1px solid #fecaca;padding:.5rem;border-radius:10px}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;margin-top:1rem}.stat-card{background:linear-gradient(135deg,#667eea,#764ba2);border-radius:12px;padding:1.5rem;color:#fff;box-shadow:0 4px 15px #667eea66}.stat-card:nth-child(2){background:linear-gradient(135deg,#f093fb,#f5576c);box-shadow:0 4px 15px #f5576c66}.stat-card:nth-child(3){background:linear-gradient(135deg,#fa709a,#fee140);box-shadow:0 4px 15px #fa709a66;color:#1f2937}.stat-card:nth-child(4){background:linear-gradient(135deg,#30cfd0,#330867);box-shadow:0 4px 15px #30cfd066}.stat-label{font-size:.9rem;opacity:.9;margin-bottom:.5rem}.stat-value{font-size:2rem;font-weight:700}.stat-value.warning{color:#fbbf24}.stat-value.alert{color:#f87171}.form-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:1.5rem;margin-bottom:1.5rem;box-shadow:0 1px 2px #0000000d}.form-card h3{margin-top:0;margin-bottom:1rem;color:#1f2937}.form-card .field{margin-bottom:1rem}.form-card textarea,.form-card input,.form-card select{width:100%;border:1px solid #cbd5e1;border-radius:8px;padding:.6rem .8rem;font-size:1rem;font-family:inherit}.form-card select{background:#fff;cursor:pointer}.form-card textarea{resize:vertical}.data-table{width:100%;border-collapse:collapse;background:#fff;border:1px solid #e5e7eb;border-radius:8px;overflow:hidden}.data-table thead{background:#f3f4f6}.data-table th{padding:.75rem 1rem;text-align:left;font-weight:600;color:#374151;font-size:.9rem;border-bottom:1px solid #e5e7eb}.data-table td{padding:.75rem 1rem;border-bottom:1px solid #e5e7eb;color:#1f2937}.data-table tbody tr:hover{background:#f9fafb}.data-table button.link{background:none;border:none;color:#2563eb;cursor:pointer;padding:0;margin-right:.75rem;text-decoration:underline;font-size:.9rem}.data-table button.link.danger{color:#dc2626}.data-table button.link:hover{opacity:.7}.gradient-1{background:linear-gradient(135deg,#667eea,#764ba2);box-shadow:0 4px 15px #667eea66}.gradient-2{background:linear-gradient(135deg,#f093fb,#f5576c);box-shadow:0 4px 15px #f5576c66}.gradient-3{background:linear-gradient(135deg,#fa709a,#fee140);box-shadow:0 4px 15px #fa709a66;color:#1f2937}.gradient-4{background:linear-gradient(135deg,#30cfd0,#330867);box-shadow:0 4px 15px #30cfd066}.photo-thumb-button{border:none;background:transparent;padding:0;cursor:zoom-in}.photo-thumb-image{width:88px;height:88px;object-fit:cover;border-radius:8px}.image-lightbox-overlay{position:fixed;inset:0;background:#0f172ab3;display:flex;align-items:center;justify-content:center;z-index:1000;padding:1rem}.image-lightbox-content{max-width:min(1000px,95vw);max-height:95vh;display:flex;flex-direction:column;gap:.75rem}.image-lightbox-close{align-self:flex-end}.image-lightbox-image{max-width:100%;max-height:calc(95vh - 3rem);border-radius:12px;object-fit:contain}.patient-info-bar{display:flex;flex-wrap:wrap;gap:.5rem 1.5rem;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:10px;padding:.75rem 1rem;margin-bottom:1.25rem;font-size:.875rem;color:#374151}.patient-info-bar b{color:#0f172a}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3rem 1rem;text-align:center;color:#64748b}.attention-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;box-shadow:0 1px 4px #0000000f}.attention-card-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.75rem 1rem;background:#f8fafc;border-bottom:1px solid #e2e8f0;flex-wrap:wrap}.attention-card-date{font-weight:700;color:#0f172a;font-size:.95rem;margin-right:.75rem}.attention-card-summary{font-size:.825rem;color:#2563eb;background:#eff6ff;padding:.2rem .6rem;border-radius:999px;white-space:nowrap}.attention-card-body{padding:.75rem 1rem;display:flex;flex-direction:column;gap:.4rem}.att-detail-row{display:flex;gap:.75rem;align-items:flex-start;font-size:.875rem;color:#374151;line-height:1.5}.att-detail-label{min-width:130px;font-weight:600;color:#64748b;flex-shrink:0}.att-badge{display:inline-block;background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0;border-radius:999px;padding:.15rem .7rem;font-size:.8rem;font-weight:500}.att-section{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:1rem;margin-bottom:.75rem}.att-section-title{font-size:.95rem;font-weight:700;color:#0f172a;margin:0 0 .75rem}.att-checkbox-label{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-size:.9rem;color:#374151;-webkit-user-select:none;user-select:none}.product-dropdown{position:absolute;top:calc(100% + 2px);left:0;right:0;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 4px 16px #0000001f;z-index:50;max-height:240px;overflow-y:auto}.product-dropdown-item{display:flex;align-items:center;justify-content:space-between;padding:.6rem .9rem;cursor:pointer;font-size:.875rem;color:#374151;transition:background .1s}.product-dropdown-item:hover{background:#f1f5f9}.product-dropdown-price{color:#2563eb;font-weight:600;font-size:.825rem}.inline-client-link{margin-right:0!important;font-weight:600}.client-patients-row td{background:#f8fafc}.client-patients-panel{border:1px solid #e2e8f0;border-radius:10px;background:#fff;padding:.9rem}.client-patients-panel h4{margin:0 0 .75rem;font-size:.95rem;color:#0f172a}.client-patients-empty{color:#64748b;padding:.35rem 0}.client-patients-table{margin-top:.35rem}
