input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}
input[type="radio"] {
  width: 1rem;
  height: 1rem;
}
.focus-side-link {
  background-color: rgb(231, 237, 241) !important;
}
.docs-image {
  height: 250px;
  margin: 1rem 0 !important;
  display: block;
  background: transparent;
}
img#large {
  cursor: -moz-zoom-in;
  cursor: -webkit-zoom-in;
  cursor: zoom-in;
}
.disabled-link {
  pointer-events: none;
}
button.btn.btn-secondary {
  border-radius: 0px !important;
}
a.btn.btn-secondary {
  border-radius: 0px !important;
}

.btn-ocean {
  color: #fff;
  background-color: teal;
  border-color: #005a5a;
}

.btn-ocean:hover {
  color: #fff;
  background-color: #004d4d;
  border-color: #009a9a;
}

.btn-ocean:focus,
.btn-ocean.focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 90, 90, 0.5);
}

.btn-ocean.disabled,
.btn-ocean:disabled {
  color: #fff;
  background-color: teal;
  border-color: #005a5a;
}

.btn-ocean:not(:disabled):not(.disabled):active,
.btn-ocean:not(:disabled):not(.disabled).active,
.show > .btn-ocean.dropdown-toggle {
  color: #fff;
  background-color: #00b3b3;
  border-color: #000;
}

.btn-ocean:not(:disabled):not(.disabled):active:focus,
.btn-ocean:not(:disabled):not(.disabled).active:focus,
.show > .btn-ocean.dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 90, 90, 0.5);
}

.btn-outline-ocean {
  color: teal;
  background-color: transparent;
  background-image: none;
  border-color: teal;
}

.btn-outline-ocean:hover {
  color: #222;
  background-color: #009a9a;
  border-color: teal;
}

.btn-outline-ocean:focus,
.btn-outline-ocean.focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 128, 128, 0.5);
}

.btn-outline-ocean.disabled,
.btn-outline-ocean:disabled {
  color: teal;
  background-color: transparent;
}

.btn-outline-ocean:not(:disabled):not(.disabled):active,
.btn-outline-ocean:not(:disabled):not(.disabled).active,
.show > .btn-outline-ocean.dropdown-toggle {
  color: #fff;
  background-color: #009a9a;
  border-color: teal;
}

.btn-outline-ocean:not(:disabled):not(.disabled):active:focus,
.btn-outline-ocean:not(:disabled):not(.disabled).active:focus,
.show > .btn-outline-ocean.dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 128, 128, 0.5);
}

#sidebar-wrapper {
  min-height: 100vh;
  margin-left: -15rem;
  -webkit-transition: margin 0.25s ease-out;
  -moz-transition: margin 0.25s ease-out;
  -o-transition: margin 0.25s ease-out;
  transition: margin 0.25s ease-out;
}

#sidebar-wrapper .list-group-item-action:hover,
#sidebar-wrapper .list-group-item-action:focus,
#sidebar-wrapper .list-group-item-action.bg-light:hover,
#sidebar-wrapper .list-group-item-action.bg-light:focus,
.navbar .dropdown-menu .list-group-item-action.bg-light:hover,
.navbar .dropdown-menu .list-group-item-action.bg-light:focus {
  background-color: #e9ecef !important;
}

#sidebar-wrapper .sidebar-heading {
  padding: 0.875rem 1.25rem;
  font-size: 1.2rem;
}

#sidebar-wrapper .list-group {
  width: 15rem;
}

#sidebar-wrapper .list-group-item {
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

#page-content-wrapper {
  min-width: 0;
  width: 100%;
}

#wrapper #sidebar-wrapper.toggled {
  margin-left: -15rem;
}

@media (min-width: 992px) {
  #sidebar-wrapper {
    margin-left: 0;
  }
  #page-content-wrapper {
    min-width: 0;
    width: 100%;
  }
  #wrapper #sidebar-wrapper.toggled {
    margin-left: -15rem;
  }
}

