:root{
  --aiyu-primary:#1677ff;
  --aiyu-primary-soft:#eaf3ff;
  --aiyu-bg:#f4f6f8;
  --aiyu-panel:#fff;
  --aiyu-text:#1f2329;
  --aiyu-muted:#667085;
  --aiyu-line:#e5e7eb;
  --aiyu-radius:10px;
}
*{box-sizing:border-box}
html,body,#root{min-width:0!important;max-width:100%;overflow-x:hidden}
body{background:var(--aiyu-bg)!important;color:var(--aiyu-text)!important}
.ant-layout,.ant-layout-content,.ant-pro-layout,.ant-pro-basicLayout,.ant-pro-grid-content,
.ant-pro-page-container,.ant-pro-page-container-children-content{min-width:0!important;max-width:100%!important}
.ant-card,.ant-pro-card,.ant-modal,.ant-drawer,.ant-form{max-width:100%}
.ant-table-wrapper,.ant-table-container,.ant-table-content{max-width:100%;-webkit-overflow-scrolling:touch}
.ant-tabs-nav-wrap{overflow-x:auto!important}
.ant-btn,.ant-input,.ant-picker,.ant-select-selector{border-radius:6px!important}
.ant-btn:focus-visible,.ant-input:focus-visible,a:focus-visible{outline:2px solid var(--aiyu-primary)!important;outline-offset:2px}
.ant-pro-sider-logo img,.ant-pro-global-header-logo img{border-radius:10px!important;object-fit:cover!important}
#root>.w-screen.h-screen>div.flex>div.flex>.text-2xl::before{
  content:"";display:inline-block;width:42px;height:42px;margin:0 12px -12px 0;border-radius:11px;
  background:url("/aiyu-brand-icon.png?v=20260810-admin-brand-v1") center/cover no-repeat;
  box-shadow:0 7px 18px rgba(15,23,42,.14);
}
#root>.w-screen.h-screen>div.flex>div.flex>.text-2xl::after{
  content:"LiaoWang Operations Console";display:block;margin:10px 0 0;color:var(--aiyu-muted);font-size:13px;font-weight:500;letter-spacing:.02em;
}

/* The browser's "desktop site" mode can report a desktop viewport on a phone.
   Use the measured Admin content width (set by admin-mobile.js) so existing
   management tables and query forms remain complete instead of overflowing. */
html.aiyu-compact-admin .ant-table-content{overflow-x:auto!important}
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"]{
  display:table!important;width:100%!important;min-width:max(100%,calc(var(--aiyu-table-columns,7) * 92px))!important;
  table-layout:fixed!important;border-collapse:collapse!important;background:#fff!important;font-size:11px!important;line-height:1.35!important;
}
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"] col{width:auto!important;min-width:0!important}
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"]>thead{display:table-header-group!important}
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"]>thead>tr{display:table-row!important}
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"]>thead>tr>th{
  position:sticky!important;top:0;z-index:2;display:table-cell!important;padding:6px 5px!important;
  background:#f8fafc!important;font-size:11px!important;line-height:1.3!important;white-space:normal!important;
  text-align:left!important;overflow-wrap:anywhere!important;word-break:break-word!important;
}
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"]>tbody{display:table-row-group!important}
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"]>tbody>tr{display:table-row!important;background:#fff!important}
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"]>tbody>tr:nth-child(even){background:#fafbfc!important}
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"]>tbody>tr>td{
  position:static!important;display:table-cell!important;width:auto!important;min-width:0!important;max-width:none!important;
  padding:6px 5px!important;border:0!important;border-bottom:1px solid var(--aiyu-line)!important;
  background:transparent!important;vertical-align:middle!important;white-space:normal!important;text-align:left!important;
  overflow-wrap:anywhere!important;word-break:break-word!important;
}
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"]>tbody>tr>td[data-aiyu-label]::before{content:none!important}
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"]>tbody>tr>td[colspan]{display:table-cell!important;text-align:center!important}
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"] .ant-table-cell-fix-left,
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"] .ant-table-cell-fix-right{position:static!important;box-shadow:none!important}
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"] .ant-table-selection-column{display:table-cell!important;padding:6px 4px!important}
html.aiyu-compact-admin table[data-aiyu-mobile-table="true"] .ant-space{gap:4px!important;justify-content:flex-start!important}
html.aiyu-compact-admin .ant-pro-table-search .ant-col,
html.aiyu-compact-admin .ant-pro-form-query-filter .ant-col{flex:0 0 100%!important;max-width:100%!important}
html.aiyu-compact-admin .ant-page-header-heading,
html.aiyu-compact-admin .ant-page-header-heading-left,
html.aiyu-compact-admin .ant-space{max-width:100%;flex-wrap:wrap!important}

