/* TaxAI Ver.90.7 final layout */

/* Sidebar */
.taxai-sidebar,
.taxai-common-sidebar,
.taxai-os-sidebar,
.sidebar,
aside[class*="sidebar"],
nav[class*="sidebar"]{
  position:fixed !important;
  inset:0 auto 0 0 !important;
  width:312px !important;
  min-width:312px !important;
  max-width:312px !important;
  height:100vh !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  background:#0f172a !important;
  color:#e5e7eb !important;
  z-index:1000 !important;
  box-sizing:border-box !important;
}

.taxai-sidebar *,
.taxai-common-sidebar *,
.taxai-os-sidebar *,
.sidebar *,
aside[class*="sidebar"] *,
nav[class*="sidebar"] *{
  color:#e5e7eb !important;
}

.taxai-sidebar a,
.taxai-common-sidebar a,
.taxai-os-sidebar a,
.sidebar a,
aside[class*="sidebar"] a,
nav[class*="sidebar"] a{
  display:block !important;
  color:#cbd5e1 !important;
  padding:8px 10px !important;
  border-radius:10px !important;
  text-decoration:none !important;
  line-height:1.45 !important;
}

/* Main shell: only outer shell gets sidebar offset */
body{
  margin:0 !important;
  overflow-x:hidden !important;
  background:#f5f7fb !important;
}

body > main,
body > .taxai-main,
body > .taxai-content,
body > .app-main,
body > .admin-main,
body > .taxai-layout-main,
body > .taxai-os-main{
  margin-left:312px !important;
  width:calc(100vw - 312px) !important;
  max-width:calc(100vw - 312px) !important;
  padding:0 !important;
  box-sizing:border-box !important;
}

/* Inner page must start from left, never centered */
.taxai-page,
.taxai-pro-page,
.taxai-ds-page,
main .taxai-page,
main .taxai-pro-page,
main .taxai-ds-page{
  margin:0 !important;
  width:100% !important;
  max-width:none !important;
  padding:28px 32px !important;
  box-sizing:border-box !important;
}

/* Force all major content blocks left aligned */
.taxai-page > *,
.taxai-pro-page > *,
.taxai-ds-page > *,
.taxai-page section,
.taxai-pro-page section,
.taxai-ds-page section,
.taxai-page .container,
.taxai-pro-page .container,
.taxai-ds-page .container,
.taxai-page .container-fluid,
.taxai-pro-page .container-fluid,
.taxai-ds-page .container-fluid,
.taxai-page .taxai-hero,
.taxai-pro-page .taxai-hero,
.taxai-ds-page .taxai-hero,
.taxai-page .taxai-ds-hero,
.taxai-pro-page .taxai-ds-hero,
.taxai-page .taxai-page-header,
.taxai-pro-page .taxai-page-header,
.taxai-page .card,
.taxai-pro-page .card,
.taxai-page .taxai-card,
.taxai-pro-page .taxai-card,
.taxai-page .taxai-panel,
.taxai-pro-page .taxai-panel,
.taxai-page .table-responsive,
.taxai-pro-page .table-responsive{
  margin-left:0 !important;
  margin-right:0 !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}

/* If old CSS uses transform/translate for centering, kill it */
.taxai-page .taxai-hero,
.taxai-pro-page .taxai-hero,
.taxai-page .taxai-ds-hero,
.taxai-pro-page .taxai-ds-hero,
.taxai-page .taxai-card,
.taxai-pro-page .taxai-card,
.taxai-page .card,
.taxai-pro-page .card{
  transform:none !important;
  left:auto !important;
  right:auto !important;
}

/* Table safety */
table{
  width:100% !important;
}

@media(max-width:900px){
  .taxai-sidebar,
  .taxai-common-sidebar,
  .taxai-os-sidebar,
  .sidebar,
  aside[class*="sidebar"],
  nav[class*="sidebar"]{
    position:relative !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:auto !important;
  }

  body > main,
  body > .taxai-main,
  body > .taxai-content,
  body > .app-main,
  body > .admin-main,
  body > .taxai-layout-main,
  body > .taxai-os-main{
    margin-left:0 !important;
    width:100% !important;
    max-width:100% !important;
  }

  .taxai-page,
  .taxai-pro-page,
  .taxai-ds-page{
    padding:16px !important;
  }
}