@media (max-width: 992px) {
  .mt-li {
    margin-top: 0.25rem !important;
  }
  .h1-responsive {
    font-size: 1.2rem;
    margin-top: 0rem !important;
  }
  .navbar .navbar-collapse {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }
  .navbar .navbar-collapse .ms-1,
  .navbar .navbar-collapse .dropdown-toggle {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .navbar .dropdown-menu {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  .navbar .dropdown-toggle {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
}

.dt {
  flex: 1;
  height: min-content;
  position: sticky;
  width: auto;
  position: -webkit-sticky;
  top: 0;
  bottom: 0;
}

.md-error {
  color: #dc3545 !important;
  font-weight: bold !important;
}

.md-correct {
  color: #42eb2c !important;
  font-weight: bold !important;
}
.md-blue {
  color: #007bff !important;
  font-weight: bold;
}
.th-front {
  background: #d6e9e2 !important;
}

.front-True {
  background: #e7f1eea4 !important;
}
.paint {
  background: #afdfd0a4 !important;
}

.md-correct2 {
  color: #20aa76 !important;
  font-weight: bold !important;
}

.md-pre {
  border: 1px solid #ddd !important;
}

.help-text {
  color: #6c757d !important;
  font-size: small !important;
}

.error-text {
  font-size: 80% !important;
  color: #dc3545 !important;
  font-weight: bold !important;
}

.line-error {
  background: #fbc2c4 !important;
  color: #8a1f11 !important;
}

.border-invalid {
  border: 2px solid #dc3545 !important;
}

.CodeMirror-Invalid {
  border: 1px solid #dc3545 !important;
}

.CodeMirror {
  border: 1px solid #ddd !important;
}

.CodeMirror pre {
  padding-left: 7px;
  line-height: 1.25;
}

.banner {
  background: #ffc;
  padding: 6px;
  border-bottom: 2px solid silver;
}

.banner div {
  margin: 0 auto;
  max-width: 600px;
  text-align: center;
}

@media (max-width: 1200px) {
  legend {
    font-size: calc(1.275rem + 0.3vw);
  }
  .h1,
  h1 {
    font-size: calc(1.375rem + 1.5vw);
  }
  .h2,
  h2 {
    font-size: calc(1.325rem + 0.9vw);
  }
  .h3,
  h3 {
    font-size: calc(1.3rem + 0.6vw);
  }
  .h4,
  h4 {
    font-size: calc(1.275rem + 0.3vw);
  }
  .display-1 {
    font-size: calc(1.725rem + 5.7vw);
  }
  .display-2 {
    font-size: calc(1.675rem + 5.1vw);
  }
  .display-3 {
    font-size: calc(1.575rem + 3.9vw);
  }
  .display-4 {
    font-size: calc(1.475rem + 2.7vw);
  }
  .btn-close {
    font-size: calc(1.275rem + 0.3vw);
  }
}

.fading- {
  background-color: white;
  border: 1px solid white;
}
.fading-paint {
  background-color: white;
  border: 1px solid rgb(12, 12, 102);
}

.fading- :hover {
  border-color: rgb(12, 12, 102);
}

.fading- > * :hover {
  border-color: white;
}

.btn-outline-info:hover {
  color: rgba(132, 241, 81, 0.986) !important;
}

.dropdown-menu:hover {
  background: white !important;
}

a[class="teal-copy"] {
  font-size: x-large;
  color: rgb(11, 136, 145);
  text-decoration: none;
  border-bottom: 4px solid teal;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 76px;
}

html,
#wrapper {
  overflow-x: hidden;
}

#wrapper {
  min-height: calc(100vh - 76px);
}

select,
select.form-control,
.form-select {
  background-color: #fff !important;
}

.outline-targets-table {
  width: 100% !important;
}

.table-bordered > :not(caption) > * > * {
  border: 1px solid #dee2e6 !important;
}

:root {
  --bs-info: #17a2b8;
  --bs-info-rgb: 23, 162, 184;
}

.bg-info {
  background-color: #17a2b8 !important;
}

.btn-info {
  background-color: #17a2b8 !important;
}

.badge.rounded-pill.bg-info {
  color: #fff;
}

.font-nav {
  font-family: "Raleway", sans-serif;
  outline: none;
}

.font-teal {
  color: teal;
}

.font-teal:hover {
  color: rgb(7, 92, 92);
}

.font-red {
  color: rgb(182, 37, 37);
}

.font-red:hover {
  color: rgb(138, 14, 14);
}

.dropdown-item:active {
  background-color: #ddd;
  color: black;
}

.dropdown-item:hover {
  background-color: rgb(204, 230, 225);
}

.cover-container {
  height: 300px;
  width: 100%;
  white-space: nowrap;
  overflow-x: scroll;
  overflow-y: hidden;
  margin-bottom: 3%;
}

.cover-item {
  position: relative;
  display: inline-block;
  margin: 8px 8px;
  box-shadow: 2px 2px 4px #bbb;
  border-top-right-radius: 4px;
  height: 300px;
  vertical-align: bottom;
  background-position: top left;
  background-repeat: no-repeat;
  background-size: cover;
}

.bottom-title {
  align-self: flex-end;
  background-color: white;
}

.card-header-button {
  color: teal;
  width: 100%;
  height: 100%;
  margin: 0px 0px 0px 0px;
  font-size: large;
  text-decoration: none !important;
}

.card-header-button:focus {
  box-shadow: none !important;
}
.card-header-button:hover {
  color: teal;
  text-decoration: underline !important;
}

.toggle-icon:focus,
.navbar-toggler:focus {
  box-shadow: none !important;
}

@media (max-width: 991.98px) {
  .navbar-toggler {
    margin-left: 0.5rem;
  }
}

@media (min-width: 992px) {
  .nav-link.ocean-tab-mid {
    border-top: 1px solid teal;
    border-bottom: 1px solid teal;
    border-left: 0;
    border-right: 0.5px solid teal;
    background-color: white;
    border-radius: 0;
    color: black;
  }
  .nav-link.ocean-tab-left {
    border-top: 1px solid teal;
    border-bottom: 1px solid teal;
    border-left: 1px solid teal;
    border-right: 0.5px solid teal;
    background-color: white;
    border-radius: 15px 0px 0px 15px;
    color: black;
  }
  .nav-link.ocean-tab-right {
    border-top: 1px solid teal;
    border-bottom: 1px solid teal;
    border-left: 0;
    border-right: 1px solid teal;
    background-color: white;
    border-radius: 0px 15px 15px 0px;
    color: black;
  }

  .nav-link.active.ocean-tab-mid {
    background-color: teal;
    color: white;
  }
  .nav-link.active.ocean-tab-left {
    background-color: teal;
    color: white;
  }
  .nav-link.active.ocean-tab-right {
    background-color: teal;
    color: white;
  }
}
@media (max-width: 992px) {
  .navitem100 {
    width: 100%;
  }
  .nav-link.ocean-tab-mid {
    border: 1px solid teal;
    background-color: white;
    width: 100% !important;
    border-radius: 5px;
    color: black;
  }
  .nav-link.ocean-tab-left {
    border: 1px solid teal;
    background-color: white;
    width: 100% !important;
    border-radius: 5px;
    color: black;
  }
  .nav-link.ocean-tab-right {
    border: 1px solid teal;
    background-color: white;
    width: 100% !important;
    border-radius: 5px;
    color: black;
  }

  .nav-link.active.ocean-tab-mid {
    background-color: teal;
    color: white;
  }
  .nav-link.active.ocean-tab-left {
    background-color: teal;
    color: white;
  }
  .nav-link.active.ocean-tab-right {
    background-color: teal;
    color: white;
  }
}

.fixed-scrollbar-container {
  overflow: auto;
}

.planer-scroll-x {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.bbcodetable {
  background: #fff;
  border: #999966 1px solid;
}
table.vis.tribalwarsbg {
  display: table;
  border-collapse: separate;
  box-sizing: border-box;
  text-indent: initial;
  border-spacing: 2px;
  border-color: grey;
}
.vis {
  border-collapse: separate;
  word-wrap: normal;
}
.content-border {
  padding: 0;
  margin: 0;
  background: #e3d5b3;
}
.content-border-head {
  padding: 0;
  margin: 0;
  background: #c1a264;
}

.overview-card {
  margin-bottom: 1.6rem;
}
.overview-card h1 span {
  display: block;
}
.overview-btn {
  font-size: large;
  margin-top: 0.6rem;
}
.overview-card small {
  margin-bottom: 0.3rem;
}
@media screen and (min-width: 768px) {
  .overview-card h1 span {
    display: inline;
  }
  .overview-btn {
    margin-top: 0;
  }
  .overview-card {
    border-left: 5px solid teal;
    padding-left: 0.6rem;
  }
  .overview-card {
    margin-bottom: 3rem;
  }
}
a.t-tab-teal {
  font-size: 1.05rem;
  box-shadow: 0 -4px 0 0 white;
  font-weight: 450;
  padding: 0.3em 0.9em 0.5em;
  border: 1px solid hsl(219, 1%, 72%);
  background: hsl(220, 20%, 94%);
}

@media (max-width: 700px) {
  .t-tab-teal {
    font-size: 0.8rem;
  }
}

a.t-tab-teal {
  color: black !important;
  text-decoration: none !important;
}
a.t-tab-teal:hover {
  color: black !important;
  text-decoration: none !important;
}

.t-tab-teal:hover {
  box-shadow: 0 -3px 0 0 hsl(219, 1%, 72%);
}

.t-tab-teal.t-tab-teal.t-tab-teal-active {
  background: hsl(220, 43%, 99%);
}

.t-tab-teal.t-tab-teal-active {
  box-shadow: 0 -5px 0 0 teal;
}

.lines-wrapper {
  color: #999;
  font-family: monospace;
  background-color: #f7f7f7;
  border: 1px solid #ddd !important;
}

.select-wrapper {
  margin: auto;
  max-width: 600px;
  width: calc(100% - 40px);
}
.st0 {
  fill: #7289da;
}

button.btn-light {
  border: 1px solid rgb(136, 135, 135);
}
button.btn-light-no-border {
  border: 1px solid #f8f9fa;
}

a.nav-link.nav-link-pills {
  border: 1px solid rgb(136, 135, 135);
  border-right: 0px;
  border-radius: 0px !important;
}
a.nav-link.nav-link-pills.last-nav-link {
  border: 1px solid rgb(136, 135, 135);
  border-radius: 0px !important;
}
.selected {
  background-color: rgb(106, 196, 196) !important;
}
.copy-button {
  border: 0;
  background-color: white;
}
.border-row {
  font-weight: 500;
}
.no-ind-ul ul {
  margin-top: 20px;
  margin-bottom: 20px;
  list-style: none;
  padding-left: 0;
}
​ .no-ind-ul {
  font-size: larger;
}

.select-pure__select {
  align-items: center;
  background: #f9f9f8;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  color: #363b3e;
  cursor: pointer;
  display: flex;
  font-size: 16px;
  font-weight: 500;
  justify-content: left;
  min-height: 44px;
  padding: 5px 10px;
  position: relative;
  transition: 0.2s;
  width: 100%;
}

.select-pure__options {
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  color: #363b3e;
  display: none;
  left: 0;
  max-height: 221px;
  overflow-y: scroll;
  position: absolute;
  top: 50px;
  width: 100%;
  z-index: 5;
}

.select-pure__select--opened .select-pure__options {
  display: block;
}

.select-pure__option {
  background: #fff;
  border-bottom: 1px solid #e4e4e4;
  box-sizing: border-box;
  height: 44px;
  line-height: 25px;
  padding: 10px;
}

.select-pure__option--selected {
  color: #e4e4e4;
  cursor: initial;
  pointer-events: none;
}

.select-pure__option--hidden {
  display: none;
}

.select-pure__selected-label {
  background: #5e6264;
  border-radius: 4px;
  color: #fff;
  cursor: initial;
  display: inline-block;
  margin: 5px 10px 5px 0;
  padding: 3px 7px;
}

.select-pure__selected-label:last-of-type {
  margin-right: 0;
}

.select-pure__selected-label i {
  cursor: pointer;
  display: inline-block;
  margin-left: 7px;
}

.select-pure__selected-label i:hover {
  color: #e4e4e4;
}

.select-pure__autocomplete {
  background: #f9f9f8;
  border-bottom: 1px solid #e4e4e4;
  border-left: none;
  border-right: none;
  border-top: none;
  box-sizing: border-box;
  font-size: 16px;
  outline: none;
  padding: 10px;
  width: 100%;
}
.check2-green {
  color: green;
  font-size: 1.4em;
  top: 0.125em;
  position: relative;
}
.xcircle-red {
  color: #dc3545;
  font-size: 1.25em;
  top: 0.125em;
  position: relative;
}
.lock-green {
  color: green;
  font-size: 1.25em;
  top: 0.125em;
  position: relative;
}
.background-image-lg {
  background-image: url("/static/images/background.8895487d098b.avif");
  background-size: cover;
  min-height: 250px;
  border-bottom: 1px solid teal;
}
.background-image-sm {
  background-image: url("/static/images/background.8895487d098b.avif");
  background-size: cover;
  min-height: 325px;
  border-bottom: 1px solid teal;
}
.jumbotron {
  font-family: unset;
  background-color: teal !important;
  color: white;
}
.jumbotron a {
  color: white;
}
.fancy-th-btn {
  padding: 0 !important;
}
.fancy-building-btn {
  width: 100%;
  margin: 0;
  outline: 0;
  border-radius: 0px;
  padding: 5px;
}
.fancy-building-btn:hover {
  background: #cbe4dfa4;
}
.fancy-building-btn:focus {
  outline: 0;
  box-shadow: none;
}
.fancy-building-True {
  background: #dbe7e5a4;
}
.row-expired {
  opacity: 0.6;
}

/* Sanatorium visual refresh */
:root {
  --app-bg: #f5f7f8;
  --surface: #ffffff;
  --surface-muted: #eef3f3;
  --surface-strong: #e5eded;
  --text: #202728;
  --muted: #647172;
  --border: #d7e0e0;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: #dcefeb;
  --blue: #2563eb;
  --amber: #f97316;
  --danger-soft: #fee2e2;
  --shadow: 0 8px 24px rgba(31, 41, 55, 0.06);
  --radius: 8px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --app-bg: #0e1015;
  --surface: #14171d;
  --surface-muted: #1b1f27;
  --surface-strong: #232836;
  --text: #f3f5f8;
  --muted: #9ea5b4;
  --border: #2b313d;
  --accent: #2f81f7;
  --accent-strong: #6aa8ff;
  --accent-soft: #18263f;
  --blue: #2f81f7;
  --amber: #d59a3a;
  --danger-soft: #43222a;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
  --accent-alt: #8b5cf6;
  color-scheme: dark;
}

html {
  background: var(--app-bg);
}

body {
  background: var(--app-bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: var(--accent-strong);
}

a:hover {
  color: var(--accent);
}

.font-nav {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

#page-content-wrapper,
#page-content-wrapper > .container-fluid {
  background: var(--app-bg);
}

#page-content-wrapper > .container-fluid {
  margin-top: 0 !important;
  padding: 0 1rem;
}

.navbar.navbar-light.bg-light {
  background: var(--surface) !important;
  background: color-mix(in srgb, var(--surface) 94%, transparent) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.07);
  min-height: 64px;
  padding: 0.55rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .navbar.navbar-light.bg-light {
  background: var(--surface) !important;
  background: color-mix(in srgb, var(--surface) 96%, transparent) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}

.app-main-nav {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  gap: 0.2rem;
  padding: 0.25rem;
}

.navbar .nav-link {
  align-items: center;
  border-radius: 7px;
  color: var(--muted) !important;
  display: inline-flex;
  font-weight: 720;
  gap: 0.42rem;
  line-height: 1.2;
  margin: 0;
  min-height: 2.3rem;
  padding: 0.52rem 0.75rem;
}

.navbar .nav-link i {
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(31, 41, 55, 0.04);
  color: var(--text) !important;
}

.navbar-toggler {
  background: var(--surface-muted);
  border-color: var(--border) !important;
  border-radius: 8px;
  min-height: 2.35rem;
}

.theme-toggle,
.toggle-icon {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  height: 2.35rem;
  justify-content: center;
  margin-left: 0.35rem;
  min-width: 2.35rem;
  padding: 0;
}

.theme-toggle:hover,
.toggle-icon:hover {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-muted));
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
  color: var(--accent-strong);
}