@media(max-width:768px){
  html{font-size:15px;-webkit-text-size-adjust:100%}
  body{padding-bottom:env(safe-area-inset-bottom)}
  .ant-pro-global-header,.ant-layout-header{
    position:fixed!important;top:0!important;left:0!important;right:0!important;z-index:90!important;height:56px!important;line-height:56px!important;
    padding:0 max(10px,env(safe-area-inset-left))!important;
    background:rgba(255,255,255,.96)!important;backdrop-filter:blur(12px);
    border-bottom:1px solid var(--aiyu-line);box-shadow:0 2px 10px rgba(15,23,42,.05)!important;
  }
  .ant-pro-global-header-logo{max-width:44vw;overflow:hidden}
  .ant-pro-sider.ant-layout-sider{z-index:100!important;pointer-events:auto!important;box-shadow:8px 0 24px rgba(15,23,42,.14)!important}
  .aiyu-navigation-sider .ant-menu{padding-top:50px!important}
  .ant-pro-sider-logo{height:56px!important;padding:0 14px!important}
  .ant-menu-item,.ant-menu-submenu-title{min-height:44px!important;line-height:44px!important;margin-top:2px!important;margin-bottom:2px!important}
  .ant-drawer-content-wrapper.aiyu-navigation-drawer{
    width:min(82vw,288px)!important;max-width:288px!important;z-index:2!important;pointer-events:auto!important;
  }
  .aiyu-navigation-drawer-root .ant-drawer-mask{z-index:1!important}
  .aiyu-navigation-drawer-root .ant-drawer-content-wrapper{z-index:2!important}
  .aiyu-mobile-menu-close{
    position:fixed;top:max(9px,env(safe-area-inset-top));z-index:10002;display:flex;align-items:center;gap:5px;
    min-height:38px;padding:6px 10px;border:1px solid #d0d5dd;border-radius:8px;background:#fff;color:#344054;
    font:600 13px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
    box-shadow:0 4px 14px rgba(15,23,42,.12);cursor:pointer;touch-action:manipulation;
  }
  .aiyu-mobile-menu-close>span:first-child{font-size:21px;font-weight:400;line-height:1}
  .aiyu-mobile-menu-outside{
    position:fixed;top:0;right:0;bottom:0;z-index:9998;display:block;border:0;padding:0;
    background:rgba(15,23,42,.32);cursor:pointer;
  }
  .aiyu-mobile-menu-close[hidden],.aiyu-mobile-menu-outside[hidden]{display:none!important}

  #root>.w-screen.h-screen{
    min-height:100dvh!important;height:auto!important;padding:24px 16px!important;
    align-items:center!important;background:linear-gradient(160deg,#f5f9ff 0%,#f4f6f8 62%,#edf3ff 100%)!important;
  }
  #root>.w-screen.h-screen>div.flex{
    display:block!important;width:100%!important;max-width:420px!important;padding:24px 18px!important;
    border:1px solid var(--aiyu-line)!important;border-radius:16px!important;background:#fff!important;
    box-shadow:0 14px 36px rgba(15,23,42,.09)!important;
  }
  #root>.w-screen.h-screen>div.flex>img{display:none!important}
  #root>.w-screen.h-screen>div.flex>div.flex{
    display:block!important;width:100%!important;max-width:100%!important;margin-left:0!important;
  }
  #root>.w-screen.h-screen>div.flex>div.flex>.text-2xl{
    width:100%!important;margin-bottom:28px!important;text-align:center!important;font-size:22px!important;
  }
  #root>.w-screen.h-screen>div.flex>div.flex>.text-2xl::before{
    display:block;width:58px;height:58px;margin:0 auto 14px;border-radius:15px;
  }
  #root #basic{width:100%!important;max-width:100%!important}

  .ant-pro-basicLayout-content,.ant-pro-layout-content,.ant-pro-page-container-content,
  .ant-pro-page-container-children-content{margin:0!important;padding:8px!important}
  .ant-pro-page-container-warp-page-header,.ant-page-header{padding:12px!important;background:var(--aiyu-panel)!important}
  .ant-page-header-heading{align-items:flex-start!important;gap:8px!important}
  .ant-page-header-heading-left{min-width:0!important;flex-wrap:wrap!important}
  .ant-page-header-heading-title{font-size:18px!important;white-space:normal!important;line-height:1.35!important}
  .ant-page-header-heading-extra{display:flex!important;flex-wrap:wrap!important;width:100%;gap:8px!important;margin:4px 0 0!important}
  .ant-page-header-heading-extra>*{margin:0!important;flex:1 1 120px}
  .ant-pro-page-container-children-content>.ant-card:first-child{margin-top:0!important}

  .ant-card,.ant-pro-card{border-radius:var(--aiyu-radius)!important;border-color:var(--aiyu-line)!important}
  .ant-card-head,.ant-pro-card-header{min-height:48px!important;padding:0 12px!important}
  .ant-card-head-title,.ant-pro-card-title{padding:12px 0!important;white-space:normal!important}
  .ant-card-body,.ant-pro-card-body{padding:12px!important}
  .ant-card-extra{padding:8px 0!important}

  .ant-form-item{margin-bottom:14px!important}
  .ant-form-item-row{display:block!important}
  .ant-form-item-label,.ant-form-item-control{display:block!important;max-width:100%!important;flex:0 0 100%!important;text-align:left!important}
  .ant-form-item-label{padding:0 0 5px!important}
  .ant-form-item-label>label{height:auto!important;line-height:1.35!important}
  .ant-input,.ant-input-number,.ant-picker,.ant-select,.ant-cascader-picker{width:100%!important;max-width:100%!important;font-size:16px!important}
  .ant-input,.ant-input-affix-wrapper,.ant-picker,.ant-select-selector,.ant-input-number{min-height:42px!important}
  textarea.ant-input{min-height:96px!important}
  .ant-radio-group,.ant-checkbox-group{display:flex!important;flex-wrap:wrap!important;gap:8px 12px!important}
  .ant-pro-table-search,.ant-pro-form-query-filter{padding:12px!important;border-radius:var(--aiyu-radius)!important}
  .ant-pro-form-query-filter-row{row-gap:4px!important}

  .ant-space{max-width:100%;flex-wrap:wrap!important;gap:8px!important}
  .ant-space-item{max-width:100%}
  .ant-btn{min-height:44px;padding:7px 14px!important;touch-action:manipulation}
  .ant-btn-sm{min-height:36px!important}
  .ant-btn-group{display:flex!important;flex-wrap:wrap!important}
  .ant-upload,.ant-upload-select{max-width:100%}

  .ant-table-wrapper{margin:0!important}
  .ant-table{background:transparent!important}
  .ant-table-container{border:0!important;background:transparent!important}
  .ant-table-content{overflow-x:auto!important}
  table[data-aiyu-mobile-table="true"]{display:table!important;width:100%!important;min-width:max(100%,calc(var(--aiyu-table-columns,7) * 92px))!important;table-layout:fixed!important;border-collapse:collapse!important;background:#fff!important;font-size:11px!important;line-height:1.35!important}
  table[data-aiyu-mobile-table="true"] col{width:auto!important;min-width:0!important}
  table[data-aiyu-mobile-table="true"]>thead{display:table-header-group!important}
  table[data-aiyu-mobile-table="true"]>thead>tr{display:table-row!important}
  table[data-aiyu-mobile-table="true"]>thead>tr>th{display:table-cell!important;padding:6px 5px!important;background:#f8fafc!important;font-size:11px!important;line-height:1.3!important;white-space:normal!important;text-align:left!important;overflow-wrap:anywhere!important;word-break:break-word!important}
  table[data-aiyu-mobile-table="true"]>tbody{display:table-row-group!important}
  table[data-aiyu-mobile-table="true"]>tbody>tr{display:table-row!important;background:#fff!important}
  table[data-aiyu-mobile-table="true"]>tbody>tr:nth-child(even){background:#fafbfc!important}
  table[data-aiyu-mobile-table="true"]>tbody>tr>td{position:static!important;display:table-cell!important;width:auto!important;min-width:0!important;max-width:none!important;padding:6px 5px!important;border:0!important;border-bottom:1px solid var(--aiyu-line)!important;background:transparent!important;vertical-align:middle!important;white-space:normal!important;text-align:left!important;overflow-wrap:anywhere!important;word-break:break-word!important}
  table[data-aiyu-mobile-table="true"]>tbody>tr>td[data-aiyu-label]::before{content:none!important}
  table[data-aiyu-mobile-table="true"]>tbody>tr>td[colspan]{display:table-cell!important;text-align:center!important}
  table[data-aiyu-mobile-table="true"] .ant-table-cell-fix-left,
  table[data-aiyu-mobile-table="true"] .ant-table-cell-fix-right{position:static!important;box-shadow:none!important}
  table[data-aiyu-mobile-table="true"] .ant-table-selection-column{display:table-cell!important;padding:6px 4px!important}
  table[data-aiyu-mobile-table="true"] .ant-space{justify-content:flex-start!important}
  .ant-table-expanded-row>td{display:table-cell!important}
  .ant-table-expanded-row-fixed{width:100%!important;margin:0!important;padding:6px!important}

  .ant-pagination{display:flex!important;justify-content:center!important;flex-wrap:wrap!important;gap:4px!important;margin:14px 0 4px!important}
  .ant-pagination-options{width:100%;margin:6px 0 0!important;text-align:center}
  .ant-pagination-options-size-changer{width:auto!important}
  .ant-list-item{align-items:flex-start!important;flex-wrap:wrap!important;padding:12px 0!important}
  .ant-list-item-action{width:100%;margin:8px 0 0!important}

  .ant-modal-root .ant-modal-wrap{overflow:hidden!important}
  .ant-modal{
    top:max(8px,env(safe-area-inset-top))!important;width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;margin:0 8px!important;padding-bottom:8px!important;
  }
  .ant-modal-content{max-height:calc(100dvh - 16px - env(safe-area-inset-top));display:flex;flex-direction:column;border-radius:12px!important}
  .ant-modal-header{padding:14px!important}.ant-modal-title{padding-right:28px;line-height:1.4!important}
  .ant-modal-body{flex:1;max-height:none!important;overflow:auto!important;padding:14px!important}
  .ant-modal-footer{display:flex;flex-wrap:wrap;gap:8px;padding:12px 14px!important}
  .ant-modal-footer .ant-btn{flex:1;margin:0!important}
  .ant-drawer-content-wrapper:not(.aiyu-navigation-drawer){width:100vw!important;max-width:100vw!important}
  .ant-drawer-header{padding:14px!important}.ant-drawer-body{padding:14px!important}.ant-drawer-footer{padding:12px 14px!important}
  .ant-popover,.ant-dropdown{max-width:calc(100vw - 16px)!important}
  .ant-picker-dropdown,.ant-select-dropdown{max-width:calc(100vw - 16px)!important}
  .ant-message{left:8px!important;right:8px!important;width:auto!important}
  .ant-notification{width:calc(100vw - 16px)!important;margin-right:8px!important}

  .ant-descriptions-view{border-radius:var(--aiyu-radius)!important;overflow:hidden}
  .ant-descriptions-view table,.ant-descriptions-row{display:block!important;width:100%!important}
  .ant-descriptions-row>th,.ant-descriptions-row>td{display:block!important;width:100%!important;padding:8px 12px!important}
  .ant-tabs-nav{margin-bottom:10px!important}.ant-tabs-tab{padding:10px 4px!important}
  iframe[src^="/tools/"]{display:block!important;width:100%!important;height:calc(100dvh - 72px)!important;min-height:620px!important;border-radius:0!important;background:var(--aiyu-bg)!important}
}

@media(max-width:420px){
  .ant-pro-basicLayout-content,.ant-pro-layout-content,.ant-pro-page-container-content,.ant-pro-page-container-children-content{padding:6px!important}
  .ant-card-body,.ant-pro-card-body{padding:10px!important}
}
