/* Requested screenshot corrections, in the user's 1–19 order. */

/* 1. A single search field; keep its icon, text and native clear affordance inside. */
body .admin-data-toolbar>label:has([data-admin-search]){display:flex;align-items:center;gap:10px;flex:0 1 360px;width:360px;max-width:100%;height:48px;min-height:48px;padding:0 14px;box-sizing:border-box}
body .admin-data-toolbar [data-admin-search]{display:block;flex:1 1 0;width:0;min-width:0;min-height:44px;height:44px;padding:8px 0!important;border:0!important;border-radius:0;background:transparent!important;box-shadow:none;font-size:14px!important;outline:none!important}
body .admin-data-toolbar>label:has([data-admin-search]):focus-within{outline:3px solid var(--miho-focus);outline-offset:3px}
body .admin-data-toolbar>label:has([data-admin-search])>.ui-icon{flex:0 0 18px;width:18px;height:18px}

/* 2, 3, 6, 9, 10, 15. One inset arrow per real native select, never two borders. */
body .product-shell select.miho-select-control{
 appearance:none!important;-webkit-appearance:none!important;box-sizing:border-box;
 min-width:0;min-height:44px;padding:10px 42px 10px 14px!important;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a9bad6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;
 background-repeat:no-repeat!important;background-position:right 14px center!important;background-size:14px 14px!important;
 font-size:14px!important;line-height:1.5!important;white-space:nowrap;max-width:100%;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;
}
html[data-theme=light] body .product-shell select.miho-select-control{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475f82' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important}
body .product-shell label.miho-select-label{display:flex;align-items:center;gap:14px;min-width:0;max-width:100%}
body .product-shell label.miho-select-label:not(.miho-select-shell){flex-wrap:wrap}
body .product-shell label.miho-select-label>select{flex:1 1 auto;min-width:0;margin:0}
body .product-shell label.miho-select-shell{min-height:48px;height:auto;padding:0 12px;box-sizing:border-box;gap:12px}
body .product-shell label.miho-select-shell>select{border:0!important;border-radius:0;background-color:transparent!important;box-shadow:none;color:inherit;outline:none!important}
body .product-shell label.miho-select-shell:focus-within{outline:3px solid var(--miho-focus);outline-offset:3px}
body .product-shell label.miho-select-label>select+.ui-icon{display:none!important}
body .miho-select-label>.ui-icon:first-child{flex:0 0 20px;width:20px;height:20px}
body .product-shell :is([data-performance-class],[data-student-group],[data-testing-grade]){min-width:160px}
body .course-hero>label.miho-select-label{flex-wrap:wrap;justify-content:flex-start;gap:14px}
body .course-hero>label.miho-select-label>[data-course-grade]{flex:0 1 250px;min-width:220px;width:250px}
body .product-shell .nx-period{width:auto;min-width:260px;max-width:100%}
body .product-shell .neon-activity header select{width:180px;min-width:150px;max-width:100%}
body .product-shell .lx-select{min-width:190px}
body .product-shell .lx-select>select{text-align:center;text-align-last:center}
body :is(.work-form,.field) label.miho-select-label{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
body .product-shell .lx-saved-filters{grid-template-columns:minmax(0,1fr) repeat(2,minmax(250px,280px))}
body .product-shell .lx-saved-filters .lx-select{min-width:0;width:100%}
body .product-shell .lx-saved-tabs{flex-wrap:wrap;gap:12px}

/* 4. Only the title grows; class actions stay flush with the right corner. */
body .reference-class-head>div:first-child{flex:1 1 320px;min-width:0}
body .reference-class-head>div:last-child{flex:0 0 auto;margin-left:auto;justify-content:flex-end;align-items:center;gap:12px}
body .reference-class-head [data-class-students]{margin:0;white-space:nowrap}

/* 5. Smooth chart paths keep their real samples; use rounded joins and tips. */
body .admin-chart-card :is(.line,.chart-main,.chart-second){stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}

/* 7. Hover/focus reveals the action; the button stays reachable while crossing to it. */
body .student-companion .miho-collapse-assistant{top:-40px;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .15s ease,visibility .15s ease .18s}
body .student-companion:is(:has(.student-companion-robot:hover),:has(.student-companion-robot:focus-visible),:has(.miho-collapse-assistant:hover),:has(.miho-collapse-assistant:focus-visible)) .miho-collapse-assistant{opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}
body .student-companion::after{content:'';position:absolute;right:0;top:-12px;width:150px;height:18px;pointer-events:none}
body .student-companion:has(.student-companion-robot:hover)::after{pointer-events:auto}
@media(hover:none){body .student-companion:focus-within .miho-collapse-assistant{opacity:1;visibility:visible;pointer-events:auto}}

/* 8. Language and theme controls each occupy their own normal-flow slot. */
body .product-top .top-actions-new{display:flex;align-items:center;gap:12px!important;isolation:isolate}
body .product-top .language-switcher{position:relative!important;inset:auto!important;transform:none!important;flex:0 0 auto;margin:0!important;order:-2}
body .product-top :is(.theme-switch,.top-icon,.language-current){position:relative!important;inset:auto!important;transform:none!important;flex-shrink:0;margin:0!important}
body .product-top .language-current{display:inline-flex!important;align-items:center;justify-content:center;gap:8px;min-width:80px;padding:8px 12px!important}
body .product-top .theme-switch{order:-1}

/* 10. Week selectors use their label's intrinsic text width, not an icon-sized box. */
body .product-shell :is(.nx-period,.neon-activity header)>select{width:auto;min-width:160px}
body .an-activity>header{display:flex;align-items:center;flex-wrap:wrap;gap:14px}
body .an-activity>header>label{flex:0 0 160px;width:160px;min-width:160px;max-width:100%;margin-left:auto}
body .an-activity>header>label>select{width:100%}

/* 11. The navigation entry is removed in both role menu definitions. */

/* 12. Text and chevron share one unbroken row. */
body .nx-direction-panel>header>a{display:inline-flex;align-items:center;justify-content:center;gap:12px;flex:0 0 auto;min-width:140px;min-height:44px;white-space:nowrap;box-sizing:border-box}
body .nx-direction-panel>header>a>.ui-icon{display:inline-flex;flex:0 0 16px;width:16px;height:16px;margin:0}

/* 13. Four achievement filters stay in a single row (scrollable on phones). */
body .student-home-shell .nx-ach-catalog>header{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
body .student-home-shell .nx-ach-filters{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:8px;max-width:100%;overflow-x:auto;padding:4px;scroll-padding:4px}
body .student-home-shell .nx-ach-filters>button{flex:0 0 auto;min-height:44px;padding:10px 14px;white-space:nowrap;text-align:center}

/* 14. Reserve the trailing arrow's own compact grid cell. */
body .student-home-shell .nx-recent-achievements>a{grid-template-columns:40px minmax(0,1fr) auto 20px;gap:10px;padding:12px}
body .student-home-shell .nx-recent-achievements>a>p{min-width:0}
body .nx-recent-achievements>a>.ui-icon:last-child{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;flex:none;width:20px;height:20px;min-width:0;padding:0;margin:0;border:0;background:none;box-shadow:none;color:var(--miho-muted)}
body .nx-recent-achievements>a>.ui-icon:last-child svg{width:18px;height:18px}

/* 16. Keep a working member-info action, with a proper bounded icon button. */
body .student-home-shell .lx-members article{grid-template-columns:44px minmax(0,1fr) 44px;gap:10px;padding:14px;min-width:0}
body .student-home-shell .lx-members article>p{min-width:0}
body .lx-members [data-member-info]{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;border:1px solid var(--miho-border);border-radius:9px;background:var(--miho-raised);font-size:18px;line-height:1}
body .lx-members [data-member-info] .ui-icon{width:20px;height:20px}

/* 17. A genuine switch: one 52x30 track and one thumb, unchanged input semantics. */
body .product-content input.lx-switch[type=checkbox]{appearance:none!important;-webkit-appearance:none!important;position:relative;width:52px!important;min-width:52px!important;height:30px!important;min-height:30px!important;box-sizing:border-box;margin:0;padding:0;border:0!important;border-radius:20px!important;background:#354963!important;box-shadow:inset 0 0 0 1px #637994;cursor:pointer;justify-self:end}
body .product-content input.lx-switch[type=checkbox]::before{content:'';position:absolute;left:4px;top:4px;width:22px;height:22px;border:0;border-radius:50%;background:#f4f7ff;box-shadow:0 2px 5px #0004;transform:translateX(0);transition:transform .18s ease}
body .product-content input.lx-switch[type=checkbox]:checked{background:#8251ef!important;box-shadow:inset 0 0 0 1px #b99dff}
body .product-content input.lx-switch[type=checkbox]:checked::before{transform:translateX(22px)}
body .lx-setting-row{grid-template-columns:44px minmax(0,1fr) 52px;gap:14px;padding:14px}
/* Retained dark artwork must not inherit light-theme ink; settings surfaces use tokens. */
html[data-theme=light] body .student-home-shell .lx-settings :is(.lx-panel,.lx-setting-row,.lx-quick-settings>button,.lx-settings-tabs>button:not(.active)){background:var(--miho-surface);border-color:var(--miho-border);color:var(--miho-text)}
html[data-theme=light] body .student-home-shell .lx-setting-row strong{color:var(--miho-text)}
html[data-theme=light] body .student-home-shell .lx-settings .lx-panel :is(h2,h3){color:var(--miho-text)!important}
html[data-theme=light] body .student-home-shell .lx-settings .lx-settings-hero{--miho-text:#f4f7fc;--miho-muted:#c9d5eb}
html[data-theme=light] body .student-home-shell .lx-settings .lx-settings-hero h1{color:#f4f7fc!important}
html[data-theme=light] body .student-home-shell .lx-settings .lx-mini-app{color:#f4f7fc}

/* 18. Class progress arrows fit inside the row, not its neighbour's panel. */
body .teacher-ref-class-list>a{display:grid;grid-template-columns:40px minmax(100px,1fr) minmax(50px,80px) 42px 24px;align-items:center;gap:10px;padding:12px;min-width:0}
body .teacher-ref-class-list>a>div{min-width:0}
body .teacher-ref-class-list>a>progress{width:100%;min-width:0}
body .teacher-ref-class-list>a>.ui-icon:last-child{box-sizing:border-box!important;width:20px!important;height:20px!important;min-width:0;margin:0;padding:1px!important;border-radius:6px}
body .teacher-ref-class-list>a>.ui-icon:last-child svg{width:18px;height:18px}

/* 19. Table actions have a real inset and their own complete column. */
body :is(.entity-table,.student-table,.reference-class-table) :is(.row-actions,.table-actions){padding:8px 14px;display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0}
body .reference-table-row:has([data-remove-member]){grid-template-columns:30px minmax(190px,1.3fr) 105px minmax(150px,1fr) 135px 130px 56px;padding-right:14px}
body .reference-table-row>[data-remove-member]{justify-self:center;margin:0;width:44px;height:44px;padding:10px}
body .admin-shell :is(.admin-table-heading,.admin-users-table>article){grid-template-columns:minmax(220px,1fr) 148px minmax(280px,1.2fr) 184px 112px 176px;min-width:1252px}
body .admin-shell .admin-row-actions{padding-right:16px;box-sizing:border-box}
body .admin-shell .admin-table-heading>:last-child{padding-right:16px}
body .entity-table>article>div:last-child{display:flex;align-items:center;gap:10px;padding:10px 16px;flex:0 0 auto}
body .member-list>div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px}
body .member-list [data-remove-student]{flex:0 0 44px;width:44px;height:44px;margin:0;padding:10px}
body table td:last-child:has(button){padding:12px 16px;white-space:nowrap}

@media(max-width:1000px){body .admin-data-toolbar>label:has([data-admin-search]){flex:0 0 auto;width:100%}}
@media(max-width:800px){body .product-shell .lx-saved-filters{grid-template-columns:minmax(0,1fr)}body .product-shell .lx-saved-filters>label{grid-column:auto!important}}
@media(max-width:720px){body .reference-class-head>div:first-child{flex:0 0 auto;width:100%}}
@media(max-width:600px){
 body .product-top .top-actions-new{gap:8px!important}
 body .product-top .language-current{min-width:52px;padding:8px!important}
 body .reference-class-head>div:first-child{flex:0 0 auto;width:100%}
 body .reference-class-head>div:last-child{flex:0 0 auto;max-width:100%;flex-wrap:wrap}
 body .lx-setting-row{grid-template-columns:36px minmax(0,1fr) 52px;gap:10px;padding:12px}
 body .student-home-shell .nx-recent-achievements>a{grid-template-columns:36px minmax(0,1fr) auto 18px;gap:8px;padding:10px}
 body .teacher-ref-class-list>a{grid-template-columns:36px minmax(0,1fr) 40px 20px;gap:8px;padding:10px}
 body .teacher-ref-class-list>a>progress{grid-column:2;grid-row:2}
 body .teacher-ref-class-list>a>b{grid-column:3;grid-row:1/3}
 body .teacher-ref-class-list>a>.ui-icon:last-child{grid-column:4;grid-row:1/3;width:20px;height:20px;padding:1px}
 body .product-shell .lx-select,body .product-shell .nx-period{min-width:0;width:100%}
}