.dropdown-menu {
  background: var(--surface) !important;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--text);
  min-width: 13rem;
  overflow: hidden;
  padding: 0.35rem !important;
}

.dropdown-menu:hover {
  background: var(--surface) !important;
}

.dropdown-divider {
  border-top-color: var(--border);
}

.dropdown-item {
  color: var(--text);
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item:active {
  background: var(--surface-muted);
  color: var(--text);
}

.font-teal,
.font-teal:hover {
  color: var(--accent-strong);
}

.font-red,
.font-red:hover {
  color: #d64545;
}

.bg-light {
  background-color: var(--surface) !important;
}

.text-muted,
.form-text {
  color: var(--muted) !important;
}

#sidebar-wrapper {
  background: var(--surface) !important;
  background: var(--surface) !important;
  border-right: 1px solid var(--border);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 76px);
  min-width: 14.75rem;
  overflow-y: auto;
  padding: 0.5rem 0.55rem 0.7rem;
  position: sticky;
  top: 76px;
  width: 14.75rem;
}

#wrapper.has-app-sidebar #page-content-wrapper {
  min-width: 0;
  width: 100%;
}

#sidebar-wrapper .sidebar-heading {
  align-items: center;
  border: 0;
  color: var(--muted);
  display: flex;
  font-size: 0.72rem;
  font-weight: 820;
  gap: 0.65rem;
  letter-spacing: 0.1em;
  min-height: 20px;
  padding: 0.15rem 0.4rem 0.45rem;
  text-transform: uppercase;
}

