/* Colo360: consistent public canvas and professional action spacing. */
body:has(#app[data-view="login"]) {
  background: radial-gradient(ellipse at 14% 12%,#f8dfdb,transparent 46%),radial-gradient(ellipse at 88% 45%,#e8def9,transparent 48%),var(--paper);
  background-attachment:fixed;
}
#app[data-view="login"] { max-width:none; margin:0; background:transparent; }
.public-home { width:100%; }
.public-home .login-wrap { max-width:1280px; margin:auto; background:transparent; }
.login-discover { display:block; text-align:center; padding:20px 12px; font-weight:700; color:var(--purple); text-underline-offset:5px; }
#registration { display:grid; gap:10px; }
#auth-form { display:grid; gap:12px; }
#auth-form .field-label { margin:0; }
#auth-form .form-grid { align-items:end; }
#password-field { display:grid; gap:10px; }
#auth-submit { margin-top:10px; }
.interest-success { background:var(--mint); color:var(--green); }
.product-preview { max-width:1200px; margin:0 auto; padding:48px 32px 80px; }
.product-preview>header { max-width:760px; margin:0 auto 40px; text-align:center; }
.product-preview h2 { font-size:clamp(1.8rem,3.5vw,3rem); line-height:1.15; }
.product-preview p { color:var(--ink-soft); line-height:1.7; }
.product-feature-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; }
.product-feature-grid article { background:#fffdf9; border:1px solid var(--border); border-radius:28px; padding:26px; }
.product-feature-grid img { display:block; width:144px; height:auto; margin-bottom:22px; }
.product-feature-grid h3 { font-size:1.15rem; }
.product-cta { display:flex; gap:22px; align-items:center; flex-wrap:wrap; padding:32px; margin-top:32px; background:#eae1fb; border-radius:28px; }
.product-cta>div { flex:1 1 280px; }
#section-content { display:flow-root; }
#section-content > .card, #section-content > .hours-actions, #section-content > .consultation-domains { margin-block:0 24px; }
.hours-actions { display:grid; gap:14px; }
.hours-actions > .card { margin:0; }
.hours-actions label { display:grid; gap:9px; margin-block:18px; }
.hours-actions > button { justify-self:start; }
#section-content > .card + .card { margin-top:24px; }
.section-footer { gap:18px; margin-top:26px; }
.sources-card { margin-top:32px; }
.source-list { display:grid; gap:12px; }
.source-list>a { display:flex; align-items:center; gap:16px; border:1px solid var(--border); border-radius:18px; padding:18px; text-decoration:none; background:var(--paper); line-height:1.5; }
.source-list>a>span:first-of-type { flex:1; }
.source-list>a:hover { background:#eee7fb; }
.list-toolbar { display:flex; align-items:end; flex-wrap:wrap; gap:16px; margin:18px 0; }
.list-toolbar:empty { display:none; }
.list-toolbar>label { display:grid; gap:8px; flex:1 1 220px; font-size:.9rem; font-weight:650; }
.list-pagination { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:24px 0; padding-top:18px; border-top:1px solid var(--border); }
.list-pagination>span { color:var(--ink-soft); font-size:.875rem; text-align:center; }
#family-list,.visit-list,#global-document-list { display:grid; gap:16px; }
#family-list .patient-item,.visit-list .patient-item { margin:0; padding:23px; border-radius:22px; border:1px solid var(--border); background:#fffdf9; }
#family-list .patient-item:hover,.visit-list .patient-item:hover { background:#f1ebfc; border-color:#b9a4e9; }
.document-item { margin:0; }
.document-item .btn-row { gap:12px; margin-top:22px; }
.document-item .button-link { display:inline-flex; align-items:center; padding:12px 18px; min-height:46px; background:var(--paper); border:1px solid var(--border); border-radius:14px; text-decoration:none; font-weight:650; }
#hours-report .card { display:grid; gap:20px; }
#hours-report form { display:grid; gap:18px; }
#hours-report form label:not(:has([type="checkbox"])) { display:grid; gap:8px; }
#hours-report .actions { display:flex; flex-wrap:wrap; gap:14px; margin:22px 0; }
#hours-report .actions>a { display:inline-flex; padding:14px 18px; border:1px solid var(--border); background:#f1ebfc; border-radius:16px; color:var(--purple); font-weight:700; text-decoration:none; }
#hours-report table { width:100%; border-collapse:collapse; }
#hours-report td,#hours-report th { padding:16px 12px; text-align:left; border-bottom:1px solid var(--border); }
@media(max-width:760px){
 .product-preview { padding:32px 20px 48px; }
 .product-feature-grid { grid-template-columns:1fr; }
 .product-feature-grid article { padding:24px; }
 .product-cta { padding:24px; }
 .product-cta>a,.product-cta>button { width:100%; }
 .list-pagination { gap:8px; }
 .list-pagination button { min-width:0; padding:10px 12px; }
 .source-list>a { padding:14px; gap:10px; }
 .hours-actions>button { width:100%; }
}
@media(min-width:761px) and (max-width:1000px){.product-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}

/* Card lists are padded surfaces; historical rows inside a card keep their dividers. */
.card.document-item {
  padding:26px;
  border:1px solid var(--border);
}
.document-item .document-heading { gap:16px; align-items:flex-start; }
.document-item > .muted { margin:16px 0 0; }
.document-item > .btn-row + button { margin-top:16px; }
.document-item > [data-native-slot]:not(:empty),
.document-item > [data-global-share]:not(:empty) { margin-top:20px; }
.page-heading > h2 { flex:1 1 auto; min-width:0; margin:0; }
.page-heading > button { flex:0 1 auto; width:auto; max-width:100%; }
.card > .btn-row + button, .card > button + button { margin-top:16px; }
.chapter-toggle + .sr-only + .mobile-picker { margin-top:12px; }
@media (max-width:760px) {
  .card.document-item { padding:20px; }
  .page-heading { align-items:flex-start; }
  .page-heading > h2 { flex-basis:100%; }
  .page-heading > button { width:100%; }
  .form-grid, .permission-grid { row-gap:16px; }
}

/* Keep reference and return actions separate from the clinical sheet heading. */
.record-reference-action { margin-bottom: 24px; }
.return-to-assessment { width: auto; max-width: 100%; margin-bottom: 24px; }

.family-page-heading { display: block; }
.family-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.family-actions > button { flex: 1 1 200px; width: auto; min-width: 0; margin: 0; }
#edit-family-slot:empty { display: none; }
@media (max-width: 540px) {
  .family-actions { flex-direction: column; }
  .family-actions > button { flex: auto; width: 100%; }
}

.install-app { display:flex; align-items:center; flex-wrap:wrap; gap:16px; padding:24px; margin-block:24px; border:1px solid var(--border); border-radius:24px; background:var(--surface); }
.install-app[hidden] { display:none; }
.install-app > img { width:52px; height:52px; flex-shrink:0; border-radius:14px; }
.install-app > div { flex:1 1 180px; min-width:0; }
.install-app h2 { font-size:1.1rem; margin:0 0 6px; }
.install-app p { margin:0; color:var(--ink-soft); }
.install-app > button { width:auto; flex:0 1 auto; margin:0; }
.install-dialog { width:min(480px,calc(100% - 32px)); max-height:calc(100dvh - 40px); overflow:auto; padding:28px; border:1px solid var(--border); border-radius:24px; background:var(--surface); color:var(--ink); }
.install-dialog::backdrop { background:#29213f80; }
.install-dialog > img { width:160px; max-width:100%; height:auto; }
.install-dialog h2 { margin-block:20px 16px; }
.install-dialog ol { padding-left:22px; }
.install-dialog li + li { margin-top:14px; }
.install-dialog p { margin-block:20px; color:var(--ink-soft); }
@media(max-width:540px) { .install-app { padding:20px; } .install-app > button { width:100%; } .install-dialog { padding:22px; } }

.install-entry { max-width:1180px; margin-inline:auto; padding:12px 24px 0; display:flex; justify-content:flex-end; }
.install-entry:empty, .install-entry:has(> [hidden]) { display:none; }
.install-app--compact { margin:0; padding:0; border:0; background:transparent; border-radius:0; }
.install-app--compact > button { min-height:44px; padding:10px 18px; width:auto; }
@media(max-width:540px) { .install-entry { padding:10px 16px 0; } }
