*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: #e5e7eb;
  /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
     tab-size: 4;
  /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  letter-spacing: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}

:root {
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --border: #E2E8F0;
  --border-2: #CBD5E1;
  --text: #0F172A;
  --text-2: #475569;
  --text-3: #94A3B8;
  --primary: #0F4C81;
  --primary-2: #0A3A66;
  --primary-soft: #E0EAF3;
  --accent: #0D9488;
  --accent-soft: #CCFBF1;
  --success: #059669;
  --success-soft: #D1FAE5;
  --warning: #D97706;
  --warning-soft: #FEF3C7;
  --danger: #DC2626;
  --danger-soft: #FEE2E2;
  --r: 6px;
  --r-lg: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1), 0 4px 12px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.container {
  width: 100%;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }
}

/* LOGO */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), #1E6BAE);
  border-radius: 7px;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(15, 76, 129, 0.3);
}

/* BUTTONS */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r);
  font-weight: 500;
  font-size: 13px;
  border: 1px solid transparent;
  transition: all 0.12s;
  line-height: 1.2;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-2);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-2);
}

.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--text-3);
}

.btn-ghost {
  color: var(--text-2);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--danger-soft);
}

.btn-danger:hover {
  background: var(--danger-soft);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 11px 18px;
  font-size: 14px;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* INPUTS */

.\!input {
  width: 100% !important;
  padding: 9px 12px !important;
  border: 1px solid var(--border-2) !important;
  border-radius: var(--r) !important;
  background: var(--surface) !important;
  font-size: 13.5px !important;
  transition: all 0.12s !important;
}

.input, .select, .textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 13.5px;
  transition: all 0.12s;
}

.\!input:focus {
  outline: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1) !important;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

.textarea {
  resize: vertical;
  min-height: 80px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.field label .req {
  color: var(--danger);
}

.help {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 5px;
}

.input-wrap {
  position: relative;
}

.input-wrap .ico-prefix {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.input-wrap input {
  padding-left: 36px;
}

/* BADGES */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.3;
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-ok {
  color: var(--success);
  background: var(--success-soft);
}

.badge-warn {
  color: var(--warning);
  background: var(--warning-soft);
}

.badge-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.badge-info {
  color: var(--primary);
  background: var(--primary-soft);
}

/* Type tags (40x40 square with letter code + icon) */

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.tag.tag-dom {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: transparent;
}

.tag.tag-host {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: transparent;
}

.tag.tag-app {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: transparent;
}

.tag.tag-seo {
  color: var(--success);
  background: var(--success-soft);
  border-color: transparent;
}

.tag.tag-social {
  color: #8B5CF6;
  background: #EDE9FE;
  border-color: transparent;
}

/* APP SHELL */

.app {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
}

.sidebar-head {
  padding: 6px 8px 18px 8px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-section {
  padding: 16px 10px 6px 10px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.1s;
  line-height: 1.2;
}

.nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-link.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-link .ico {
  color: currentColor;
}

.nav-link .nav-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
}

.nav-link.alert .nav-count {
  background: var(--danger);
  color: white;
  padding: 1px 7px;
  border-radius: 9999px;
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px 6px 4px 6px;
  border-top: 1px solid var(--border);
}

.user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px;
  border-radius: var(--r);
  cursor: pointer;
}

.user:hover {
  background: var(--surface-2);
}

.avatar {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary), #1E6BAE);
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11.5px;
  flex-shrink: 0;
}

.user-info {
  min-width: 0;
  flex: 1;
}

.user-info .name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info .role {
  font-size: 11px;
  color: var(--text-3);
}

/* MAIN */

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 58px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
}

.crumbs strong {
  color: var(--text);
  font-weight: 600;
}

.crumbs .sep {
  color: var(--text-3);
}