.sidebar-brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  height: 2.25rem;
  justify-content: center;
  text-decoration: none;
  transition:
    filter 0.18s ease,
    transform 0.18s ease;
  width: 2.25rem;
}

.sidebar-brand-mark:hover,
.sidebar-brand-mark:focus {
  color: #fff;
  filter: brightness(1.08);
  transform: translateY(-1px);
}

#sidebar-wrapper .list-group,
.app-sidebar-nav {
  display: grid;
  gap: 0.25rem;
  width: 100%;
}

.app-sidebar-section {
  display: grid;
  gap: 0.25rem;
}

.app-sidebar-group {
  border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  margin-bottom: 0.35rem;
  padding-bottom: 0.35rem;
}

.app-sidebar-group:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.app-sidebar-group-toggle {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 0.65rem;
  justify-content: space-between;
  list-style: none;
  padding: 0.1rem 0.2rem 0;
}

.app-sidebar-group-toggle::-webkit-details-marker {
  display: none;
}

.app-sidebar-group-chevron {
  color: color-mix(in srgb, var(--muted) 88%, transparent);
  font-size: 0.8rem;
  transition: transform 140ms ease, color 140ms ease;
}

.app-sidebar-group[open] .app-sidebar-group-chevron {
  color: var(--text);
  transform: rotate(180deg);
}

