:root{--color-bg:#faf8f5;--color-surface:#fff;--color-primary:#0f5f5c;--color-primary-dark:#0a4644;--color-text:#1f2523;--color-text-muted:#66706b;--color-border:#e4ded4;--color-error:#b3402f;--color-warning-text:#92400e;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-on-primary:#fff;--color-input-bg:#fff;--color-control-border:var(--color-border);--color-link:#00e;--color-on-icon:#fff;--color-text-blue:#1d4ed8;--color-text-purple:#6d28d9;--color-text-green:#047857;--color-error-bg:#fee2e2;--color-planned-bg:#fbe4de;--color-completed-bg:#dcefe1;--color-completed:#166b3a;--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif}*{box-sizing:border-box}body{font-family:var(--font-sans);background:var(--color-bg);color:var(--color-text);-webkit-font-smoothing:antialiased;margin:0}:where(input:not([type=checkbox],[type=radio],[type=range],[type=color],[type=file],[type=button],[type=submit],[type=hidden]),select,textarea){color:var(--color-text);background-color:var(--color-input-bg);border:1px solid var(--color-control-border);border-radius:6px;font-family:inherit}:where(input,select,textarea)::placeholder{color:var(--color-text-muted);opacity:1}:where(input,select,textarea):disabled{color:var(--color-text-muted);background-color:var(--color-bg);cursor:not-allowed}:where(button){color:var(--color-text);font-family:inherit}:where(a:not([class])){color:var(--color-link)}.page{max-width:960px;margin:0 auto;padding:2.5rem 1.5rem}.page-header{justify-content:space-between;align-items:center;margin-bottom:2rem;display:flex}.page-header h1{margin:0;font-size:1.5rem;font-weight:600}.button{background:var(--color-primary);color:var(--color-on-primary);cursor:pointer;border:none;border-radius:6px;padding:.6rem 1.1rem;font-size:.9rem;font-weight:500;text-decoration:none;display:inline-block}.button:hover{background:var(--color-primary-dark)}.empty-state{color:var(--color-text-muted);text-align:center;padding:3rem 0}.table{border-collapse:collapse;background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px;width:100%;overflow:hidden}.table th{text-align:left;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-muted);border-bottom:1px solid var(--color-border);padding:.75rem 1rem;font-size:.75rem}.table td{border-bottom:1px solid var(--color-border);padding:.85rem 1rem;font-size:.9rem}.table tr:last-child td{border-bottom:none}.auth-page{justify-content:center;align-items:center;min-height:100vh;padding:1.5rem;display:flex}.auth-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:10px;flex-direction:column;gap:.85rem;width:100%;max-width:420px;padding:2rem;display:flex}.auth-card h1{margin:0 0 .5rem;font-size:1.3rem}.auth-card fieldset{border:none;flex-direction:column;gap:.6rem;margin:0;padding:0;display:flex}.auth-card legend{text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-muted);margin-bottom:.3rem;padding:0;font-size:.75rem}.auth-card input{border:1px solid var(--color-control-border);border-radius:6px;padding:.6rem .75rem;font-family:inherit;font-size:.9rem}.auth-card input:focus{outline:2px solid var(--color-primary);outline-offset:-1px}.auth-card .row{gap:.6rem;display:flex}.auth-card button{background:var(--color-primary);color:var(--color-on-primary);cursor:pointer;border:none;border-radius:6px;margin-top:.5rem;padding:.7rem;font-size:.9rem;font-weight:500}.auth-card button:hover{background:var(--color-primary-dark)}.auth-card button:disabled{opacity:.6;cursor:default}.error-text{color:var(--color-error);margin:0;font-size:.85rem}.working-hours-warning{color:#6b5a1a;background:#fbf3d9;border:1px solid #e8d68a;border-radius:6px;margin:0;padding:.6rem .85rem;font-size:.85rem}.switch-link{color:var(--color-text-muted);text-align:center;margin:.5rem 0 0;font-size:.85rem}.switch-link a{color:var(--color-primary);font-weight:500;text-decoration:none}.form-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px;flex-direction:column;gap:1rem;max-width:640px;padding:1.75rem;display:flex}.form-card label{color:var(--color-text-muted);flex-direction:column;flex:1;gap:.35rem;font-size:.85rem;display:flex}.form-card input,.form-card select{border:1px solid var(--color-control-border);color:var(--color-text);border-radius:6px;padding:.6rem .75rem;font-family:inherit;font-size:.9rem}.form-card input:focus,.form-card select:focus{outline:2px solid var(--color-primary);outline-offset:-1px}.form-card .row{gap:1rem;display:flex}.form-card .hint{color:var(--color-text-muted);margin:-.5rem 0 0;font-size:.8rem}.form-card button{background:var(--color-primary);color:var(--color-on-primary);cursor:pointer;border:none;border-radius:6px;align-self:flex-start;padding:.65rem 1.3rem;font-size:.9rem;font-weight:500}.form-card button:hover{background:var(--color-primary-dark)}.form-card button:disabled{opacity:.6;cursor:default}.button-secondary{border:1px solid var(--color-control-border);background:var(--color-surface);color:var(--color-text);cursor:pointer;border-radius:6px;padding:.55rem 1.05rem;font-size:.9rem;font-weight:500;text-decoration:none;display:inline-block}.button-secondary:hover{background:var(--color-bg)}.button-secondary:disabled{opacity:.6;cursor:default}.form-card textarea{border:1px solid var(--color-control-border);color:var(--color-text);resize:vertical;border-radius:6px;padding:.6rem .75rem;font-family:inherit;font-size:.9rem}.form-card textarea:focus{outline:2px solid var(--color-primary);outline-offset:-1px}.summary-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px;flex-direction:column;gap:.5rem;max-width:400px;margin-bottom:1.5rem;padding:1.25rem 1.5rem;display:flex}.summary-row{justify-content:space-between;font-size:.9rem;display:flex}.summary-row.total{border-top:1px solid var(--color-border);margin-top:.25rem;padding-top:.5rem;font-weight:600}table.table a{color:var(--color-primary);font-weight:500;text-decoration:none}table.table a:hover{text-decoration:underline}.line-items-row{flex-wrap:wrap;align-items:flex-end;gap:1rem;margin-bottom:.75rem;display:flex}.line-items-row label{min-width:0}.line-items-row .flex-3{flex:100%}.line-items-row .flex-1{flex:7rem}.link-button{color:var(--color-text-muted);cursor:pointer;background:0 0;border:none;margin-right:.75rem;padding:0;font-size:.85rem;text-decoration:underline}.link-button:hover{color:var(--color-error)}.form-card .checkbox-label{flex-direction:row;align-items:center;gap:.5rem}.form-card .checkbox-label input[type=checkbox]{width:auto}.success-text{color:var(--color-primary);margin:0;font-size:.85rem}.app-shell{min-height:100vh;display:flex}.app-nav{background:var(--color-surface);border-right:1px solid var(--color-border);flex-direction:column;flex-shrink:0;width:220px;padding:1.5rem 1rem;display:flex}.app-nav-brand{color:var(--color-primary);margin-bottom:1.5rem;padding:0 .5rem;font-size:1.1rem;font-weight:700}.app-nav-links{flex-direction:column;flex:1;gap:.25rem;margin:0;padding:0;list-style:none;display:flex}.app-nav-links a{color:var(--color-text);border-radius:6px;padding:.55rem .75rem;font-size:.9rem;text-decoration:none;display:block}.app-nav-links a.active{background:var(--color-primary);color:var(--color-on-primary);font-weight:500}.app-nav-user{border-top:1px solid var(--color-border);margin-top:1rem;padding-top:1rem}.app-nav-user-info{flex-direction:column;margin-bottom:.75rem;padding:0 .5rem;display:flex}.app-nav-user-name{font-size:.9rem;font-weight:500}.app-nav-user-role{color:var(--color-text-muted);text-transform:capitalize;font-size:.75rem}.app-nav-signout{border:1px solid var(--color-border);width:100%;color:var(--color-text-muted);cursor:pointer;background:0 0;border-radius:6px;padding:.5rem;font-size:.85rem}.app-nav-signout:hover{background:var(--color-bg);color:var(--color-text)}.app-content{flex:1;min-width:0}:root{--gradient-primary:linear-gradient(135deg, #2563eb, #0f766e);--color-icon-blue:#3b82f6;--color-icon-orange:#c2410c;--color-icon-teal:#0f766e;--color-icon-purple:#8b5cf6;--color-icon-pink:#ec4899;--color-icon-dark:#1f2937}.page-subtitle{color:var(--color-text-muted);margin:.25rem 0 0;font-size:.9rem}.app-nav-brand{align-items:center;gap:.65rem;margin-bottom:1.75rem;padding:0 .5rem;display:flex}.app-nav-logo{background:var(--gradient-primary);color:#fff;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;width:36px;height:36px;font-size:.8rem;font-weight:700;display:flex}.app-nav-logo-image{object-fit:contain;background:var(--color-surface);border:1px solid var(--color-border);border-radius:10px;flex-shrink:0;width:36px;height:36px}.app-nav-brand-title{color:var(--color-text);font-size:1rem;font-weight:700;line-height:1.2}.app-nav-brand-subtitle{color:var(--color-text-muted);font-size:.72rem}.app-nav-links a{color:var(--color-text);border-radius:10px;align-items:center;gap:.65rem;padding:.6rem .85rem;font-size:.9rem;font-weight:500;text-decoration:none;transition:background .15s;display:flex}.app-nav-links a:hover{background:var(--color-bg)}.app-nav-links a.active{background:var(--gradient-primary);color:#fff;box-shadow:0 4px 12px #3b82f640}.stat-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin-bottom:1.5rem;display:grid}@media (max-width:900px){.stat-grid{grid-template-columns:repeat(2,1fr)}}.stat-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:14px;padding:1.25rem}.stat-card-link{color:inherit;cursor:pointer;text-decoration:none;transition:transform .15s,box-shadow .15s;display:block}.stat-card-link:hover{transform:translateY(-2px);box-shadow:0 4px 12px #00000014}.stat-card-button{text-align:left;width:100%;font:inherit;border:1px solid var(--color-border)}.stat-card-button:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.modal-overlay{z-index:100;background:#00000073;justify-content:center;align-items:center;padding:1.5rem;display:flex;position:fixed;inset:0}.modal-content{background:var(--color-surface);border-radius:14px;flex-direction:column;width:100%;max-width:520px;max-height:80vh;display:flex;box-shadow:0 12px 32px #0000002e}.modal-header{border-bottom:1px solid var(--color-border);justify-content:space-between;align-items:center;padding:1.1rem 1.25rem;display:flex}.modal-header h2{margin:0;font-size:1.05rem}.modal-close{color:var(--color-text-muted);cursor:pointer;background:0 0;border:none;border-radius:6px;padding:.25rem;display:flex}.modal-close:hover{background:var(--color-bg);color:var(--color-text)}.modal-body{padding:.5rem 1.25rem 1.25rem;overflow-y:auto}.modal-list{margin:0;padding:0;list-style:none}.modal-list-row{border-bottom:1px solid var(--color-border);justify-content:space-between;align-items:flex-start;gap:1rem;padding:.85rem 0;display:flex}.modal-list-row:last-child{border-bottom:none}.modal-list-title{font-size:.92rem;font-weight:600}.modal-list-sub{color:var(--color-text-muted);margin-top:.15rem;font-size:.82rem}.modal-list-meta{text-align:right;flex-shrink:0}.modal-list-amount{font-size:.92rem;font-weight:600}.modal-footer-note{text-align:center;color:var(--color-text-muted);margin:1rem 0 0;font-size:.82rem}.stat-card-header{justify-content:space-between;align-items:flex-start;margin-bottom:.75rem;display:flex}.stat-label{color:var(--color-text-muted);font-size:.85rem}.stat-icon{width:36px;height:36px;color:var(--color-on-icon);border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;display:flex}.stat-icon-blue{background:var(--color-icon-blue)}.stat-icon-orange{background:var(--color-icon-orange)}.stat-icon-teal{background:var(--color-icon-teal)}.stat-icon-purple{background:var(--color-icon-purple)}.stat-icon-pink{background:var(--color-icon-pink)}.stat-icon-dark{background:var(--color-icon-dark)}.stat-value{color:var(--color-text);font-size:1.9rem;font-weight:700}.stat-sub{color:var(--color-text-muted);margin-top:.15rem;font-size:.78rem}.dashboard-bottom-grid{grid-template-columns:2fr 1fr;gap:1rem;display:grid}@media (max-width:900px){.dashboard-bottom-grid{grid-template-columns:1fr}}.panel-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:14px;padding:1.5rem}.panel-card h2{margin:0 0 1rem;font-size:1.05rem}.panel-header{justify-content:space-between;align-items:center;margin-bottom:1rem;display:flex}.panel-header h2{margin:0}.panel-header a{color:var(--color-primary);font-size:.85rem;text-decoration:none}.activity-list{flex-direction:column;gap:1rem;margin:0;padding:0;list-style:none;display:flex}.activity-list li{color:var(--color-text);border-bottom:1px solid var(--color-border);padding-bottom:1rem;font-size:.9rem}.activity-list li:last-child{border-bottom:none;padding-bottom:0}.activity-sub{color:var(--color-text-muted);margin-top:.15rem;font-size:.78rem}.patients-search{max-width:480px;margin-bottom:1.25rem}.patients-search input{border:1px solid var(--color-control-border);border-radius:8px;width:100%;padding:.65rem .9rem;font-family:inherit;font-size:.9rem}.patients-search input:focus{outline:2px solid var(--color-primary);outline-offset:-1px}.patient-card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;display:grid}@media (max-width:900px){.patient-card-grid{grid-template-columns:repeat(2,1fr)}}.patient-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:14px;min-width:0;padding:1.25rem}.patient-card-header{align-items:center;gap:.75rem;margin-bottom:.75rem;display:flex}.patient-avatar{width:44px;height:44px;color:var(--color-text-blue);background:#dbeafe;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;font-size:.85rem;font-weight:700;display:flex}.patient-card-name{color:var(--color-text);font-size:1rem;font-weight:600}.patient-card-meta{color:var(--color-text-muted);margin-top:.1rem;font-size:.8rem}.patient-card-contact{overflow-wrap:anywhere;min-width:0;color:var(--color-text-muted);align-items:center;gap:.4rem;margin-top:.35rem;font-size:.85rem;display:flex}.list-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:14px;overflow:hidden}.list-card-spaced{margin-bottom:1rem}.list-card-date-header{border-bottom:1px solid var(--color-border);background:var(--color-bg);padding:1rem 1.25rem;font-size:.95rem;font-weight:600}.list-row{border-bottom:1px solid var(--color-border);color:inherit;align-items:center;gap:1rem;padding:1rem 1.25rem;text-decoration:none;display:flex}.list-row:last-child{border-bottom:none}.list-row-link{cursor:pointer;justify-content:space-between}.list-row-link:hover{background:var(--color-bg)}.list-row-time{color:var(--color-text-blue);min-width:52px;font-size:.9rem;font-weight:700}.list-row-body{flex:1;min-width:0}.list-row-title{color:var(--color-text);font-size:.95rem;font-weight:600}.list-row-sub{color:var(--color-text-muted);margin-top:.15rem;font-size:.82rem}.status-badge{white-space:nowrap;border-radius:20px;padding:.3rem .7rem;font-size:.75rem;font-weight:600;display:inline-block}.status-scheduled,.status-confirmed,.status-issued{color:#1d4ed8;background:#dbeafe}.status-checked_in,.status-partially_paid{color:#b45309;background:#fef3c7}.status-in_progress{color:#6d28d9;background:#ede9fe}.status-completed,.status-paid{color:#047857;background:#d1fae5}.status-cancelled,.status-no_show,.status-credited{color:#4b5563;background:#f3f4f6}.status-overdue{color:#b91c1c;background:#fee2e2}.status-draft{color:#4b5563;background:#f3f4f6}.billing-summary-grid{grid-template-columns:repeat(3,1fr);gap:1rem;margin-bottom:1.5rem;display:grid}@media (max-width:900px){.billing-summary-grid{grid-template-columns:1fr}}.stat-value-green{color:#059669}.stat-value-red{color:#dc2626}.stat-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}@media (max-width:1100px){.stat-grid-4{grid-template-columns:repeat(2,1fr)}}.stat-label-green{color:var(--color-text-green)}.stat-label-red{color:#dc2626}.stat-label-blue{color:var(--color-text-blue)}.stat-label-purple{color:var(--color-text-purple)}.reports-grid{grid-template-columns:repeat(2,1fr);gap:1rem;display:grid}@media (max-width:900px){.reports-grid{grid-template-columns:1fr}}.patient-card-tags{flex-wrap:wrap;gap:.4rem;margin-top:.75rem;display:flex}.tag-chip{color:#6b7280;background:#f3f4f6;border-radius:20px;padding:.2rem .6rem;font-size:.72rem;font-weight:600;display:inline-block}.tag-allergy{color:#b45309;background:#fef3c7}.tag-diabetes{color:#be185d;background:#fce7f3}.tag-bp{color:#c2410c;background:#ffedd5}.tag-pregnant{color:#6d28d9;background:#ede9fe}.medical-history-section{border-top:1px solid var(--color-border);flex-direction:column;gap:.6rem;margin-top:.25rem;padding-top:1rem;display:flex}.medical-history-label{text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-muted);margin:0 0 .2rem;font-size:.75rem}.catalog-grid{grid-template-columns:repeat(3,1fr);gap:1rem;display:grid}@media (max-width:900px){.catalog-grid{grid-template-columns:repeat(2,1fr)}}.catalog-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:14px;padding:1.25rem}.catalog-card-header{justify-content:space-between;align-items:center;margin-bottom:.4rem;display:flex}.catalog-code{letter-spacing:.04em;text-transform:uppercase;color:var(--color-primary);overflow-wrap:anywhere;font-size:.75rem;font-weight:700}.catalog-delete-button{color:#dc2626;cursor:pointer;background:0 0;border:none;border-radius:6px;align-items:center;padding:.2rem;display:flex}.catalog-delete-button:hover{background:var(--color-error-bg)}.catalog-delete-button:disabled{opacity:.5;cursor:default}.catalog-card-actions{align-items:center;gap:.15rem;display:flex}.catalog-edit-button{color:var(--color-text-muted);cursor:pointer;background:0 0;border:none;border-radius:6px;align-items:center;padding:.2rem;display:flex}.catalog-edit-button:hover{background:var(--color-bg);color:var(--color-text)}.catalog-card-editing{flex-direction:column;gap:.6rem;display:flex}.catalog-card-editing label{color:var(--color-text-muted);flex-direction:column;gap:.25rem;min-width:0;font-size:.78rem;display:flex}.catalog-card-editing input{border:1px solid var(--color-control-border);color:var(--color-text);border-radius:6px;min-width:0;padding:.45rem .6rem;font-family:inherit;font-size:.9rem}.catalog-edit-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:.6rem;display:grid}.catalog-edit-actions{align-items:center;gap:.75rem;display:flex}.catalog-notice{color:#6b5a1a;background:#fbf3d9;border:1px solid #e8d68a;border-radius:6px;margin:0 0 1.25rem;padding:.6rem .85rem;font-size:.85rem}.catalog-notice a{color:inherit;font-weight:600}.catalog-name{color:var(--color-text);margin-bottom:.2rem;font-size:1rem;font-weight:600}.catalog-description{color:var(--color-text-muted);margin-bottom:.9rem;font-size:.82rem}.catalog-footer{justify-content:space-between;align-items:center;margin-top:.6rem;display:flex}.catalog-price{color:var(--color-text);font-size:1.15rem;font-weight:700}.catalog-duration{color:var(--color-text-muted);align-items:center;gap:.3rem;font-size:.8rem;display:flex}.button-outline{border:1.5px solid var(--color-primary);color:var(--color-primary);background:0 0;border-radius:6px;padding:.6rem 1.1rem;font-size:.9rem;font-weight:500;text-decoration:none;display:inline-block}.button-outline:hover{background:var(--color-primary);color:var(--color-on-primary)}.feature-locked{background:var(--color-surface);border:1px solid var(--color-border);text-align:center;border-radius:14px;padding:3rem 2rem}.feature-locked h1{margin:0 0 .5rem;font-size:1.3rem}.app-topbar{padding:1.25rem 2.5rem 0}.top-search{max-width:640px;position:relative}.top-search-icon{color:var(--color-text-muted);pointer-events:none;position:absolute;top:50%;left:.9rem;transform:translateY(-50%)}.top-search input{border:1px solid var(--color-control-border);background:var(--color-surface);border-radius:10px;width:100%;padding:.7rem .9rem .7rem 2.4rem;font-family:inherit;font-size:.9rem}.top-search input:focus{outline:2px solid var(--color-primary);outline-offset:-1px}.top-search-results{background:var(--color-surface);border:1px solid var(--color-border);z-index:50;border-radius:10px;max-height:400px;padding:.5rem;position:absolute;top:calc(100% + .4rem);left:0;right:0;overflow-y:auto;box-shadow:0 8px 24px #00000014}.top-search-empty{text-align:center;color:var(--color-text-muted);padding:1rem;font-size:.85rem}.top-search-group{margin-bottom:.5rem}.top-search-group:last-child{margin-bottom:0}.top-search-group-label{text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-muted);padding:.4rem .6rem;font-size:.7rem}.top-search-item{text-align:left;cursor:pointer;background:0 0;border:none;border-radius:6px;width:100%;padding:.5rem .6rem;display:block}.top-search-item:hover{background:var(--color-bg)}.top-search-item-title{color:var(--color-text);font-size:.88rem;font-weight:500}.top-search-item-subtitle{color:var(--color-text-muted);margin-top:.1rem;font-size:.78rem}.page-header-actions{align-items:center;gap:.75rem;display:flex}.chip-row{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;flex-wrap:nowrap;padding-right:1.75rem;display:flex;overflow-x:auto;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 1.75rem),#0000);mask-image:linear-gradient(90deg,#000 calc(100% - 1.75rem),#0000)}.chip-row::-webkit-scrollbar{display:none}.chip-row>*{white-space:nowrap;flex:none}.range-filter-bar{align-items:center;gap:.5rem;margin-bottom:1.5rem}.range-filter-button{background:var(--color-surface);border:1px solid var(--color-border);color:var(--color-text-muted);cursor:pointer;border-radius:999px;padding:.4rem .9rem;font-size:.85rem}.range-filter-button:hover{color:var(--color-text);border-color:var(--color-text-muted)}.range-filter-button.active{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-on-primary)}.range-filter-custom{align-items:center;gap:.5rem;margin-left:.25rem;display:inline-flex}.range-filter-custom input[type=date]{border:1px solid var(--color-control-border);color:var(--color-text);background:var(--color-surface);border-radius:6px;padding:.35rem .5rem;font-family:inherit;font-size:.85rem}.range-filter-custom span{color:var(--color-text-muted);font-size:.85rem}.range-filter-apply{background:var(--color-primary);color:var(--color-on-primary);cursor:pointer;border:none;border-radius:6px;padding:.4rem .8rem;font-size:.85rem}.range-filter-apply:hover{background:var(--color-primary-dark)}.range-filter-apply:disabled{opacity:.5;cursor:default}.stat-card-fixed-note{color:var(--color-text-muted);margin-top:.35rem;font-size:.7rem}.view-toggle{background:var(--color-bg);border:1px solid var(--color-border);border-radius:8px;margin-bottom:1.25rem;padding:.2rem;display:inline-flex}.view-toggle-button{color:var(--color-text-muted);cursor:pointer;background:0 0;border:none;border-radius:6px;padding:.4rem 1rem;font-size:.85rem;font-weight:500}.view-toggle-button.active{background:var(--color-surface);color:var(--color-text);box-shadow:0 1px 3px #00000014}.calendar-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:14px;padding:1.25rem}.calendar-header{justify-content:space-between;align-items:center;margin-bottom:1rem;display:flex}.calendar-month-label{font-size:1.05rem;font-weight:600}.calendar-nav{align-items:center;gap:.4rem;display:flex}.calendar-nav button{border:1px solid var(--color-border);background:var(--color-surface);cursor:pointer;color:var(--color-text);border-radius:6px;align-items:center;padding:.35rem .5rem;display:flex}.calendar-nav button:hover{background:var(--color-bg)}.calendar-today-button{font-size:.8rem;padding:.35rem .75rem!important}.calendar-grid-scroll{border-radius:8px;overflow-x:auto}.calendar-grid{background:var(--color-border);border:1px solid var(--color-border);border-radius:8px;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;min-width:700px;transition:opacity .15s;display:grid;overflow:hidden}.calendar-weekday{background:var(--color-bg);text-align:center;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-muted);padding:.5rem;font-size:.72rem;font-weight:600}.calendar-day{background:var(--color-surface);flex-direction:column;gap:.25rem;min-width:0;min-height:100px;padding:.4rem;display:flex}.calendar-day-muted{background:var(--color-bg)}.calendar-day-muted .calendar-day-number{color:var(--color-text-muted)}.calendar-day-closed{background:repeating-linear-gradient(135deg, var(--color-bg), var(--color-bg) 8px, var(--color-border) 8px, var(--color-border) 9px)}.calendar-day-closed-label{text-transform:uppercase;letter-spacing:.03em;color:var(--color-text-muted);font-size:.65rem}.calendar-day-clickable{cursor:pointer}.calendar-day-clickable:hover{background:var(--color-bg)}.calendar-day-today .calendar-day-number{background:var(--color-primary);color:var(--color-on-primary);border-radius:50%;justify-content:center;align-items:center;width:22px;height:22px;display:flex}.calendar-day-number{color:var(--color-text);font-size:.8rem;font-weight:600}.calendar-day-appointments{flex-direction:column;gap:.2rem;display:flex}.calendar-chip{white-space:nowrap;text-overflow:ellipsis;border-radius:4px;padding:.15rem .35rem;font-size:.68rem;font-weight:500;overflow:hidden}.calendar-more{color:var(--color-text-muted);padding:.1rem .35rem;font-size:.68rem}.calendar-grid-loading{opacity:.5}.app-topbar{justify-content:space-between;align-items:center;gap:1rem;padding:1.25rem 2.5rem 0;display:flex}.theme-toggle{border:1px solid var(--color-border);background:var(--color-surface);cursor:pointer;color:var(--color-text);border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;padding:.5rem;display:flex}.theme-toggle:hover{background:var(--color-bg)}body,.stat-card,.panel-card,.patient-card,.catalog-card,.list-card,.calendar-card,.calendar-day,.form-card,.auth-card,.app-nav,.top-search input,.top-search-results,.patients-search input{transition:background-color .15s,color .15s,border-color .15s}[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-on-primary:#0b1f1d;--color-input-bg:#16191c;--color-control-border:#6b7780;--color-link:#8ab4f8;--color-on-icon:#0b1220;--color-text-blue:var(--color-icon-blue);--color-text-purple:var(--color-icon-purple);--color-text-green:#34d399;--color-error-bg:#f8717129;--color-planned-bg:#3a1f1c;--color-completed-bg:#17301f;--color-completed:#4ade80;--color-bg:#16191c;--color-surface:#1f2428;--color-primary:#2dd4bf;--color-primary-dark:#14b8a6;--color-text:#e8ebee;--color-text-muted:#9aa3ab;--color-border:#2f363c;--color-warning-text:#fbbf24;--color-error:#f87171;--color-icon-blue:#60a5fa;--color-icon-orange:#fb923c;--color-icon-teal:#2dd4bf;--color-icon-purple:#a78bfa;--color-icon-pink:#f472b6;--color-icon-dark:#cbd5e1}[data-theme=dark] .status-scheduled,[data-theme=dark] .status-confirmed,[data-theme=dark] .status-issued{color:#93c5fd;background:#1e3a5f}[data-theme=dark] .status-checked_in,[data-theme=dark] .status-partially_paid{color:#fcd34d;background:#4a3510}[data-theme=dark] .status-in_progress{color:#c4b5fd;background:#3b2f5e}[data-theme=dark] .status-completed,[data-theme=dark] .status-paid{color:#6ee7b7;background:#143d2e}[data-theme=dark] .status-cancelled,[data-theme=dark] .status-no_show,[data-theme=dark] .status-credited,[data-theme=dark] .status-draft{color:#b8c0c8;background:#2a2f34}[data-theme=dark] .status-overdue{color:#fca5a5;background:#4a1e1e}[data-theme=dark] .stat-value-green{color:#6ee7b7}[data-theme=dark] .stat-value-red{color:#fca5a5}[data-theme=dark] .stat-label-green{color:#6ee7b7}[data-theme=dark] .stat-label-red{color:#fca5a5}[data-theme=dark] .tag-allergy{color:#fcd34d;background:#4a3510}[data-theme=dark] .tag-diabetes{color:#f9a8d4;background:#4a1338}[data-theme=dark] .tag-bp{color:#fdba74;background:#4a2510}[data-theme=dark] .tag-pregnant{color:#c4b5fd;background:#3b2f5e}[data-theme=dark] .patient-avatar{background:#1e3a5f}[data-theme=dark] .stat-card,[data-theme=dark] .panel-card,[data-theme=dark] .patient-card,[data-theme=dark] .catalog-card,[data-theme=dark] .list-card,[data-theme=dark] .calendar-card,[data-theme=dark] .form-card,[data-theme=dark] .auth-card,[data-theme=dark] .feature-locked,[data-theme=dark] .top-search-results{box-shadow:none}[data-theme=dark] .app-nav-links a.active{box-shadow:0 4px 12px #0006}[data-theme=dark] .view-toggle-button.active{box-shadow:none;border:1px solid var(--color-border)}.back-link{color:var(--color-text-muted);margin-bottom:1.25rem;font-size:.85rem;text-decoration:none;display:inline-block}.back-link:hover{color:var(--color-text)}.patient-profile-header{align-items:flex-start;gap:1.25rem;margin-bottom:1.5rem;display:flex}.patient-avatar-large{flex-shrink:0;width:64px;height:64px;font-size:1.2rem}.patient-profile-name{margin:0;font-size:1.4rem}.patient-profile-contact{color:var(--color-text-muted);gap:1rem;margin-top:.4rem;font-size:.85rem;display:flex}.patient-profile-tags{margin-top:.6rem}.patient-profile-meds{margin-bottom:1.5rem}.patient-profile-meds h2{margin:0 0 .5rem;font-size:1rem}.patient-profile-meds p{color:var(--color-text);margin:0;font-size:.9rem}@media (max-width:900px){.patient-profile-grid{grid-template-columns:1fr}}.patient-card-link{color:inherit;text-decoration:none;transition:border-color .15s,box-shadow .15s;display:block}.patient-card-link:hover{border-color:var(--color-primary);box-shadow:0 4px 12px #0000000f}[data-theme=dark] .patient-card-link:hover{box-shadow:0 4px 12px #0000004d}.patient-profile-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;display:grid}@media (max-width:1200px){.patient-profile-grid{grid-template-columns:repeat(2,1fr)}}@media (max-width:640px){.patient-profile-grid{grid-template-columns:1fr}}.read-only-banner{color:#6b5a1a;background:#fbf3d9;border-bottom:1px solid #e8d68a;padding:.7rem 2.5rem;font-size:.85rem;line-height:1.5}.read-only-banner a{color:inherit;font-weight:600}.read-only-notice{background:var(--color-surface);border:1px solid var(--color-border);border-radius:10px;max-width:520px;padding:2rem}.read-only-notice h1{margin:0 0 .6rem;font-size:1.2rem}.read-only-notice p{color:var(--color-text-muted);margin:0 0 1rem;font-size:.9rem;line-height:1.55}.marketing-page{max-width:1100px;margin:0 auto;padding:0 1.5rem}.marketing-section{padding:4rem 0}.marketing-section h2{text-align:center;margin:0 0 2rem;font-size:1.9rem}.marketing-btn-primary{background:var(--color-primary);color:var(--color-on-primary);cursor:pointer;border:none;border-radius:8px;padding:.85rem 1.6rem;font-size:1rem;font-weight:600;text-decoration:none;display:inline-block}.marketing-btn-primary:hover{background:var(--color-primary-dark)}.marketing-hero{background:linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);grid-template-columns:1fr 1fr;align-items:center;gap:3rem;padding:5rem 0 4rem;display:grid}.marketing-hero-copy h1{margin:0 0 1.1rem;font-size:2.6rem;line-height:1.15}.marketing-hero-subhead{color:var(--color-text-muted);margin:0 0 1.75rem;font-size:1.1rem;line-height:1.55}.marketing-hero-ctas{flex-wrap:wrap;align-items:center;gap:1.25rem;display:flex}.marketing-hero-call-link{color:var(--color-primary);font-weight:500;text-decoration:none}.marketing-hero-call-link:hover{text-decoration:underline}.marketing-hero-note{color:var(--color-text-muted);margin:1rem 0 0;font-size:.85rem}.marketing-screenshot-frame{border:1px solid var(--color-border);background:var(--color-surface);border-radius:10px;transition:transform .25s;overflow:hidden;box-shadow:0 8px 24px #00000014}.marketing-screenshot-frame:hover{transform:translateY(-4px)}.marketing-screenshot-chrome{background:var(--color-bg);border-bottom:1px solid var(--color-border);gap:.4rem;padding:.6rem .75rem;display:flex}.marketing-screenshot-dot{background:var(--color-border);border-radius:50%;width:9px;height:9px}.marketing-screenshot-placeholder{aspect-ratio:16/10;background:repeating-linear-gradient(135deg, var(--color-bg), var(--color-bg) 10px, var(--color-surface) 10px, var(--color-surface) 20px);color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.04em;text-align:center;justify-content:center;align-items:center;padding:1rem;font-size:.8rem;display:flex}.marketing-problem-grid{grid-template-columns:repeat(2,1fr);gap:1.5rem;margin-bottom:2.5rem;display:grid}.marketing-problem-item{background:var(--color-surface);border:1px solid var(--color-border);border-radius:10px;align-items:flex-start;gap:.9rem;padding:1.25rem;display:flex}.marketing-problem-icon{width:24px;height:24px;color:var(--color-primary);flex-shrink:0}.marketing-problem-item p{margin:0;line-height:1.5}.marketing-problem-closing{text-align:center;max-width:480px;margin:0 auto;font-size:1.1rem;font-weight:500}.marketing-features-list{flex-direction:column;gap:4rem;display:flex}.marketing-feature-row{grid-template-columns:1fr 1fr;align-items:center;gap:3rem;display:grid}.marketing-feature-row-reverse .marketing-feature-copy{order:2}.marketing-feature-row-reverse .marketing-feature-visual{order:1}.marketing-feature-copy h3{margin:0 0 .75rem;font-size:1.4rem}.marketing-feature-copy p{color:var(--color-text-muted);margin:0;line-height:1.6}.marketing-steps{grid-template-columns:repeat(3,1fr);gap:2rem;display:grid}.marketing-step{text-align:center}.marketing-step-number{background:var(--color-primary);width:40px;height:40px;color:var(--color-on-primary);border-radius:50%;justify-content:center;align-items:center;margin:0 auto 1rem;font-weight:600;display:flex}.marketing-step h3{margin:0 0 .5rem;font-size:1.15rem}.marketing-step p{color:var(--color-text-muted);margin:0;line-height:1.55}.marketing-trust-grid{grid-template-columns:repeat(4,1fr);gap:1.5rem;display:grid}.marketing-trust-item{text-align:center}.marketing-trust-icon{width:28px;height:28px;color:var(--color-primary);margin-bottom:.75rem}.marketing-trust-item h3{margin:0 0 .4rem;font-size:1rem}.marketing-trust-item p{color:var(--color-text-muted);margin:0;font-size:.9rem;line-height:1.5}.marketing-demo-form{text-align:center}.marketing-demo-form-sub{max-width:520px;color:var(--color-text-muted);margin:0 auto;line-height:1.55}.marketing-demo-form-card{background:var(--color-surface);border:1px solid var(--color-border);text-align:left;border-radius:10px;max-width:420px;margin:2rem auto 0;padding:2rem}.marketing-demo-form-card form{flex-direction:column;gap:.75rem;display:flex}.marketing-demo-form-card input{border:1px solid var(--color-control-border);border-radius:6px;padding:.65rem .8rem;font-family:inherit;font-size:.9rem}.marketing-demo-form-card input:focus{outline:2px solid var(--color-primary);outline-offset:-1px}.marketing-demo-form-card button{background:var(--color-primary);color:var(--color-on-primary);cursor:pointer;border:none;border-radius:6px;margin-top:.4rem;padding:.75rem;font-size:.95rem;font-weight:600}.marketing-demo-form-card button:hover{background:var(--color-primary-dark)}.marketing-demo-form-card button:disabled{opacity:.6;cursor:default}.marketing-demo-form-success{text-align:center;color:var(--color-primary);font-weight:500}.marketing-demo-form-call{text-align:center;color:var(--color-text-muted);margin:1.25rem 0 0;font-size:.85rem}.marketing-faq-list{max-width:680px;margin:0 auto}.marketing-faq-item{border-bottom:1px solid var(--color-border)}.marketing-faq-question{text-align:left;width:100%;color:var(--color-text);cursor:pointer;background:0 0;border:none;justify-content:space-between;align-items:center;gap:1rem;padding:1.1rem 0;font-family:inherit;font-size:1rem;font-weight:500;display:flex}.marketing-faq-chevron{width:18px;height:18px;color:var(--color-text-muted);flex-shrink:0;transition:transform .2s}.marketing-faq-chevron-open{transform:rotate(180deg)}.marketing-faq-answer-wrap{overflow:hidden}.marketing-faq-answer{color:var(--color-text-muted);margin:0 0 1.1rem;line-height:1.6}.marketing-final-cta{text-align:center;background:var(--color-surface);border-radius:16px;margin:2rem 0 4rem}.marketing-final-cta p{color:var(--color-text-muted);margin:0 0 1.5rem}.marketing-footer{text-align:center;border-top:1px solid var(--color-border);color:var(--color-text-muted);padding:2.5rem 0 3rem;font-size:.85rem}.marketing-footer a{color:var(--color-text-muted)}@media (max-width:860px){.marketing-hero{grid-template-columns:1fr;padding-top:3rem}.marketing-hero-copy h1{font-size:2rem}.marketing-problem-grid{grid-template-columns:1fr}.marketing-feature-row,.marketing-feature-row-reverse .marketing-feature-copy,.marketing-feature-row-reverse .marketing-feature-visual{order:initial}.marketing-feature-row{grid-template-columns:1fr;gap:1.5rem}.marketing-steps{grid-template-columns:1fr;gap:2.5rem}.marketing-trust-grid{grid-template-columns:repeat(2,1fr)}}.patient-tabs-strip{white-space:nowrap;border-bottom:1px solid var(--color-border);-webkit-overflow-scrolling:touch;gap:.25rem;margin:1.5rem 0 0;display:flex;overflow-x:auto}.patient-tab{color:var(--color-text-muted);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;flex:none;padding:.65rem 1rem;font-size:.9rem}.patient-tab.active{color:var(--color-primary);border-bottom-color:var(--color-primary);font-weight:600}.patient-tab-panel{padding-top:1.25rem}.timeline-kind{text-transform:uppercase;letter-spacing:.02em;color:var(--color-text-muted);margin-right:.5rem;font-size:.7rem;display:inline-block}.tooth-chart-toolbar{flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:.75rem;display:flex}.tooth-chart-note{color:var(--color-text-muted);margin:0;font-size:.8rem}.tooth-chart-mode-toggle{border:1px solid var(--color-border);border-radius:6px;flex:none;display:flex;overflow:hidden}.tooth-mode-button{background:var(--color-surface);color:var(--color-text-muted);cursor:pointer;border:none;border-right:1px solid var(--color-border);padding:.35rem .75rem;font-size:.8rem}.tooth-mode-button:last-child{border-right:none}.tooth-mode-button.active{background:var(--color-primary);color:var(--color-on-primary)}.tooth-chart-subheading{text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-muted);margin:1rem 0 .5rem;font-size:.75rem}.tooth-chart-subheading:first-of-type{margin-top:0}.tooth-chart{flex-direction:column;gap:.5rem;display:flex;overflow-x:auto}.tooth-arch{justify-content:center;gap:.3rem;min-width:max-content;margin:0 auto;display:flex}.tooth-quadrant,.tooth-quadrant-teeth{display:contents}.tooth-quadrant-label{display:none}.tooth-midline{background:var(--color-border);height:1px;margin:.25rem 0}.tooth-cell{border:1.5px solid var(--color-border);background:var(--color-surface);cursor:pointer;width:2.4rem;height:2.4rem;color:var(--color-text);border-radius:6px;flex-direction:column;justify-content:center;align-items:center;gap:.15rem;font-size:.7rem;display:flex}.tooth-cell:hover{border-color:var(--color-primary)}.tooth-number{font-weight:600}.tooth-marker{font-size:.65rem;line-height:1}.tooth-planned{background:var(--color-planned-bg);border-color:var(--color-error);color:var(--color-error)}.tooth-completed{background:var(--color-completed-bg);border-color:var(--color-completed);color:var(--color-completed)}.tooth-chart-legend{color:var(--color-text-muted);flex-wrap:wrap;gap:1.25rem;margin-top:.75rem;font-size:.8rem;display:flex}.tooth-legend-swatch{border:1.5px solid var(--color-border);vertical-align:middle;border-radius:4px;justify-content:center;align-items:center;width:1.1rem;height:1.1rem;margin-right:.35rem;font-size:.6rem;display:inline-flex}.tooth-legend-swatch.tooth-healthy{background:var(--color-surface)}.tooth-modal{flex-direction:column;gap:1.25rem;display:flex}.tooth-modal h3{margin:0 0 .5rem;font-size:.95rem}.tooth-treatment-form{flex-direction:column;gap:.75rem;display:flex}.tooth-treatment-form label{color:var(--color-text-muted);flex-direction:column;gap:.25rem;font-size:.85rem;display:flex}.tooth-treatment-form input,.tooth-treatment-form select,.tooth-treatment-form textarea{color:var(--color-text);border:1px solid var(--color-control-border);border-radius:6px;padding:.5rem;font-family:inherit;font-size:.9rem}.toast{background:var(--color-text);color:#fff;z-index:1000;border-radius:999px;padding:.6rem 1.2rem;font-size:.85rem;position:fixed;bottom:1.5rem;left:50%;transform:translate(-50%);box-shadow:0 4px 12px #0003}.working-hours-form{max-width:720px}.working-hours-form h2{margin:0;font-size:1.1rem}.working-hours-default-notice{color:#6b5a1a;background:#fbf3d9;border:1px solid #e8d68a;border-radius:6px;margin:0;padding:.6rem .85rem;font-size:.85rem}.working-hours-day{border-top:1px solid var(--color-border);padding-top:.85rem}.working-hours-day:first-of-type{border-top:none;padding-top:0}.working-hours-day-header{justify-content:space-between;align-items:center;display:flex}.working-hours-day-label{color:var(--color-text);font-size:.9rem;font-weight:600}.working-hours-closed-toggle{color:var(--color-text-muted);align-items:center;flex-direction:row!important;gap:.4rem!important}.working-hours-windows{flex-direction:column;gap:.5rem;margin-top:.6rem;display:flex}.working-hours-window{align-items:center;gap:.5rem;display:flex}.working-hours-window input[type=time]{border:1px solid var(--color-control-border);border-radius:6px;padding:.4rem .6rem;font-family:inherit;font-size:.85rem}.working-hours-window span{color:var(--color-text-muted);font-size:.8rem}@media print{.app-nav,.app-topbar,.no-print{display:none!important}.app-content{margin:0!important}.page{max-width:none;padding:0}}.prescription-sheet{background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px;max-width:720px;padding:2rem}.prescription-meta{border-bottom:1px solid var(--color-border);justify-content:space-between;align-items:flex-start;margin-bottom:1rem;padding-bottom:1rem;display:flex}.prescription-patient-name{font-size:1.15rem;font-weight:600}.prescription-patient-sub{color:var(--color-text-muted);margin-top:.2rem;font-size:.85rem}.prescription-date{color:var(--color-text-muted);font-size:.9rem}.prescription-rx-mark{color:var(--color-primary);margin-bottom:.5rem;font-size:1.75rem;font-weight:700}.prescription-items-table{margin-bottom:1.5rem}.prescription-notes{margin-bottom:2rem;font-size:.9rem}.prescription-signature{text-align:right;margin-top:3rem}.prescription-signature-line{border-top:1px solid var(--color-text);width:220px;margin-bottom:.4rem;margin-left:auto}.prescription-dentist-name{font-size:.9rem;font-weight:600}.prescription-dentist-reg{color:var(--color-text-muted);font-size:.8rem}.clinic-branding-form h2{margin:0;font-size:1.1rem}.clinic-logo-section{border-top:1px solid var(--color-border);flex-direction:column;gap:.5rem;padding-top:1rem;display:flex}.clinic-logo-label{color:var(--color-text-muted);font-size:.85rem}.clinic-logo-row{align-items:center;gap:1.25rem;display:flex}.clinic-logo-preview{object-fit:contain;background:var(--color-bg);border:1px solid var(--color-border);border-radius:8px;width:72px;height:72px}.clinic-logo-preview-empty{color:var(--color-text-muted);text-align:center;justify-content:center;align-items:center;font-size:.7rem;display:flex}.clinic-logo-actions{flex-direction:column;align-items:flex-start;gap:.35rem;display:flex}.clinic-logo-hint{color:var(--color-text-muted);margin:0;font-size:.75rem}.clinic-letterhead{border-bottom:2px solid var(--color-border);align-items:center;gap:.85rem;margin-bottom:1.25rem;padding-bottom:1.25rem;display:flex}.clinic-letterhead-logo{object-fit:contain;width:56px;height:56px}.clinic-letterhead-mark{background:var(--gradient-primary);width:56px;height:56px;color:var(--color-on-primary);-webkit-print-color-adjust:exact;print-color-adjust:exact;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;font-size:1.1rem;font-weight:700;display:flex}.clinic-letterhead-name{color:var(--color-text);font-size:1.3rem;font-weight:700}.table-scroll{overflow-x:auto}.invoice-gst-header{color:var(--color-text-muted);border-bottom:1px solid var(--color-border);justify-content:space-between;align-items:flex-start;gap:1.5rem;margin-bottom:1rem;padding-bottom:1rem;font-size:.85rem;display:flex}.invoice-gst-heading{color:var(--color-text);margin-bottom:.3rem;font-size:1rem;font-weight:700}.invoice-gst-meta{text-align:right;font-size:.85rem}.invoice-bill-to{margin-bottom:1.5rem;font-size:.85rem}.invoice-bill-to-heading{text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-muted);margin-bottom:.3rem;font-size:.7rem}.invoice-patient-name{color:var(--color-text);font-size:1rem;font-weight:600}.invoice-signature{text-align:right;color:var(--color-text-muted);margin-top:3rem;font-size:.85rem}.invoice-signature-line{border-top:1px solid var(--color-text);width:220px;margin-bottom:.4rem;margin-left:auto}.invoice-page .table th.num,.invoice-page .table td.num{text-align:right;white-space:nowrap}.invoice-section-heading{margin-top:2rem;font-size:1.1rem}.invoice-gst-split{color:var(--color-text-muted);white-space:nowrap;font-size:.72rem}@page{size:A4;margin:0}@media print{.print-frame{-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:10mm}.invoice-page{font-size:12px}.invoice-page .table-scroll{overflow:visible}.invoice-page .invoice-items{table-layout:fixed;border-radius:0;width:100%;overflow:visible;margin-bottom:.75rem!important}.invoice-page .invoice-items col.col-desc{width:auto}.invoice-page .invoice-items col.col-sac{width:13mm}.invoice-page .invoice-items col.col-qty{width:9mm}.invoice-page .invoice-items col.col-money{width:22mm}.invoice-page .invoice-items col.col-gst{width:31mm}.invoice-page .invoice-items col.col-total{width:24mm}.invoice-page .table th{letter-spacing:.02em;padding:.3rem .4rem;font-size:8.5px}.invoice-page .table td{padding:.3rem .4rem;font-size:11px}.invoice-page .invoice-items td:first-child{white-space:normal;overflow-wrap:anywhere}.invoice-page .invoice-gst-split{font-size:8.5px}.invoice-page .clinic-letterhead{margin-bottom:.6rem;padding-bottom:.5rem}.invoice-page .clinic-letterhead-logo,.invoice-page .clinic-letterhead-mark{width:40px;height:40px}.invoice-page .clinic-letterhead-name{font-size:1.1rem}.invoice-page .invoice-gst-header{margin-bottom:.5rem;padding-bottom:.5rem}.invoice-page .invoice-bill-to{margin-bottom:.75rem}.invoice-page .invoice-gst-meta{white-space:nowrap}.invoice-page .summary-card{break-inside:avoid;border-radius:0;gap:.15rem;max-width:300px;margin:0 0 .75rem auto;padding:.5rem .8rem}.invoice-page .summary-row{font-size:11px}.invoice-page .summary-card .hint{margin:.2rem 0 0;font-size:10px}.invoice-page .invoice-section-heading{margin:.75rem 0 .35rem;font-size:.95rem}.invoice-page .invoice-signature{break-inside:avoid;margin-top:24mm}.invoice-page .invoice-closing,.invoice-page .table tr{break-inside:avoid}:root,[data-theme=dark]{--color-bg:#fff!important;--color-surface:#fff!important;--color-primary:#0f5f5c!important;--color-primary-dark:#0a4644!important;--color-text:#1f2523!important;--color-text-muted:#6b7570!important;--color-border:#e4ded4!important;--color-error:#b3402f!important;--color-on-primary:#fff!important}html,body{background:#fff!important}.app-shell{min-height:0}}.app-nav-toggle,.app-nav-close,.app-nav-backdrop{display:none}@media (max-width:768px){.app-nav-toggle{border:1px solid var(--color-border);background:var(--color-surface);width:44px;height:44px;color:var(--color-text);cursor:pointer;border-radius:8px;flex:none;justify-content:center;align-items:center;display:flex}.app-nav{z-index:50;overscroll-behavior:contain;visibility:hidden;width:min(280px,85vw);box-shadow:none;outline:none;transition:transform .2s,visibility 0s linear .2s;position:fixed;top:0;bottom:0;left:0;overflow-y:auto;transform:translate(-100%)}.app-nav.app-nav-open{visibility:visible;transition:transform .2s,visibility;transform:translate(0);box-shadow:0 0 40px #00000040}.app-nav-close{width:36px;height:36px;color:var(--color-text-muted);cursor:pointer;background:0 0;border:0;border-radius:8px;justify-content:center;align-self:flex-end;align-items:center;margin:-.5rem -.25rem .25rem 0;display:flex}.app-nav-backdrop{z-index:40;background:#00000073;display:block;position:fixed;inset:0}.app-topbar{z-index:30;padding:calc(env(safe-area-inset-top,0px) + .5rem) 1rem .5rem 1rem;background:var(--color-bg);border-bottom:1px solid var(--color-border);gap:.75rem;position:sticky;top:0}.app-topbar .top-search{flex:1 1 0;min-width:0;max-width:none}html{scroll-padding-top:calc(72px + env(safe-area-inset-top,0px))}.app-nav-links a{padding:.75rem .85rem}}@media print{.app-nav-toggle,.app-nav-close,.app-nav-backdrop{display:none!important}}@media (max-width:900px){.patient-card-grid,.stat-grid,.stat-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}}fieldset{min-width:0}.auth-card .row{flex-wrap:wrap}.auth-card .row>*{flex:8rem;min-width:0}@media (max-width:640px){.page{padding:1.25rem 1rem}.page-header{flex-wrap:wrap;gap:.75rem;margin-bottom:1.25rem}.page-header-actions{flex-wrap:wrap}.patient-card-grid,.stat-grid,.stat-grid-4{grid-template-columns:minmax(0,1fr)}.form-card{padding:1.25rem}.auth-page{padding:1rem}.auth-card{padding:1.25rem}.patient-profile-header>div{min-width:0}.patient-profile-contact{overflow-wrap:anywhere;flex-wrap:wrap;gap:.25rem 1rem}.patient-profile-grid{grid-template-columns:minmax(0,1fr)}.clinic-logo-row{flex-wrap:wrap}.clinic-logo-actions{min-width:0;max-width:100%}.clinic-logo-actions input[type=file]{max-width:100%}.working-hours-day-header{flex-wrap:wrap;gap:.5rem}.working-hours-window{flex-wrap:wrap}.working-hours-window input[type=time]{flex:7rem;min-width:0}.form-card .row{flex-direction:column}.form-card label{min-width:0}.form-card input,.form-card select,.form-card textarea{min-width:0;max-width:100%}.tooth-chart{margin:0 -.5rem;overflow:visible}.tooth-arch{flex-direction:column;gap:.6rem;width:100%;min-width:0;margin:0}.tooth-arch-lower{flex-direction:column-reverse}.tooth-quadrant{display:block}.tooth-quadrant-teeth{grid-template-columns:repeat(var(--teeth,8), calc((100% - 7 * 2px) / 8));justify-content:center;gap:2px;display:grid}.tooth-quadrant-label{letter-spacing:.04em;text-transform:uppercase;color:var(--color-text-muted);margin:0 0 .2rem;font-size:.7rem;font-weight:600;display:block}.tooth-cell{aspect-ratio:1;width:100%;height:auto;min-height:2.5rem}}@media print{.table-scroll{overflow:visible}}.appointment-status-row{align-items:center;gap:.75rem;margin-bottom:1rem;display:flex}.appointment-note{color:var(--color-text-muted);font-size:.9rem}.appointment-warning{background:var(--color-warning-bg,#d977061f);border:1px solid var(--color-warning,#d97706);border-radius:8px;margin:0 0 1rem;padding:.75rem 1rem;font-size:.9rem}.appointment-actions{flex-direction:column;gap:.75rem;margin-bottom:1.5rem;display:flex}.appointment-action-primary{width:100%;min-height:3rem;font-size:1rem}.appointment-action-row{flex-wrap:wrap;gap:.75rem;display:flex}.appointment-action-row>*{text-align:center;flex:8rem;min-height:2.75rem}.appointment-action-cancel,.appointment-action-danger{color:var(--color-error);border-color:var(--color-error)}.appointment-action-danger{background:var(--color-error);color:var(--color-surface)}.appointment-confirm{flex-direction:column;gap:.75rem;display:flex}.appointment-confirm label{color:var(--color-text-muted);flex-direction:column;gap:.35rem;font-size:.85rem;display:flex}.appointment-confirm textarea{width:100%;min-width:0;font:inherit;border:1px solid var(--color-control-border);background:var(--color-surface);color:var(--color-text);border-radius:6px;padding:.6rem .75rem}.appointment-dl{grid-template-columns:minmax(0,max-content) minmax(0,1fr);gap:.4rem 1rem;margin:0 0 1rem;display:grid}.appointment-dl dt{color:var(--color-text-muted)}.appointment-dl dd{overflow-wrap:anywhere;margin:0}.appointment-page .panel-card{margin-bottom:1rem}.appointment-row{padding:0}.appointment-row-link{min-width:0;color:inherit;flex:auto;align-items:center;gap:1rem;padding:1rem 1.25rem;text-decoration:none;display:flex}.appointment-row-link .list-row-body{flex:auto;min-width:0}.appointment-quick{white-space:nowrap;flex:none;min-height:2.75rem}.appointment-row-actions{flex:0 auto;min-width:0;margin-right:1rem}.appointment-row-actions .appointment-action-row>*{flex:none;min-width:5.5rem}.modal-row-anchor{width:100%;color:inherit;justify-content:space-between;align-items:flex-start;gap:1rem;text-decoration:none;display:flex}.modal-list-row-link{padding:0}.modal-list-row-link .modal-row-anchor{min-height:2.75rem;padding:.85rem 0}@media (max-width:640px){.appointment-row{flex-wrap:wrap}.appointment-row-link{flex-basis:100%;padding:.9rem 1rem}.appointment-row-actions{flex:100%;margin:.75rem 0 0;padding:0}.appointment-row>.appointment-row-actions{margin:0;padding:0 1rem 1rem}.appointment-row-actions .appointment-confirm,.appointment-row-actions .appointment-confirm label,.appointment-row-actions .appointment-confirm textarea{width:100%}.appointment-row-actions .appointment-action-row>*{flex:6rem}.appointment-dl{grid-template-columns:minmax(0,1fr);gap:.1rem}.appointment-dl dd{margin-bottom:.5rem}}.form-hint{color:var(--color-text-muted);margin:0;font-size:.85rem}.patient-profile-edit{flex-wrap:wrap;gap:.6rem;margin-top:.75rem;display:flex}.patient-profile-edit>a{align-items:center;min-height:2.75rem;display:inline-flex}.patient-action-bar{flex-wrap:wrap;gap:.6rem;margin:0 0 1rem;display:flex}.patient-action-bar>a{text-align:center;justify-content:center;align-items:center;min-height:2.75rem;display:inline-flex}.patient-tab-toolbar{flex-wrap:wrap;gap:.6rem;margin-bottom:.75rem;display:flex}.patient-tab-toolbar>a,.patient-empty>a{align-items:center;min-height:2.75rem;display:inline-flex}.patient-empty{flex-direction:column;align-items:flex-start;gap:.75rem;display:flex}.patient-row-main{flex-wrap:wrap;align-items:center;gap:.5rem .75rem;display:flex}.patient-row-main>a{overflow-wrap:anywhere;min-width:0}.patient-row-actions{margin-top:.5rem}.locked-patient{border:1px solid var(--color-border);background:var(--color-bg);border-radius:8px;flex-direction:column;gap:.15rem;padding:.75rem 1rem;display:flex}.locked-patient-label,.locked-patient-hint{color:var(--color-text-muted);font-size:.8rem}.locked-patient-name{overflow-wrap:anywhere;font-size:1.05rem}.notice-warning{background:var(--color-warning-bg,#d977061f);border:1px solid var(--color-warning,#d97706);border-radius:8px;margin:.75rem 0;padding:.75rem 1rem;font-size:.9rem}.field-hint{color:var(--color-text-muted);margin-top:.25rem;font-size:.8rem;font-weight:400;display:block}.field-hint-warning{color:var(--color-warning-text)}.checkbox-row{align-items:center;gap:.5rem;font-size:.9rem;display:flex}.checkbox-row input[type=checkbox]{flex:none;width:auto}.patient-picker{flex-direction:column;gap:.35rem;display:flex;position:relative}.patient-picker-label{font-size:.9rem;font-weight:500}.patient-picker-selected{border:1px solid var(--color-border);background:var(--color-surface);border-radius:8px;justify-content:space-between;align-items:center;gap:.75rem;padding:.55rem .75rem;display:flex}.patient-picker-list{z-index:20;background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px;max-height:18rem;margin:.25rem 0 0;padding:.25rem;list-style:none;position:absolute;top:100%;left:0;right:0;overflow-y:auto;box-shadow:0 8px 24px #0000001f}.patient-picker-option{cursor:pointer;border-radius:6px;flex-wrap:wrap;justify-content:space-between;gap:.15rem .75rem;padding:.6rem .7rem;display:flex}.patient-picker-option.active,.patient-picker-option:hover{background:var(--color-bg)}.patient-picker-meta{color:var(--color-text-muted);font-size:.85rem}.patient-picker-add{color:var(--color-primary);border-top:1px solid var(--color-border);border-radius:0 0 6px 6px;font-weight:600}.patient-picker-note{color:var(--color-text-muted);padding:.6rem .7rem;font-size:.9rem}.sheet-backdrop{z-index:60;background:#00000073;justify-content:center;align-items:center;padding:1rem;display:flex;position:fixed;inset:0}.sheet{background:var(--color-surface);border-radius:14px;width:100%;max-width:28rem;max-height:90vh;padding:1.25rem;overflow-y:auto}.sheet h2{margin:0 0 .75rem;font-size:1.15rem}.sheet form{flex-direction:column;gap:.75rem;display:flex}.sheet-actions{flex-wrap:wrap;align-items:center;gap:.75rem;margin-top:.5rem;display:flex}.sheet-duplicates{flex-direction:column;gap:.5rem;margin:0 0 .75rem;padding:0;list-style:none;display:flex}.sheet-duplicates li{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem;display:flex}@media (max-width:640px){.sheet-backdrop{align-items:flex-end;padding:0}.sheet{border-radius:14px 14px 0 0;max-width:none}}.sheet label{color:var(--color-text-muted);flex-direction:column;gap:.35rem;font-size:.85rem;display:flex}.sheet input,.sheet select{padding:.6rem .75rem;font-size:1rem}.sheet input:focus,.sheet select:focus{outline:2px solid var(--color-primary);outline-offset:-1px}.sheet button{background:var(--color-primary);color:var(--color-on-primary);cursor:pointer;border:none;border-radius:6px;padding:.65rem 1.3rem;font-size:.9rem;font-weight:500}.sheet button:disabled{opacity:.6;cursor:default}.sheet .button-secondary{background:var(--color-surface);color:var(--color-text);border:1px solid var(--color-border)}.sheet .link-button{color:var(--color-primary);background:0 0;padding:0;text-decoration:underline}.spinner{vertical-align:-.12em;border:2px solid;border-right-color:#0000;border-radius:50%;width:.9em;height:.9em;margin-right:.5em;animation:.7s linear infinite spinner-turn;display:inline-block}@keyframes spinner-turn{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.spinner{animation-duration:2.4s}}button[aria-busy=true]{cursor:progress}@media (max-width:640px){input,select,textarea{font-size:16px!important}}.invoice-number{white-space:nowrap}@media screen and (max-width:640px){.invoice-page .invoice-gst-header{flex-direction:column;gap:.75rem}.invoice-page .invoice-gst-meta{text-align:left}.invoice-page .invoice-items,.invoice-page .invoice-items tbody{background:0 0;border:none;display:block;overflow:visible}.invoice-page .invoice-items colgroup,.invoice-page .invoice-items thead{display:none}.invoice-page .invoice-items tr{background:var(--color-surface);border:1px solid var(--color-border);border-radius:10px;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:.5rem 1rem;margin-bottom:.65rem;padding:.9rem 1rem;display:grid}.invoice-page .invoice-items td,.invoice-page .invoice-items td.num{text-align:left;border:none;min-width:0;padding:0;font-size:.95rem;display:block}.invoice-page .invoice-items td.item-desc{order:0}.invoice-page .invoice-items td.item-sac{order:1;grid-column:1/-1;font-size:.8rem}.invoice-page .invoice-items td[data-label=Qty]{order:2}.invoice-page .invoice-items td[data-label=Unit\ price]{order:3}.invoice-page .invoice-items td[data-label=Discount]{order:4}.invoice-page .invoice-items td[data-label=GST]{order:5}.invoice-page .invoice-items td.item-total{order:6}.invoice-page .invoice-items td[data-label]:before{content:attr(data-label);letter-spacing:.04em;text-transform:uppercase;color:var(--color-text-muted);font-size:.7rem;font-weight:600;display:block}.invoice-page .invoice-items td.item-desc{overflow-wrap:anywhere;grid-column:1/-1;font-size:1rem;font-weight:600}.invoice-page .invoice-items td.item-total{border-top:1px solid var(--color-border);grid-column:1/-1;justify-content:space-between;align-items:baseline;margin-top:.15rem;padding-top:.55rem;font-size:1.05rem;font-weight:700;display:flex}.invoice-page .invoice-items td.item-total:before{display:inline}.invoice-page .invoice-items td.item-sac:before{margin-right:.4rem;display:inline}}.add-button,.form-card button.add-button{color:var(--color-primary);cursor:pointer;background:0 0;border:none;padding:.25rem 0;font-size:.9rem;font-weight:600;text-decoration:none}.add-button:hover,.form-card button.add-button:hover{color:var(--color-primary-dark);background:0 0}@media (max-width:768px){.app-nav-toggle,.theme-toggle{width:44px;height:44px;padding:0}}@media (max-width:640px){button:not(.tooth-cell):not(.calendar-chip),select,textarea,input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]){min-height:44px}.button,.button-outline,.button-secondary{justify-content:center;align-items:center;min-height:44px;display:inline-flex}.link-button,.add-button,.form-card button.add-button{align-items:center;min-height:44px;padding:.25rem .5rem .25rem 0;display:inline-flex}.back-link{align-items:center;min-height:44px;display:inline-flex}.checkbox-label,.checkbox-row,.working-hours-closed-toggle{align-items:center;min-height:44px}.catalog-delete-button,.catalog-edit-button,.modal-close{justify-content:center;min-width:44px;min-height:44px}.panel-header a,.page>p>a:only-child,.patient-row-main a,.table td a,.activity-list a:only-child{align-items:center;min-width:44px;min-height:44px;display:inline-flex}}.document-remove,.document-remove-open{margin-top:.6rem}.form-card button.link-button{color:var(--color-text-muted);background:0 0;border:none;padding:.25rem 0;font-size:.85rem;font-weight:400;text-decoration:underline}.form-card button.link-button:hover{color:var(--color-error);background:0 0}.form-card button.button-outline{color:var(--color-primary);border:1.5px solid var(--color-primary);background:0 0}.form-card button.button-outline:hover{background:var(--color-primary);color:var(--color-on-primary)}.form-card button.button-secondary{background:var(--color-surface);color:var(--color-text);border:1px solid var(--color-control-border)}.appointment-warning{flex-direction:column;gap:.75rem;display:flex}.appointment-warning p{margin:0}.appointment-warning .row{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;display:grid}.appointment-actions{margin-top:1rem}.reverse-payment-form,.void-invoice-panel{flex-direction:column;gap:.5rem;max-width:420px;display:flex}.void-invoice-panel>h3{margin-bottom:.4rem!important}.void-invoice-panel>.hint,.reverse-payment-form>.hint{margin-top:0;margin-bottom:.4rem}.reverse-payment-actions{flex-wrap:wrap;gap:.5rem;display:flex}.billing-view-switch .range-filter-button{align-items:center;text-decoration:none;display:inline-flex}@media (max-width:640px){.billing-view-switch .range-filter-button{min-height:44px;font-size:16px}}.doc-ref-link{color:var(--color-link)}@media print{.doc-ref-link{color:inherit;text-decoration:none}}.treatment-status-actions{margin-top:.5rem}.treatment-status-actions .appointment-action-row>*{flex:8rem}.treatment-status-actions .appointment-confirm{flex-direction:column;gap:.5rem;display:flex}.staff-row-inactive td{color:var(--color-text-muted)}.reschedule-form{flex-direction:column;gap:.75rem;max-width:420px;display:flex}.reschedule-form label{flex-direction:column;gap:.25rem;display:flex}@media (max-width:640px){.appointment-dl a{align-items:center;min-height:44px;display:inline-flex}}.whatsapp-send{flex-wrap:wrap;align-items:center;gap:.25rem .75rem;display:inline-flex}.whatsapp-consent{color:var(--color-text-muted);font-size:.875rem}.whatsapp-consent-revoked{color:var(--color-error);font-weight:600}.whatsapp-unavailable{color:var(--color-text-muted);font-size:.875rem}.share-link-panel{flex-wrap:wrap;align-items:center;gap:.5rem .75rem;display:flex}.consent-panel .consent-form{gap:.75rem;max-width:28rem;display:grid}@media (max-width:767px){.whatsapp-link,.share-link-panel .button-secondary,.share-link-panel .button-outline{align-items:center;min-height:44px;display:inline-flex}.whatsapp-send-compact .whatsapp-link{min-height:44px}}.auth-notice-success{background:var(--color-completed-bg);color:var(--color-completed);border-radius:6px;margin:0 0 .75rem;padding:.75rem 1rem;font-size:1rem;line-height:1.4}@media (max-width:767px){.auth-card .switch-link>a:only-child{align-items:center;min-height:44px;display:inline-flex}}.password-field{width:100%;display:block;position:relative}.password-field>input{width:100%;padding-right:3rem}.auth-card .password-toggle,.form-card .password-toggle,.password-toggle{width:44px;min-width:44px;height:44px;min-height:44px;color:var(--color-text-muted);cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;margin:0;padding:0;display:inline-flex;position:absolute;top:50%;right:0;transform:translateY(-50%)}.auth-card .password-toggle:hover,.form-card .password-toggle:hover,.password-toggle:hover{color:var(--color-text);background:0 0}.password-toggle:focus-visible{outline:2px solid var(--color-primary);outline-offset:-2px}.form-success{background:var(--color-completed-bg);color:var(--color-completed);border-radius:6px;margin:0 0 .75rem;padding:.75rem 1rem;font-size:1rem;line-height:1.4}.form-warning{background:var(--color-error-bg);color:var(--color-error);border-radius:6px;margin:0 0 .75rem;padding:.75rem 1rem;font-size:1rem;line-height:1.4}