.topbar-spacer {
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--r);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.icon-btn .ping {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.content {
  flex: 1;
  padding: 28px 32px;
  overflow: auto;
}

.content-wrap {
  max-width: 1240px;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-head h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.page-head .page-sub {
  color: var(--text-2);
  font-size: 13.5px;
  margin-top: 3px;
}

/* HERO ALERT */

.hero-alert {
  background: linear-gradient(135deg, var(--danger-soft) 0%, #FECACA 100%);
  border: 1px solid #FCA5A5;
  border-radius: var(--r-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.hero-alert .ha-ico {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: var(--r);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--danger);
  flex-shrink: 0;
}

.hero-alert .ha-text {
  flex: 1;
}

.hero-alert .ha-title {
  font-weight: 600;
  color: #7F1D1D;
  font-size: 14px;
}

.hero-alert .ha-sub {
  font-size: 12.5px;
  color: #991B1B;
  margin-top: 2px;
}

/* STAT CARDS */

.stat-row {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stat {
  flex: 1;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.stat .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.indigo {
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-icon.green {
  background: var(--success-soft);
  color: var(--success);
}

.stat-icon.amber {
  background: var(--warning-soft);
  color: var(--warning);
}

.stat-icon.red {
  background: var(--danger-soft);
  color: var(--danger);
}

.stat-body {
  min-width: 0;
  flex: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
  line-height: 1.3;
}

.stat-value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 4px;
  line-height: 1.1;
  color: var(--text);
}

.stat-foot {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-foot.up {
  color: var(--success);
}

.stat-foot.down {
  color: var(--danger);
}

/* CARD */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}

.card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-head h2 {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-head .card-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.card-body {
  padding: 4px 0;
}

.card-foot {
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* SERVICE ROW */

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.08s;
}

.row:last-child {
  border-bottom: 0;
}

.row:hover {
  background: var(--surface-2);
}

.row-tag {
  width: 40px;
  flex-shrink: 0;
}

.row-name {
  flex: 1;
  min-width: 0;
}

.row-name .n {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-name .s {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-name .obs {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
}

.row-name .obs .ico {
  color: var(--text-3);
  flex-shrink: 0;
}

.row-type {
  width: 110px;
  flex-shrink: 0;
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 500;
}

.row-date {
  width: 140px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.3;
}

.row-date .d {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.row-date .d .ico {
  color: var(--text-3);
}

.row-date .s {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 3px;
}

.row-status {
  width: 150px;
  flex-shrink: 0;
}

.row-actions {
  width: 130px;
  flex-shrink: 0;
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

/* TOOLBAR */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
}

.search {
  flex: 1;
  min-width: 220px;
  max-width: 360px;
  position: relative;
}

.search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  font-size: 13px;
  background: var(--surface);
}

.search .ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--surface);
}

.chip:hover {
  background: var(--surface-2);
  color: var(--text);
}

.chip.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

/* FILTER TABS */

.filter-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 18px 0 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.ftab {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1.2;
}

.ftab:hover {
  color: var(--text);
}

.ftab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.ftab .ftab-c {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-3);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 9999px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
}

/* PAGER */

.pager {
  display: flex;
  align-items: center;
  gap: 3px;
}

.pager button, .pager a {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: var(--r);
  color: var(--text-2);
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.pager button:hover, .pager a:hover {
  background: var(--surface);
  color: var(--text);
}

.pager button.current, .pager a.current {
  background: var(--text);
  color: white;
}

.pager button:disabled {
  opacity: 0.5;
  cursor: default;
}

.pager button:disabled:hover {
  background: transparent;
  color: var(--text-2);
}

/* MODAL */

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 300;
  backdrop-filter: blur(2px);
}

.backdrop.open {
  display: flex;
}

.\!modal {
  background: var(--surface) !important;
  border-radius: var(--r-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  width: 100% !important;
  max-width: 560px !important;
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.\!modal > form,
  .\!modal > div:not(.modal-head) {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  overflow-y: auto !important;
  min-height: 0 !important;
  scrollbar-width: thin !important;
  scrollbar-color: var(--border-2) transparent !important;
}

.modal > form,
  .modal > div:not(.modal-head) {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  overflow-y: auto !important;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}

.\!modal > form,
  .\!modal > div:not(.modal-head) {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  overflow-y: auto !important;
  min-height: 0 !important;
  scrollbar-width: thin !important;
  scrollbar-color: var(--border-2) transparent !important;
}

.\!modal > form::-webkit-scrollbar,
  .\!modal > div:not(.modal-head)::-webkit-scrollbar {
  width: 6px !important;
}

.modal > form::-webkit-scrollbar,
  .modal > div:not(.modal-head)::-webkit-scrollbar {
  width: 6px;
}

.\!modal > form::-webkit-scrollbar,
  .\!modal > div:not(.modal-head)::-webkit-scrollbar {
  width: 6px !important;
}

.\!modal > form::-webkit-scrollbar-track,
  .\!modal > div:not(.modal-head)::-webkit-scrollbar-track {
  background: transparent !important;
}

.modal > form::-webkit-scrollbar-track,
  .modal > div:not(.modal-head)::-webkit-scrollbar-track {
  background: transparent;
}

.\!modal > form::-webkit-scrollbar-track,
  .\!modal > div:not(.modal-head)::-webkit-scrollbar-track {
  background: transparent !important;
}

.\!modal > form::-webkit-scrollbar-thumb,
  .\!modal > div:not(.modal-head)::-webkit-scrollbar-thumb {
  background: var(--border-2) !important;
  border-radius: 10px !important;
}

.modal > form::-webkit-scrollbar-thumb,
  .modal > div:not(.modal-head)::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 10px;
}

.\!modal > form::-webkit-scrollbar-thumb,
  .\!modal > div:not(.modal-head)::-webkit-scrollbar-thumb {
  background: var(--border-2) !important;
  border-radius: 10px !important;
}

.\!modal > form::-webkit-scrollbar-thumb:hover,
  .\!modal > div:not(.modal-head)::-webkit-scrollbar-thumb:hover {
  background: var(--text-3) !important;
}

.modal > form::-webkit-scrollbar-thumb:hover,
  .modal > div:not(.modal-head)::-webkit-scrollbar-thumb:hover {
  background: var(--text-3);
}

.\!modal > form::-webkit-scrollbar-thumb:hover,
  .\!modal > div:not(.modal-head)::-webkit-scrollbar-thumb:hover {
  background: var(--text-3) !important;
}

.modal-head {
  padding: 18px 22px !important;
  border-bottom: 1px solid var(--border) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.modal-head h2 {
  font-size: 16px !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
}

.modal-head .sub {
  font-size: 12px !important;
  color: var(--text-3) !important;
  margin-top: 2px !important;
}

.modal-body {
  padding: 22px !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
  flex: none !important;
}

.modal-foot {
  padding: 14px 22px !important;
  border-top: 1px solid var(--border) !important;
  background: var(--surface-2) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.row-2 {
  display: flex;
  gap: 12px;
}

.row-2 > * {
  flex: 1;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.type-opt {
  padding: 10px 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.1s;
  text-align: left;
  background: var(--surface);
  min-width: 0;
  /* Allow shrinking in grid */
}

.type-opt:hover {
  border-color: var(--text-3);
}

.type-opt.sel {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.type-opt .t-h {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.type-opt .t-d {
  font-size: 10.5px;
  color: var(--text-3);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.type-opt .t-ico {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.type-opt.sel .t-ico {
  background: white;
  color: var(--primary);
}

.type-opt.status-healthy.sel {
  border-color: var(--success);
  background: var(--success-soft);
}

.type-opt.status-healthy.sel .t-ico {
  color: var(--success);
}

.type-opt.status-warning.sel {
  border-color: var(--warning);
  background: var(--warning-soft);
}

.type-opt.status-warning.sel .t-ico {
  color: var(--warning);
}

.type-opt.status-critical.sel {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.type-opt.status-critical.sel .t-ico {
  color: var(--danger);
}

.computed {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px dashed var(--border-2);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  gap: 12px;
}

.computed .ico {
  color: var(--primary);
  flex-shrink: 0;
}

.computed .c-body {
  flex: 1;
}

.computed .c-l {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  font-weight: 600;
}

.computed .c-v {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}

/* PROGRESS BAR */

.pbar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}

.pbar > div {
  height: 100%;
  border-radius: 3px;
}

/* TIMELINE */

.timeline {
  padding: 6px 0;
}

.ti {
  display: flex;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
}

.ti:last-child {
  border-bottom: 0;
}

.ti-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  flex-shrink: 0;
}

.ti-dot.ok {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}

.ti-dot.warn {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: transparent;
}

.ti-dot.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
}

.ti-dot.info {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: transparent;
}

.ti-body {
  flex: 1;
  min-width: 0;
}

.ti-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.ti-meta {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}

/* DETAIL VIEW */

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.kv-list {
  padding: 6px 0;
}

.kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  gap: 12px;
}

.kv:last-child {
  border-bottom: 0;
}

.kv .k {
  color: var(--text-2);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kv .k .ico {
  color: var(--text-3);
}

.kv .v {
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

.kv .v.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

/* LOGIN (Isolated classes from mockup) */

.login-box {
  width: 100%;
  max-width: 400px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px;
}

.login-card .logo {
  margin-bottom: 28px;
}

.login-card h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}

.login-card .sub {
  color: var(--text-2);
  font-size: 13.5px;
  margin-bottom: 26px;
}

.login-card .foot {
  margin-top: 20px;
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.5;
}

.login-card .foot .ico {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
}

.login-meta {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.collapse {
  visibility: collapse;
}

.static {
  position: static;
}

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.right-0 {
  right: 0px;
}

.top-\[40px\] {
  top: 40px;
}

.z-\[100\] {
  z-index: 100;
}

.z-\[110\] {
  z-index: 110;
}

.mb-\[20px\] {
  margin-bottom: 20px;
}

.mb-\[6px\] {
  margin-bottom: 6px;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-\[10px\] {
  margin-top: 10px;
}

.mt-\[16px\] {
  margin-top: 16px;
}

.mt-\[2px\] {
  margin-top: 2px;
}

.mt-\[4px\] {
  margin-top: 4px;
}

.mt-\[5px\] {
  margin-top: 5px;
}

.mt-\[6px\] {
  margin-top: 6px;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.block {
  display: block;
}

.flex {
  display: flex;
}

.table {
  display: table;
}

.grid {
  display: grid;
}

.hidden {
  display: none;
}

.h-\[32px\] {
  height: 32px;
}

.max-h-\[350px\] {
  max-height: 350px;
}

.max-h-\[400px\] {
  max-height: 400px;
}

.w-\[120px\] {
  width: 120px;
}

.w-\[150px\] {
  width: 150px;
}

.w-\[240px\] {
  width: 240px;
}

.w-\[300px\] {
  width: 300px;
}

.w-\[320px\] {
  width: 320px;
}

.w-full {
  width: 100%;
}

.min-w-0 {
  min-width: 0px;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-shrink {
  flex-shrink: 1;
}

.shrink-0 {
  flex-shrink: 0;
}

.border-collapse {
  border-collapse: collapse;
}

.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.cursor-pointer {
  cursor: pointer;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-end {
  align-items: flex-end;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-\[10px\] {
  gap: 10px;
}

.gap-\[12px\] {
  gap: 12px;
}

.gap-\[16px\] {
  gap: 16px;
}

.gap-\[8px\] {
  gap: 8px;
}

.space-y-\[10px\] > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(10px * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(10px * var(--tw-space-y-reverse));
}

.space-y-\[20px\] > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(20px * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(20px * var(--tw-space-y-reverse));
}

.overflow-auto {
  overflow: auto;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rounded {
  border-radius: 0.25rem;
}

.rounded-\[6px\] {
  border-radius: 6px;
}

.rounded-full {
  border-radius: 9999px;
}

.rounded-r {
  border-radius: 6px;
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}

.border {
  border-width: 1px;
}

.border-b {
  border-bottom-width: 1px;
}

.border-t {
  border-top-width: 1px;
}

.border-dashed {
  border-style: dashed;
}

.border-none {
  border-style: none;
}

.border-border {
  --tw-border-opacity: 1;
  border-color: rgb(226 232 240 / var(--tw-border-opacity, 1));
}

.border-border-2 {
  --tw-border-opacity: 1;
  border-color: rgb(203 213 225 / var(--tw-border-opacity, 1));
}

.bg-danger {
  --tw-bg-opacity: 1;
  background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
}

.bg-danger-soft {
  --tw-bg-opacity: 1;
  background-color: rgb(254 226 226 / var(--tw-bg-opacity, 1));
}

.bg-success {
  --tw-bg-opacity: 1;
  background-color: rgb(5 150 105 / var(--tw-bg-opacity, 1));
}

.bg-success-soft {
  --tw-bg-opacity: 1;
  background-color: rgb(209 250 229 / var(--tw-bg-opacity, 1));
}

.bg-surface {
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
}

.bg-surface-2 {
  --tw-bg-opacity: 1;
  background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1));
}

.bg-transparent {
  background-color: transparent;
}

.bg-warning {
  --tw-bg-opacity: 1;
  background-color: rgb(217 119 6 / var(--tw-bg-opacity, 1));
}

.p-\[10px_16px\] {
  padding: 10px 16px;
}

.p-\[12px\] {
  padding: 12px;
}

.p-\[12px_14px\] {
  padding: 12px 14px;
}

.p-\[12px_16px\] {
  padding: 12px 16px;
}

.p-\[16px\] {
  padding: 16px;
}

.p-\[16px_20px\] {
  padding: 16px 20px;
}

.p-\[20px\] {
  padding: 20px;
}

.p-\[40px\] {
  padding: 40px;
}

.px-\[12px\] {
  padding-left: 12px;
  padding-right: 12px;
}

.px-\[6px\] {
  padding-left: 6px;
  padding-right: 6px;
}

.px-\[8px\] {
  padding-left: 8px;
  padding-right: 8px;
}

.py-0 {
  padding-top: 0px;
  padding-bottom: 0px;
}

.py-\[2px\] {
  padding-top: 2px;
  padding-bottom: 2px;
}

.pt-4 {
  padding-top: 1rem;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-\[10\.5px\] {
  font-size: 10.5px;
}

.text-\[10px\] {
  font-size: 10px;
}

.text-\[11\.5px\] {
  font-size: 11.5px;
}

.text-\[11px\] {
  font-size: 11px;
}

.text-\[12\.5px\] {
  font-size: 12.5px;
}

.text-\[12px\] {
  font-size: 12px;
}

.text-\[13px\] {
  font-size: 13px;
}

.text-\[14px\] {
  font-size: 14px;
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.uppercase {
  text-transform: uppercase;
}

.tracking-\[0\.05em\] {
  letter-spacing: 0.05em;
}

.text-danger {
  --tw-text-opacity: 1;
  color: rgb(220 38 38 / var(--tw-text-opacity, 1));
}

.text-primary {
  --tw-text-opacity: 1;
  color: rgb(15 76 129 / var(--tw-text-opacity, 1));
}

.text-success {
  --tw-text-opacity: 1;
  color: rgb(5 150 105 / var(--tw-text-opacity, 1));
}

.text-text {
  --tw-text-opacity: 1;
  color: rgb(15 23 42 / var(--tw-text-opacity, 1));
}

.text-text-2 {
  --tw-text-opacity: 1;
  color: rgb(71 85 105 / var(--tw-text-opacity, 1));
}

.text-text-3 {
  --tw-text-opacity: 1;
  color: rgb(148 163 184 / var(--tw-text-opacity, 1));
}

.underline {
  text-decoration-line: underline;
}

.shadow-lg {
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.outline-none {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .stat-row {
    flex-direction: column;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .row {
    flex-wrap: wrap;
  }

  .row-type, .row-date, .row-status {
    width: auto;
  }
}

/* TAILWIND UTILITIES FALLBACKS */

.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.z-100 {
  z-index: 100;
}

.z-110 {
  z-index: 110;
}

/* ============================================================
   MELHORIAS ADICIONADAS (SIDEBAR FIXA, MOBILE & MODAIS)
   ============================================================ */

/* Sidebar Fixa e Overlay */

.sidebar {
  position: fixed !important;
  top: 0;
  left: 0;
  height: 100vh !important;
  z-index: 200 !important;
  transition: transform 0.3s ease;
}

.main {
  margin-left: 232px;
  transition: margin-left 0.3s ease;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 150;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.open {
  display: block;
  opacity: 1;
}

.btn-menu {
  display: none;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  color: var(--text-2);
  margin-right: 8px;
}

.btn-menu:hover {
  background: var(--surface-2);
}

/* Responsividade Mobile (Prioridade de Nome e Quebra de Linhas) */

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 12px 0 32px rgba(15, 23, 42, 0.1);
  }

  .main {
    margin-left: 0;
  }

  .btn-menu {
    display: inline-flex;
  }

  /* Linhas das Tabelas/Listas no Mobile */

  .row {
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 16px !important;
  }

  .row-name {
    flex: 1 !important;
    min-width: 0 !important;
    margin-right: 0 !important;
  }

  .row-name .n {
    white-space: normal !important;
    word-break: break-word !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
  }

  .row-type {
    display: none !important;
  }

  .row-date, .row-status {
    width: auto !important;
    flex: 1 !important;
    min-width: 120px !important;
    margin-top: 4px !important;
  }

  .row-actions {
    width: 100% !important;
    justify-content: flex-start !important;
    margin-top: 10px !important;
    padding-top: 10px !important;
    border-top: 1px solid var(--border) !important;
  }

  .page-head {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .page-head .btn {
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  .topbar-actions .icon-btn:not(#notif-btn), #search-container {
    display: none !important;
  }
}

.last\:border-0:last-child {
  border-width: 0px;
}

.focus-within\:border-primary:focus-within {
  --tw-border-opacity: 1;
  border-color: rgb(15 76 129 / var(--tw-border-opacity, 1));
}

.focus-within\:ring-2:focus-within {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.focus-within\:ring-primary-soft:focus-within {
  --tw-ring-opacity: 1;
  --tw-ring-color: rgb(224 234 243 / var(--tw-ring-opacity, 1));
}

.hover\:bg-surface-2:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(248 250 252 / var(--tw-bg-opacity, 1));
}

.hover\:underline:hover {
  text-decoration-line: underline;
}