.app-sidebar-section-label {
  color: color-mix(in srgb, var(--muted) 88%, transparent);
  font-size: 0.66rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  padding: 0.55rem 0.35rem 0.1rem;
  text-transform: uppercase;
}

#sidebar-wrapper .list-group-item,
#sidebar-wrapper .list-group-item.bg-light,
.navbar .dropdown-menu .list-group-item.bg-light {
  align-items: center;
  background: transparent !important;
  border: 0;
  border-radius: 7px !important;
  color: var(--muted);
  display: flex;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 0.55rem;
  min-height: 2.28rem;
  padding: 0.42rem 0.5rem;
  transition:
    background-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.app-sidebar-nav .list-group-item i {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--blue);
  display: inline-flex;
  flex: 0 0 1.5rem;
  font-size: 0.8rem;
  height: 1.5rem;
  justify-content: center;
  width: 1.5rem;
}

.app-sidebar-nav .list-group-item .app-beta-pill {
  background: rgba(250, 204, 21, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 999px;
  color: #fde68a;
  font-size: 0.66rem;
  font-weight: 860;
  letter-spacing: 0.08em;
  margin-left: auto;
  padding: 0.16rem 0.42rem;
  text-transform: uppercase;
}

#sidebar-wrapper .list-group-item-action:hover,
#sidebar-wrapper .list-group-item-action:focus,
#sidebar-wrapper .list-group-item-action.bg-light:hover,
#sidebar-wrapper .list-group-item-action.bg-light:focus,
.navbar .dropdown-menu .list-group-item-action.bg-light:hover,
.navbar .dropdown-menu .list-group-item-action.bg-light:focus {
  background: var(--surface-muted) !important;
  color: var(--text);
  transform: translateX(2px);
}

.focus-side-link {
  background: color-mix(in srgb, var(--blue) 14%, transparent) !important;
  box-shadow: inset 2px 0 0 var(--blue);
  color: var(--accent-strong) !important;
}

.focus-side-link i {
  background: var(--surface) !important;
  border-color: color-mix(in srgb, var(--blue) 42%, var(--border)) !important;
  color: var(--blue) !important;
}

.sidebar-credit {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
  font-family: "Raleway", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  margin-top: auto;
  opacity: 0.78;
  padding: 0.55rem 0.45rem 0.2rem;
  text-transform: lowercase;
}

.sidebar-credit::before {
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  content: "";
  display: block;
  height: 1px;
  margin: 0 0 0.75rem;
  opacity: 0.7;
}

@media (min-width: 992px) {
  #wrapper.has-app-sidebar #sidebar-wrapper {
    left: 0;
    position: fixed;
    top: 76px;
    z-index: 1030;
  }

  #wrapper.has-app-sidebar #page-content-wrapper {
    margin-left: 14.75rem;
    transition: margin-left 0.25s ease-out, width 0.25s ease-out;
    width: calc(100% - 14.75rem);
  }

  #wrapper.has-app-sidebar #sidebar-wrapper.toggled {
    margin-left: 0;
    transform: translateX(-100%);
  }

  #wrapper.has-app-sidebar #sidebar-wrapper.toggled + #page-content-wrapper {
    margin-left: 0;
    width: 100%;
  }

  #wrapper #sidebar-wrapper.toggled {
    margin-left: -14.75rem;
  }
}

.btn-ocean {
  background: var(--accent);
  border-color: var(--accent);
  border-radius: 8px;
  color: #fff;
  font-weight: 750;
}

.btn-ocean:hover,
.btn-ocean:focus {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

.btn-outline-ocean {
  background: var(--surface);
  border-color: var(--border);
  border-radius: 8px;
  color: var(--text);
  font-weight: 750;
}

.btn-outline-ocean:hover,
.btn-outline-ocean:focus {
  background: var(--surface-muted);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.home-shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 0.8rem 0 2.2rem;
}

.home-hero {
  align-items: end;
  background: #11131a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: #fff;
  display: flex;
  min-height: 220px;
  overflow: hidden;
  padding: clamp(0.95rem, 2.1vw, 1.45rem);
  position: relative;
}

.home-hero::after {
  background: url("/static/images/battle.40e0ef9c0929.avif") center / cover;
  content: "";
  filter: blur(4px);
  inset: -10px;
  position: absolute;
  transform: scale(1.02);
}

.home-hero::before {
  background: linear-gradient(135deg, rgba(11, 13, 20, 0.84), rgba(20, 22, 31, 0.58));
  content: "";
  inset: 0;
  position: absolute;
  z-index: 1;
}

.home-hero-content {
  max-width: 700px;
  position: relative;
  z-index: 2;
}

.home-eyebrow,
.home-section-kicker {
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
  text-transform: uppercase;
}

.home-hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 850;
  line-height: 0.98;
  margin-bottom: 1rem;
}

.tool-hub-title {
  color: var(--text);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 840;
  margin-bottom: 1rem;
}

.home-lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.98rem, 1.6vw, 1.12rem);
  max-width: 620px;
}

.home-panel-copy-lead {
  font-size: 1.05rem;
  max-width: 760px;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.home-stats {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0.7rem;
}

.home-stat-card,
.home-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.home-stat-card {
  align-items: center;
  display: flex;
  gap: 0.9rem;
  min-height: 84px;
  padding: 0.9rem;
}

.home-stat-icon {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--blue);
  display: inline-flex;
  flex: 0 0 40px;
  font-size: 1.15rem;
  height: 40px;
  justify-content: center;
  width: 40px;
}

:root[data-theme="dark"] #sidebar-wrapper img {
  filter: invert(1) brightness(1.7);
}

.home-stat-card strong {
  color: var(--text);
  display: block;
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  font-weight: 850;
  line-height: 1.1;
}

.home-stat-card span {
  color: var(--muted);
  font-weight: 700;
}

.home-panels {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.8rem;
}

.home-panel {
  padding: clamp(1rem, 2vw, 1.4rem);
}

