/* Shared desktop and mobile workspace. Retain the existing visual theme. */
.shared-status { min-height:28px; flex-shrink:0; padding:5px 20px; background:#f3ecf9; color:#6b3fa0; font-size:12px; display:flex; gap:12px; align-items:center; flex-wrap:wrap; border-bottom:1px solid #e4d9ef; }
.shared-status.has-error { background:#fff1ef; color:#b42318; }
.shared-update { border:0; background:transparent; color:inherit; text-decoration:underline; cursor:pointer; font:inherit; padding:0; }
.shared-login-note { font-size:12px; line-height:1.7; color:var(--text-secondary); margin:20px 0 0; }
.shared-login { width:440px; max-width:calc(100vw - 32px); }
.shared-role-guide { padding:16px 4px; font-size:13px; line-height:1.7; }
.mobile-menu-button,.mobile-sidebar-mask { display:none; }
.app-header { flex-shrink:0; }
.app-header .global-search { max-width:240px; }
.app-main-shell { min-height:0; overflow:hidden; }
.app-main-content { min-width:0; }
.app-sidebar { flex-shrink:0; }
.toolbar { flex-wrap:wrap; gap:10px; }
.el-table { max-width:100%; }
.el-table__body-wrapper { overflow-x:auto; }
.shared-readonly { display:block; padding:6px 12px; color:#7c6b96; background:#f8f5fc; font-size:12px; }
@media (max-width:1024px) {
  .app-header { padding:0 12px; }
  .app-logo { font-size:16px; letter-spacing:0; }
  .app-header .global-search { display:none; }
  .app-header-right { gap:10px; }
  .page-content { padding:16px; }
  .el-col-6 { max-width:50%; flex-basis:50%; }
}
@media (max-width:767px) {
  html,body,#app { width:100%; overflow-x:hidden; }
  .app-header { height:56px; gap:8px; }
  .app-logo { font-size:14px; white-space:nowrap; }
  .app-logo .logo-mark { width:27px; height:27px; margin-right:6px; }
  .mobile-menu-button { display:inline-flex; align-items:center; justify-content:center; min-width:40px; min-height:40px; border:0; border-radius:6px; background:rgba(255,255,255,.14); color:#fff; font-size:21px; cursor:pointer; }
  .app-header-right { gap:8px; }
  .app-sidebar { position:fixed; left:0; top:56px; bottom:0; z-index:2101; width:240px!important; max-width:80vw; transform:translateX(-100%); transition:transform .18s ease; box-shadow:4px 0 16px #0002; }
  .app-sidebar.mobile-open { transform:translateX(0); }
  .mobile-sidebar-mask { display:block; position:fixed; inset:56px 0 0; z-index:2100; background:#0005; border:0; }
  .shared-status { padding:5px 12px; font-size:11px; }
  .page-content { padding:12px; }
  .page-header { align-items:flex-start; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
  .page-title { font-size:21px; }
  .page-subtitle { line-height:1.6; font-size:12px; }
  .card-block { padding:12px!important; min-width:0; }
  .el-row { row-gap:12px; }
  .el-row > .el-col-4,.el-row > .el-col-12,.el-row > .el-col-16,.el-row > .el-col-8,.el-row > .el-col-18,.el-row > .el-col-10,.el-row > .el-col-14,.el-row > .el-col-20 { max-width:100%; flex-basis:100%; }
  .el-row > .el-col-6 { max-width:50%; flex-basis:50%; }
  .toolbar { align-items:stretch; gap:8px; }
  .toolbar .el-input,.toolbar .el-select { max-width:100%; }
  .toolbar .search { width:100%!important; }
  .el-dialog { width:calc(100vw - 24px)!important; max-width:calc(100vw - 24px); margin:5vh auto!important; }
  .el-dialog__body { max-height:72vh; overflow:auto; padding:12px 0; }
  .el-message-box { width:calc(100vw - 32px); max-width:420px; }
  .el-form--inline .el-form-item { display:flex; margin-right:0; }
  .el-form-item__content { min-width:0; }
  .el-input,.el-select,.el-date-editor { max-width:100%; }
  .el-button { min-height:36px; }
  .el-button+.el-button { margin-left:6px; }
  .el-tabs__nav-scroll { overflow-x:auto; }
  .el-tabs__nav { white-space:nowrap; }
  .el-steps { overflow-x:auto; }
  .el-step { min-width:105px; }
  .el-descriptions__body { overflow-x:auto; }
  .el-calendar__body { padding:8px 0; }
  .el-calendar-table .el-calendar-day { height:78px; padding:4px; }
  .el-calendar__header { padding:10px 0; flex-wrap:wrap; gap:10px; }
  .el-pagination { flex-wrap:wrap; justify-content:flex-start; gap:8px; }
  .ai-panel { width:calc(100vw - 24px)!important; right:12px!important; bottom:70px; max-height:70vh; }
  .ai-fab { right:16px; bottom:16px; }
  .login-page { padding:24px 0; min-height:100dvh; height:auto; }
  .login-card { padding:28px 22px!important; }
  .hc-month-grid,.hc-day-list { min-width:0; }
  .notif-popper { max-width:calc(100vw - 24px)!important; }
}
@media (max-width:380px) { .app-logo { font-size:12px; } .app-header-right .el-avatar { display:none; } }
.shared-search-trigger { display:flex; align-items:center; gap:8px; color:white; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.25); padding:8px 12px; border-radius:6px; cursor:pointer; }
.shared-search-results { min-height:90px; margin-top:16px; max-height:50vh; overflow:auto; }
.shared-search-result { display:flex; align-items:center; gap:12px; width:100%; border:0; border-bottom:1px solid #ebeef5; text-align:left; background:white; padding:14px 8px; cursor:pointer; color:#303133; }
.shared-search-result:hover { background:#f5f3fa; }
.shared-search-result div { flex:1; min-width:0; overflow-wrap:anywhere; }
.shared-search-result small { display:block; color:#909399; margin-top:5px; }
@media(max-width:767px) { .shared-search-trigger { padding:9px; } .shared-search-trigger > span { display:none; } }
.recognition-form { margin-top:16px; }
.recognition-evidence { display:block; color:#7a7189; line-height:1.6; max-height:64px; overflow:auto; overflow-wrap:anywhere; margin-top:6px; }
.recognition-plan { background:#f5f3fa; padding:12px; border-radius:6px; margin:14px 0; line-height:1.8; }
.property-item { padding:16px; margin:12px 0; border:1px solid #e5deed; border-radius:8px; background:#faf9fc; }
@media(max-width:767px) {
  .case-docs > .el-row > .el-col { max-width:100%; flex-basis:100%; }
  .case-docs .section-title { flex-wrap:wrap; gap:10px; }
  .case-docs .section-title > div { display:flex; flex-wrap:wrap; gap:6px; }
  .case-docs .el-form-item { display:block; }
  .case-docs .el-form-item__label { width:auto!important; }
}


@media(max-width:767px) {
  .hc-stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .hc-stat { padding:12px; gap:8px; min-width:0; align-items:flex-start; }
  .hc-stat-icon { width:30px; height:30px; flex-basis:30px; font-size:17px; border-radius:8px; }
  .hc-stat > div:last-child { min-width:0; }
  .hc-stat-num { font-size:24px; }
  .hc-stat-label { color:#606266; line-height:1.5; overflow-wrap:anywhere; }
}

/* Keep long first-registration forms reachable on every screen. */
.login-page { min-height:100dvh; height:auto; padding:28px 0; box-sizing:border-box; }
.shared-login .el-form-item { margin-bottom:16px; }

.auth-links { display:flex; justify-content:space-between; gap:24px; margin-top:24px; font-size:14px; }
.auth-links a { color:var(--primary); text-decoration:none; }
.auth-links a:hover { text-decoration:underline; }
.auth-links a:focus-visible { outline:2px solid var(--primary); outline-offset:4px; }
.auth-error { color:var(--el-color-danger,#b42318); font-size:14px; }
.app-header .header-logout { flex-shrink:0; margin-left:0; color:#fff; background:transparent; border-color:rgba(255,255,255,.5); }
.app-header .header-logout:hover { color:#fff; background:rgba(255,255,255,.12); border-color:#fff; }
.app-header .header-logout:focus-visible { outline:2px solid #fff; outline-offset:3px; }
@media (max-width:600px) { .app-header .header-logout { padding:8px; font-size:12px; } }
.sidebar-account { padding:20px 18px 16px; border-bottom:1px solid var(--border); }
.sidebar-profile { display:flex; align-items:center; gap:10px; width:100%; padding:0; border:0; background:transparent; color:var(--primary-dark); font:inherit; text-align:left; cursor:pointer; }
.sidebar-profile:hover .sidebar-lawyer-name { text-decoration:underline; text-underline-offset:4px; }
.sidebar-profile:focus-visible { outline:2px solid var(--primary); outline-offset:5px; border-radius:4px; }
.sidebar-profile .sidebar-avatar { flex-shrink:0; background:var(--primary-pale); color:var(--primary-dark); font-weight:600; }
.sidebar-lawyer-name { min-width:0; font-size:16px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
.sidebar-motivation { margin:14px 0 0; color:var(--text-secondary); font-size:12px; line-height:1.8; overflow-wrap:anywhere; }
