/* Shared group spacing and controls, including the embedded mobile cabinet. */
:root{--group-gap:22px}
.main:has(.group-editor)>.child-heading{margin-bottom:var(--group-gap)}
.main:has(.group-editor)>.apps-toolbar{padding:0;margin:0 0 var(--group-gap)}
.main:has(.group-editor)>.apps-toolbar:empty{display:none}
.group-editor .group-editor-body{display:flex;flex-direction:column;gap:var(--group-gap);min-width:0}
.group-editor .group-editor-body>.tabs,.group-editor .group-editor-body>.apps-toolbar,.group-editor .group-editor-body>.category-cards{margin:0;padding:0}
.group-editor .category-cards{gap:var(--group-gap)}
.group-editor-body>h2{margin:0}
.app-selection .group-chips{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;touch-action:pan-x pan-y;cursor:grab;user-select:none}
.app-selection .group-chips.dragging{cursor:grabbing}
.app-selection .group-chip{flex:0 0 auto;white-space:nowrap;max-width:none;overflow-wrap:normal}
.app-selection .group-app-row{touch-action:pan-y;-webkit-touch-callout:none;user-select:none}
.app-selection .group-app-row[aria-checked=true]{background:var(--light)}
.app-selection .group-app-row:focus-visible{outline:2px solid var(--green);outline-offset:-3px}
.app-selection .selection-footer{top:8px;bottom:auto;flex-wrap:wrap;background:var(--surface,#fff);z-index:3}
.app-selection .selection-footer>.button{width:auto;margin-left:auto}
.app-selection .selection-footer>.text-button{padding:10px}
.mobile-cabinet .group-editor-body>.tabs{margin:0}
.mobile-cabinet .group-editor[data-tab=apps]>.group-editor-body>h2{display:none}
.sticky-detail-heading{position:sticky;top:0;z-index:7;background:var(--bg,#fff);padding:12px 0;margin:0 0 22px!important;border-bottom:1px solid var(--line)}
.mobile-cabinet .sticky-detail-heading{background:var(--mobile-bg)}
.sticky-detail-heading .child-heading-row,.device-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sticky-detail-heading .child-name{flex:1;min-width:110px}
.sticky-detail-heading h1{margin:0}
.sticky-detail-heading .child-heading-actions{display:flex;gap:6px;margin-left:auto}
.icon-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.icon-button svg{display:block;width:24px;height:24px;flex:none}
.group-editor .tabs .tab{font-size:16px;line-height:1.4;min-height:46px}
.group-editor .apps-toolbar{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px}
.group-editor .apps-toolbar h2{margin:0}
.header-save-status:empty,.header-save-status[hidden]{display:none}
.header-save-status{margin:6px 0 0}
.dismissible-notice{display:flex;align-items:center;justify-content:space-between;gap:16px}
.dismissible-notice .icon-button{width:28px;height:28px;margin:-6px -8px -6px 0;padding:4px;border:0;background:transparent;color:inherit;border-radius:8px;flex:none}
.dismissible-notice .icon-button:hover{opacity:.65}
.dismissible-notice .icon-button svg{width:18px;height:18px}
.editor-actions{display:flex;justify-content:flex-end}
.time-choice{display:flex;align-items:center;justify-content:center;gap:10px}
.time-choice label{display:flex;flex-direction:column;gap:4px;font-size:12px;min-width:80px}
.time-choice select{min-height:48px;font-size:20px;text-align:center}
.time-choice .styled-select{min-width:80px}
.time-choice .select-trigger{font-size:20px;min-height:48px}
.schedule-days .schedule-day{display:flex;align-items:center;justify-content:space-between;gap:12px}
.schedule-day>strong{font-size:14px}
.device-quick-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 18px}
.device-quick-actions .button{margin:0;min-height:48px;white-space:normal}
.device-quick-actions [role=status]{grid-column:1/-1}
.policy-awaiting{background-image:repeating-linear-gradient(120deg,transparent 0,transparent 13px,color-mix(in srgb,currentColor 22%,transparent) 13px,color-mix(in srgb,currentColor 22%,transparent) 26px)!important;background-size:52px 52px!important;animation:policy-stripes .8s linear infinite!important}
@keyframes policy-stripes{to{background-position:52px 0}}
@media(prefers-reduced-motion:reduce){.policy-awaiting{animation:none!important}}
.sound-actions{display:grid;gap:10px}
.diagnostic-dialog{border:1px solid var(--line);border-radius:18px;padding:28px;width:min(820px,calc(100vw - 28px));max-height:90vh;overflow:auto;color:inherit}.diagnostic-dialog::backdrop{background:#0a173e66}.diagnostic-dialog>input{width:100%;margin:8px 0 16px}.diagnostic-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}.diagnostic-grid div{background:var(--light);padding:10px;border-radius:10px;min-width:0}.diagnostic-grid dt{font-size:12px;color:var(--muted)}.diagnostic-grid dd{margin:4px 0 0;overflow-wrap:anywhere}.diagnostic-packages{overflow:auto}.diagnostic-table{width:100%;border-collapse:collapse;font-size:13px}.diagnostic-table th,.diagnostic-table td{text-align:left;padding:8px;border-bottom:1px solid var(--line);white-space:nowrap}
@media(max-width:600px){.device-quick-actions{grid-template-columns:1fr}.diagnostic-dialog{padding:18px}.diagnostic-grid{grid-template-columns:1fr}}
.diagnostic-dialog>.dialog-actions{flex-wrap:wrap;justify-content:flex-start}
.diagnostic-dialog .dialog-actions>button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.diagnostic-dialog>.diagnostic-recovery-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.diagnostic-recovery-actions>button{text-align:left}
@media(max-width:600px){.diagnostic-dialog>.diagnostic-recovery-actions{grid-template-columns:minmax(0,1fr)}}
@media(max-width:380px){.sticky-detail-heading .child-heading-actions{flex-basis:100%;justify-content:flex-end}.schedule-days .schedule-day{flex-wrap:wrap}.time-choice{gap:6px}}

/* Shared family and feedback revision. */
:root{--page-background:#f6f8fc}
:root[data-theme=dark]{--page-background:#0c1424}
.sticky-detail-heading{background:var(--page-background);color:inherit;border-bottom:1px solid var(--line)}
.mobile-cabinet .sticky-detail-heading{background:var(--mobile-bg)}
.group-editor .groups-title{justify-content:flex-start;gap:4px}
.inline-icon{background:transparent!important;border:0!important;box-shadow:none!important;width:40px;height:40px;padding:10px;color:var(--link,var(--green))}
.inline-icon svg{width:20px;height:20px}
.group-name-row,.group-heading-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.group-name-row h2{margin:0}.group-detail-heading{display:flex;flex-direction:column;gap:14px}
.icon-action{display:inline-flex;align-items:center;justify-content:center;gap:8px}.icon-action svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.week-summary{display:flex;flex-wrap:wrap;gap:10px 16px;margin:12px 0}.week-summary-day{display:flex;align-items:center;gap:7px}.weekday-badge{display:inline-grid;place-items:center;width:36px;height:36px;flex:none;border-radius:11px;background:var(--light);color:var(--link,var(--green));font-size:14px;font-weight:600;letter-spacing:0;text-transform:none;font-variant:normal}.week-time{font-variant-numeric:tabular-nums;white-space:nowrap}
.device-controls>.dialog-actions{justify-content:flex-start;flex-wrap:wrap;margin:16px 0}.device-settings-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:18px 0}.device-settings-tiles>.panel{margin:0;min-width:0}.device-status-container{margin-top:22px}
.family-tree .tree-child{font-size:17px;font-weight:700}.family-tree .tree-device{font-size:13px;margin-left:16px;width:calc(100% - 16px)}
.app-selection .selection-footer{position:sticky;top:var(--detail-header-height,0px);z-index:6;margin:0 0 12px;background:var(--surface,#fff)}
dialog .app-selection .selection-footer{top:0}.app-selection .selection-footer[hidden]{display:none}.app-selection{overflow:visible}.groups-app-panel .group-app-row:last-child{border-bottom:0}.groups-app-panel .group-apps{border-radius:inherit}.category-card{overflow:hidden}
.child-delivery{border-top:0}.device-info-tile{border:1px solid var(--line);border-radius:14px;background:var(--light);color:var(--muted);padding:15px;margin:12px 0;line-height:1.6}
.usage-bars-scroll{overflow-x:auto}.usage-bars.month-bars{min-width:850px}.usage-bars.month-bars .bar-value{font-size:10px}
.parent-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.parent-card,.tree-parent{display:flex;flex-direction:column;align-items:flex-start;gap:6px;text-align:left;color:inherit;cursor:pointer}.parent-card{width:100%;padding:22px;background:var(--surface,#fff);border:1px solid var(--line)}.tree-parent{width:100%;padding:12px;border:0;border-radius:12px;background:transparent;overflow-wrap:anywhere}.tree-parent:hover{background:var(--light)}.adult-tree{margin:10px 0}.account-panel{margin:20px 0}.account-panel label{display:block;margin:12px 0}.account-panel input{display:block;max-width:440px;width:100%;margin-top:8px}.family-adults{margin-bottom:24px}.sidebar .feedback-link{justify-content:flex-start;width:100%;font-size:13px;margin-bottom:14px}.sidebar>.nav-item{justify-content:flex-start}
.owner-parent-card{cursor:default;gap:16px;min-width:0;grid-column:1/-1}.owner-parent-profile{display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:100%;padding:0;border:0;background:none;color:inherit;text-align:left;cursor:pointer;font:inherit}.owner-parent-profile strong{font-size:18px}.owner-parent-profile:hover strong{text-decoration:underline}.owner-children{width:100%;border-top:1px solid var(--line);padding-top:14px}.owner-children h3{font-size:15px;margin:0 0 10px}.owner-child-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--line)}.owner-child-row:first-of-type{border-top:0}.owner-child-name{border:0;background:none;color:inherit;font:inherit;font-weight:700;text-align:left;cursor:pointer;min-width:0;overflow-wrap:anywhere}.owner-child-name:hover{text-decoration:underline}.owner-child-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.owner-child-invite{font-size:13px;padding:9px 12px}.owner-child-actions .child-delete-icon{margin-left:0}
.feedback-dialog{width:640px;max-width:calc(100vw - 28px);max-height:calc(100dvh - 32px);overflow:auto}.feedback-dialog textarea{width:100%;padding:14px;resize:vertical;font:inherit;box-sizing:border-box;background:var(--field,#fff);color:inherit;border:1px solid var(--line);border-radius:12px}.feedback-dialog input[type=file]{max-width:100%;font-size:13px}.feedback-dialog,.image-dialog{padding:24px;border:1px solid var(--line);border-radius:20px;background:var(--surface,#fff);color:inherit}.attachment-previews,.feedback-images{display:flex;gap:12px;flex-wrap:wrap;margin-top:16px}.attachment-preview{width:150px}.attachment-preview img,.attachment-open img{width:150px;height:110px;object-fit:contain}.attachment-open{padding:4px;background:var(--light);border:1px solid var(--line);border-radius:12px}.image-dialog{max-width:95vw;max-height:95dvh}.image-dialog>img{display:block;max-width:100%;height:auto}.image-dialog>.icon-button{position:sticky;top:0;background:var(--surface,#fff)}.feedback-card{margin:20px 0}.feedback-heading{display:flex;gap:15px;align-items:center;flex-wrap:wrap}.feedback-heading strong{overflow-wrap:anywhere}.feedback-message{white-space:pre-wrap;overflow-wrap:anywhere}.feedback-heading time{font-size:12px;color:var(--muted)}
@media(max-width:650px){.device-settings-tiles{grid-template-columns:1fr}.group-heading-actions>.button{flex:1}.parent-grid{grid-template-columns:1fr}.week-summary{gap:8px}.week-summary-day{gap:4px}.weekday-badge{width:31px;height:31px}.week-time{font-size:13px}}
@media(max-width:500px){.owner-child-row{align-items:flex-start;flex-direction:column}.owner-child-actions{width:100%}.owner-child-invite{flex:1}}

@media(min-width:851px){.sidebar{overflow-y:auto;max-height:100dvh}.sidebar>*{flex-shrink:0}}

/* Search gets its own row; select labels must not squeeze into vertical text. */
.app-selection .group-toolbar{align-items:center}
.app-selection .group-toolbar>input[type=search]{flex:1 0 100%;width:100%;min-width:0;min-height:48px;height:48px}
.app-selection .group-toolbar>.styled-select{flex:1 1 180px;min-width:min(180px,100%);width:auto}
.app-selection .group-toolbar .select-trigger{white-space:nowrap;overflow-wrap:normal;word-break:normal;min-height:44px}
.app-selection .group-toolbar>.exact-search,.app-selection .group-toolbar>.text-button{flex:0 0 auto;width:auto;min-width:0;white-space:nowrap}
.app-selection .group-toolbar>.mobile-app-filters{flex:1 0 100%;width:100%;min-width:0}

.mobile-cabinet .app-picker .group-chips{margin-left:0;margin-right:0;padding-left:0;padding-right:0;max-width:100%}
.account-panel{padding:24px;max-width:760px}
.account-panel h1,.account-panel h2{margin:0 0 16px;line-height:1.3}
.account-panel h1{font-size:28px}
.account-panel h2{font-size:21px}
.account-panel p{line-height:1.6;overflow-wrap:anywhere}
.account-panel label{margin:16px 0}
.account-panel input{min-height:46px}
.account-panel .button{margin-top:4px}
@media(max-width:600px){.account-panel{padding:20px 16px;margin:16px 0}.account-panel h1{font-size:24px}.account-panel input{max-width:none}.account-panel .button{max-width:100%;white-space:normal}}

.feedback-card{padding:24px}
.feedback-heading{align-items:center}
.feedback-heading>.styled-select{flex:0 1 200px;min-width:170px}
.account-panel [role=status]:empty,.feedback-card [role=status]:empty{display:none}
@media(max-width:600px){.feedback-card{padding:20px 16px}.feedback-heading{gap:12px}.feedback-heading>.styled-select{flex-basis:100%;width:100%}}
.sidebar{scrollbar-width:thin;scrollbar-color:var(--line) transparent;scrollbar-gutter:stable}
.sidebar:hover{scrollbar-color:var(--muted) transparent}
.sidebar::-webkit-scrollbar{width:6px}
.sidebar::-webkit-scrollbar-track{background:transparent}
.sidebar::-webkit-scrollbar-thumb{background:var(--line);border-radius:6px}
.sidebar::-webkit-scrollbar-thumb:hover{background:var(--muted)}
.sidebar::-webkit-scrollbar-button{display:none;width:0;height:0}

.sidebar-frame{display:contents}
.sidebar-resizer{display:none}
@media(min-width:851px){
 .cabinet-shell{grid-template-columns:var(--sidebar-width,258px) minmax(0,1fr)}
 .sidebar-frame{display:block;position:sticky;top:0;min-width:0;height:100dvh}
 .sidebar-resizer{display:block;position:absolute;top:0;bottom:0;right:-4px;width:8px;z-index:8;cursor:col-resize;touch-action:none}
 .sidebar-resizer::after{content:'';position:absolute;top:0;bottom:0;left:3px;width:2px;border-radius:2px;background:transparent;transition:background .15s}
 .sidebar-resizer:hover::after,.sidebar-resizer:focus-visible::after,.sidebar-resizing .sidebar-resizer::after{background:var(--link,var(--green))}
 .sidebar-resizer:focus-visible{outline:2px solid var(--link,var(--green));outline-offset:1px}
 .sidebar-resizing,.sidebar-resizing *{cursor:col-resize!important;user-select:none!important}
}
@media(min-width:851px) and (max-width:1150px){.cabinet-shell{grid-template-columns:var(--sidebar-width,215px) minmax(0,1fr)}}
.mobile-cabinet .sidebar-frame{display:contents}.mobile-cabinet .sidebar-resizer{display:none}

.family-adults>h2,.family-children-title{font-size:21px;line-height:1.4;margin:0 0 16px}
.account-panel .account-notification{display:flex;align-items:flex-start;gap:12px;cursor:pointer}.account-panel .account-notification input[type=checkbox]{flex:0 0 auto;width:20px;height:20px;margin:2px 0 0;padding:0;accent-color:var(--blue)}.account-notification span{min-width:0}

.service-clients,.service-feedback-section{margin:24px 0 36px}.service-section-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:14px}.service-section-heading h2,.service-section-heading p{margin-bottom:0}.service-client-table-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:14px;background:var(--surface,#fff)}.service-client-table{width:100%;border-collapse:collapse;min-width:760px}.service-client-table th,.service-client-table td{padding:14px 16px;text-align:left;border-bottom:1px solid var(--line);vertical-align:middle}.service-client-table th{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);background:var(--light)}.service-client-table tbody tr{cursor:pointer;transition:background .15s}.service-client-table tbody tr:hover,.service-client-table tbody tr:focus-visible{background:var(--light);outline:0}.service-client-table tbody tr:last-child td{border-bottom:0}.client-verification{display:inline-block;font-size:12px;font-weight:650}.client-verification.verified{color:var(--green)}.client-verification.unverified{color:#9a5c25}.service-client-dialog{width:620px;max-width:calc(100vw - 28px);max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border:1px solid var(--line);border-radius:20px;background:var(--surface,#fff);color:inherit}.service-client-dialog::backdrop{background:#07133e66}.service-client-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.service-client-dialog-heading h2{margin-bottom:0}.service-client-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:22px 0 0}.service-client-details>div{padding:15px 0;border-top:1px solid var(--line);min-width:0}.service-client-details>div:nth-child(odd){padding-right:20px}.service-client-details dt{font-size:12px;color:var(--muted);margin-bottom:7px}.service-client-details dd{margin:0;font-weight:600;overflow-wrap:anywhere}@media(max-width:600px){.service-client-details{grid-template-columns:1fr}.service-client-details>div:nth-child(odd){padding-right:0}.service-section-heading{align-items:flex-start;flex-direction:column}.service-client-dialog{padding:20px}}

.service-tariffs{margin:24px 0 36px}.billing-negative{color:#b42318!important;font-weight:700}.billing-positive{color:var(--green);font-weight:700}.billing-client-dialog{width:760px}.billing-client-section{margin-top:26px}.billing-client-section h3{margin:24px 0 12px}.billing-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:0}.billing-summary>div{padding:14px 0;border-top:1px solid var(--line)}.billing-summary>div:nth-child(odd){padding-right:20px}.billing-summary dt{font-size:12px;color:var(--muted);margin-bottom:6px}.billing-summary dd{margin:0;font-weight:650}.billing-control,.billing-payment{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;margin-top:16px;align-items:end}.billing-payment{grid-template-columns:minmax(120px,.55fr) minmax(180px,1fr) auto}.billing-control select,.billing-payment input,.tariff-form input{width:100%;min-height:44px}.billing-ledger-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:12px}.billing-ledger{width:100%;min-width:570px;border-collapse:collapse}.billing-ledger th,.billing-ledger td{padding:11px 13px;text-align:left;border-bottom:1px solid var(--line)}.billing-ledger th{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}.billing-ledger tr:last-child td{border-bottom:0}.tariff-dialog{width:580px}.tariff-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:22px}.tariff-form label{display:grid;gap:7px;font-size:13px;font-weight:650}.tariff-form label:first-child,.tariff-form .tariff-active,.tariff-form [role=status],.tariff-form .button{grid-column:1/-1}.tariff-active{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center}.tariff-active input{width:18px;min-height:18px}.tariff-form [role=status]:empty,.billing-client-section [role=status]:empty{display:none}@media(max-width:600px){.billing-summary,.tariff-form{grid-template-columns:1fr}.billing-summary>div:nth-child(odd){padding-right:0}.billing-control,.billing-payment{grid-template-columns:1fr}.tariff-form label:first-child,.tariff-form .tariff-active,.tariff-form [role=status],.tariff-form .button{grid-column:auto}}