.home-panel-accent {
  border-top: 4px solid var(--blue);
}

.home-panel-script {
  margin-top: 1rem;
}

.home-script-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.9fr);
}

.home-panel-copy {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  max-width: 720px;
}

.home-panel-copy-muted {
  color: var(--muted);
}

.home-mini-tutorial {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.home-step-list {
  display: grid;
  gap: 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-step-list li {
  align-items: flex-start;
  color: var(--text);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 32px minmax(0, 1fr);
}

.home-step-number {
  align-items: center;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.home-panel h2 {
  color: var(--text);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 820;
  margin-bottom: 0.85rem;
}

.home-check-list {
  display: grid;
  gap: 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-check-list li {
  align-items: flex-start;
  color: var(--text);
  display: flex;
  font-size: 1.03rem;
  gap: 0.7rem;
}

.home-check-list i {
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1.3;
}

.table {
  color: var(--text);
}

.table > :not(caption) > * > * {
  background: var(--surface);
  color: var(--text);
}

.table-bordered > :not(caption) > * > * {
  border-color: var(--border) !important;
}

.form-control,
.form-select,
select,
select.form-control,
.select-pure__select,
.select-pure__autocomplete {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.form-control:focus,
.form-select:focus {
  background-color: var(--surface) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 0.2rem rgba(47, 129, 247, 0.16);
  color: var(--text) !important;
}

.card,
.modal-content,
.list-group-item {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.progress {
  background-color: var(--surface-muted);
}

.progress-bar,
.bg-info,
.btn-info {
  background-color: var(--accent) !important;
}

.badge.bg-secondary {
  background-color: var(--surface-strong) !important;
  color: var(--text);
}

.alert-primary,
.alert-success,
.alert-secondary {
  background: var(--accent-soft);
  border-color: var(--border);
  color: var(--text);
}

.alert-error {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, #dc2626 38%, var(--border));
  color: var(--text);
}

.command-shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 1rem 0 3rem;
}

.command-hero {
  align-items: end;
  background:
    linear-gradient(135deg, rgba(26, 34, 56, 0.96), rgba(63, 41, 95, 0.78)),
    var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: #fff;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 190px;
  overflow: hidden;
  padding: clamp(1rem, 2.4vw, 1.6rem);
  position: relative;
}

.command-hero::after {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16)),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 14px);
  content: "";
  inset: 0;
  position: absolute;
}

.command-hero > * {
  position: relative;
  z-index: 1;
}

.command-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 850;
  line-height: 1;
  margin: 0 0 0.55rem;
}

.command-lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
  max-width: 720px;
}

.command-hero-stats {
  display: grid;
  gap: 0.65rem;
  min-width: 170px;
}

.command-hero-stats span,
.command-pill,
.command-status {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  gap: 0.45rem;
}

.command-hero-stats span {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  justify-content: center;
  padding: 0.45rem 0.7rem;
}

.command-hero-stats strong {
  font-size: 1.2rem;
  line-height: 1;
}

.command-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  margin-top: 0.8rem;
}

.command-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(0.9rem, 1.8vw, 1.2rem);
}

.command-card-accent {
  border-top: 4px solid var(--blue);
}

.command-card-header {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.command-card h2 {
  color: var(--text);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 820;
  margin: 0;
}

.command-card p,
.command-muted {
  color: var(--muted);
}

.command-card-icon {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  display: inline-flex;
  font-size: 1.4rem;
  height: 2.7rem;
  justify-content: center;
  width: 2.7rem;
}

.command-pill,
.command-status {
  background: var(--surface-muted);
  color: var(--muted);
  font-weight: 750;
  padding: 0.4rem 0.7rem;
}

.command-status.is-ok,
.command-hero-stats .is-ok {
  color: var(--accent-strong);
}

.command-world-form label,
.command-verify-form label {
  color: var(--muted);
  display: block;
  font-size: 0.86rem;
  font-weight: 780;
  margin-bottom: 0.4rem;
}

.command-inline-controls {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.command-code-box {
  background: var(--surface-muted);
  border: 1px dashed color-mix(in srgb, var(--accent) 44%, var(--border));
  border-radius: 8px;
  display: grid;
  gap: 0.45rem;
  margin: 1.15rem 0;
  padding: 1rem;
}

.command-code-box span,
.command-token-preview span,
.command-api-note strong {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 780;
  text-transform: uppercase;
}

.command-code-box code,
.command-token-preview code,
.command-api-note code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  padding: 0.35rem 0.55rem;
}

.command-code-box code {
  font-size: 1.1rem;
  font-weight: 800;
}

.command-verify-form {
  display: grid;
  gap: 0.55rem;
}

.command-verify-form small {
  color: var(--muted);
}

.command-status-row,
.command-actions-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.command-token-preview,
.command-api-note {
  display: grid;
  gap: 0.45rem;
  margin-top: 1.2rem;
}

.command-table-card {
  margin-top: 1rem;
}

.command-table {
  margin: 0;
}

.command-table thead th {
  background: var(--surface-muted) !important;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.command-table td {
  vertical-align: middle;
}

.command-table td span {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
}

.command-empty {
  align-items: center;
  color: var(--muted);
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  padding: 2rem;
}

.command-empty i {
  color: var(--accent);
  font-size: 2rem;
}

@media (max-width: 991.98px) {
  #page-content-wrapper > .container-fluid {
    padding: 0 0.75rem;
  }

  .navbar .navbar-collapse {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 0.5rem;
    padding: 0.6rem;
  }

  .theme-toggle {
    margin: 0.35rem 0;
  }

  .home-hero {
    min-height: 390px;
  }

  .home-stats,
  .home-panels,
  .home-script-grid,
  .command-grid,
  .command-hero,
  .planner-hero,
  .overview-hero,
  .planner-list-grid,
  .planner-setup-grid,
  .overview-source-grid {
    grid-template-columns: 1fr;
  }

  .command-inline-controls {
    grid-template-columns: 1fr;
  }

  .planner-outline-stats {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 992px) and (max-width: 1180px) {
  .home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phase 1 global redesign */
.app-page-shell {
  margin-top: 0 !important;
  padding: 1rem 1.15rem 2.75rem !important;
}

.app-page-body {
  min-height: calc(100vh - 96px);
}

#page-content-wrapper > .container-fluid {
  padding-left: 1.15rem;
  padding-right: 1.15rem;
}

.app-page-body > *:not(script):not(style) {
  margin-left: auto;
  margin-right: auto;
  max-width: 1360px;
}

.navbar.navbar-light.bg-light {
  align-items: stretch;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  display: grid;
  grid-template-columns: 14.75rem minmax(0, 1fr);
  margin: 0;
  max-width: 100%;
  min-height: 76px;
  padding: 0;
  width: 100%;
}

.app-global-header {
  background: color-mix(in srgb, var(--surface) 96%, #0a0b10);
  border-bottom: 1px solid var(--border);
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1045;
}

.app-header-brand-panel {
  align-items: center;
  border-right: 1px solid var(--border);
  display: flex;
  padding: 0 1rem;
}

.app-header-main {
  align-items: center;
  display: flex;
  gap: 0.9rem;
  min-width: 0;
  padding: 0.8rem 1.2rem;
}

.app-topbar {
  gap: 0;
}

.app-topbar-left,
.app-topbar-right {
  align-items: center;
  display: flex;
  gap: 0.65rem;
}

.app-topbar-left {
  min-width: 0;
}

.app-topbar-right {
  margin-left: auto;
}

.app-topbar-brand,
.app-topbar-menu,
.app-topbar-pill {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text) !important;
  display: inline-flex;
  gap: 0.55rem;
  min-height: 2.8rem;
  padding: 0.7rem 0.95rem !important;
  text-decoration: none;
}

.app-topbar-brand {
  background: transparent;
  border: 0;
  font-size: 1.08rem;
  font-weight: 820;
  letter-spacing: 0.01em;
  min-height: auto;
  padding: 0 !important;
}

.app-topbar-brand-mark {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 22%, transparent),
    color-mix(in srgb, var(--accent-alt) 18%, transparent)
  );
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: 10px;
  color: var(--accent-strong);
  height: 2rem;
  width: 2rem;
}

.app-topbar-brand i,
.app-topbar-menu i,
.app-topbar-pill i {
  color: var(--accent);
}

.app-topbar-menu::after {
  margin-left: 0.15rem;
}

.app-topbar-menu span,
.app-topbar-pill span {
  font-weight: 740;
}

.app-main-nav {
  border-radius: 12px;
  gap: 0.3rem;
  padding: 0.3rem;
}

.navbar .nav-link {
  border-radius: 10px;
  font-size: 0.98rem;
  min-height: 2.6rem;
  padding: 0.62rem 0.88rem;
}

.theme-toggle,
.toggle-icon,
.navbar-toggler {
  border-radius: 10px;
  height: 2.6rem;
  min-width: 2.6rem;
}

.tool-hero-side {
  display: grid;
  gap: 0.75rem;
  min-width: min(100%, 280px);
  position: relative;
  z-index: 2;
}

.tool-hero-stat {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fff;
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
}

.tool-hero-stat span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-hero-stat strong {
  font-size: 1.55rem;
  line-height: 1;
}

.planner-shell,
.overview-shell {
  max-width: 1320px;
}

.planner-hero,
.overview-hero {
  align-items: end;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.92), rgba(37, 99, 235, 0.68)),
    var(--surface-muted);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.38fr);
  min-height: 260px;
}

.planner-list-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.planner-outline-card {
  display: grid;
  gap: 1.15rem;
}

.planner-outline-head,
.planner-outline-actions,
.overview-copy-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

.planner-outline-meta,
.planner-outline-tags,
.planner-tag-list,
.planner-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.planner-outline-head h2,
.overview-card h2 {
  color: var(--text);
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  font-weight: 840;
  margin: 0;
}

.planner-outline-world,
.planner-outline-parent {
  color: var(--muted);
  font-weight: 720;
}

.planner-outline-status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 820;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
}

.planner-outline-status.is-active {
  background: color-mix(in srgb, #0f766e 18%, var(--surface));
  border: 1px solid color-mix(in srgb, #0f766e 40%, var(--border));
  color: color-mix(in srgb, #0f766e 80%, white);
}

.planner-outline-status.is-hidden {
  background: color-mix(in srgb, #dc2626 12%, var(--surface));
  border: 1px solid color-mix(in srgb, #dc2626 34%, var(--border));
  color: color-mix(in srgb, #dc2626 78%, white);
}

.planner-outline-stats {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.planner-outline-stats span,
.planner-outline-tag-group span {
  color: var(--muted);
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.planner-outline-stats strong,
.planner-outline-tag-group strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 780;
}

.planner-outline-tag-group {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex: 1 1 260px;
  padding: 0.9rem 1rem;
}

.planner-outline-tag-group-enemy strong {
  color: color-mix(in srgb, #dc2626 72%, var(--text));
}

.planner-empty-state {
  justify-items: center;
  padding: 3rem clamp(1.2rem, 4vw, 3rem);
  text-align: center;
}

.planner-empty-icon {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  font-size: 2rem;
  height: 4rem;
  justify-content: center;
  margin-bottom: 1rem;
  width: 4rem;
}

.planner-setup-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.planner-chip-row,
.planner-tag-list {
  margin-top: 1rem;
}

.overview-panel {
  display: grid;
  gap: 1rem;
}

.overview-tab-nav {
  gap: 0.5rem;
}

.overview-tab-nav .nav-link {
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-weight: 760;
  padding: 0.72rem 1rem;
}

.overview-tab-nav .nav-link.active {
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, white);
  color: #fff;
}

.overview-alert {
  font-size: 1rem;
  margin: 0;
}

.overview-copy-stack {
  display: grid;
  gap: 1rem;
}

.overview-card {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 0;
  padding: 1.1rem 1.15rem 1.2rem;
}

.overview-card small,
.overview-copy-hint {
  color: var(--muted);
  display: block;
  margin-top: 0.25rem;
}

.overview-sample {
  border: 1px solid rgba(153, 153, 102, 0.65);
  border-radius: 12px;
  margin-top: 0.85rem;
  overflow: hidden;
}

.overview-scroll {
  max-height: 80vh;
  overflow: auto;
}

.overview-source-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overview-source-card {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: grid;
  gap: 0.65rem;
  padding: 1.2rem;
}

.overview-source-card h2 {
  font-size: 1.25rem;
  margin: 0;
}

.overview-source-card p {
  color: var(--muted);
  margin: 0;
}

.overview-source-link {
  color: var(--accent);
  font-weight: 740;
  overflow-wrap: anywhere;
}

#sidebar-wrapper {
  min-width: 14.75rem;
  padding: 0.5rem 0.55rem 0.7rem;
  width: 14.75rem;
}

#sidebar-wrapper .sidebar-heading {
  font-size: 0.72rem;
  min-height: 20px;
  padding-bottom: 0.45rem;
}

.app-sidebar-section-label {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  padding-top: 0.55rem;
}

#sidebar-wrapper .list-group-item,
#sidebar-wrapper .list-group-item.bg-light,
.navbar .dropdown-menu .list-group-item.bg-light {
  border-radius: 7px !important;
  min-height: 2.28rem;
  padding: 0.42rem 0.5rem;
}

.app-sidebar-nav .list-group-item i {
  border-radius: 6px;
  flex-basis: 1.5rem;
  height: 1.5rem;
  width: 1.5rem;
}

.home-shell,
.command-shell {
  display: grid;
  gap: 1rem;
  max-width: 1320px;
  padding: 0 0 2.2rem;
}

.home-hero,
.command-hero,
.home-panel,
.home-stat-card,
.command-card,
.card,
.modal-content {
  border-radius: 8px;
}

.home-panel,
.home-stat-card,
.command-card,
.card,
.modal-content {
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.12);
}

:root[data-theme="dark"] .home-panel,
:root[data-theme="dark"] .home-stat-card,
:root[data-theme="dark"] .command-card,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .modal-content {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
}

.home-panel,
.command-card {
  padding: clamp(1.15rem, 2.4vw, 1.85rem);
}

.home-panel h2,
.command-hero h1,
.tool-hub-title {
  letter-spacing: 0;
}

.home-panel-copy,
.home-panel-copy-lead,
.home-lead,
.command-lead {
  line-height: 1.6;
}

.btn,
.btn-lg,
.btn-sm {
  border-radius: 10px !important;
  font-weight: 760;
}

.btn-lg {
  min-height: 2.95rem;
  padding: 0.7rem 1rem;
}

.form-control,
.form-select,
select,
select.form-control,
.select-pure__select,
.select-pure__autocomplete {
  border-radius: 12px !important;
  min-height: 3rem;
  padding: 0.72rem 0.92rem;
}

textarea.form-control {
  min-height: 8.5rem;
}

.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table > :not(caption) > * > * {
  border-bottom-width: 1px;
  padding: 0.85rem 0.8rem;
}

.table thead th {
  background: var(--surface-muted) !important;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table tbody tr:hover > * {
  background: color-mix(in srgb, var(--surface-muted) 72%, transparent);
}

.alert {
  border-radius: 12px;
}

@media (max-width: 991.98px) {
  .navbar.navbar-light.bg-light {
    grid-template-columns: minmax(0, 1fr);
  }

  body {
    padding-top: 122px;
  }

  .app-header-brand-panel {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    justify-content: center;
    padding: 0.75rem 0.9rem 0.45rem;
  }

  .app-header-main {
    padding: 0.7rem 0.85rem;
  }

  .app-page-shell,
  #page-content-wrapper > .container-fluid {
    padding-left: 0.8rem !important;
    padding-right: 0.8rem !important;
  }

  .navbar.navbar-light.bg-light,
  #wrapper.has-app-sidebar #page-content-wrapper .navbar.navbar-light.bg-light {
    border-radius: 0;
    margin-top: 0;
    max-width: 100%;
    min-height: 64px;
    padding: 0.75rem 0.85rem;
    width: 100%;
  }

  .app-topbar {
    gap: 0.6rem;
  }

  .app-topbar-left,
  .app-topbar-right {
    width: 100%;
  }

  .app-topbar-right {
    justify-content: space-between;
  }

  .app-topbar-menu span,
  .app-topbar-brand span {
    font-size: 0.92rem;
  }

  .home-shell,
  .command-shell {
    gap: 0.85rem;
  }
}

/* Final shell fix: keep header visible, keep sidebar below it */
:root {
  --app-header-height: 76px;
}

body {
  padding-top: 0 !important;
}

#wrapper {
  min-height: 100vh;
  padding-top: var(--app-header-height);
}

.app-global-header {
  left: 0;
  position: fixed !important;
  right: 0;
  top: 0;
  z-index: 1200;
}

.app-page-shell {
  padding-top: 1rem !important;
}

@media (min-width: 992px) {
  #wrapper.has-app-sidebar #sidebar-wrapper {
    height: calc(100vh - var(--app-header-height)) !important;
    position: fixed !important;
    top: var(--app-header-height) !important;
    z-index: 1100;
  }

  #wrapper.has-app-sidebar #page-content-wrapper {
    margin-top: 0 !important;
  }
}

@media (max-width: 991.98px) {
  :root {
    --app-header-height: 118px;
  }

  body {
    padding-top: 0 !important;
  }

  #wrapper {
    min-height: 100vh;
    padding-top: var(--app-header-height);
  }
}
