:root {
  --app-bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e6ebf2;
  --text: #1f2937;
  --muted: #6b7280;

  --sidebar-bg: #182435;
  --sidebar-bg-2: #1f2d40;
  --sidebar-text: rgba(255, 255, 255, 0.88);
  --sidebar-muted: rgba(255, 255, 255, 0.58);
  --sidebar-active: #3b82f6;
  --sidebar-hover: rgba(255, 255, 255, 0.08);

  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);

  --sidebar-width: 260px;
  --topbar-height: 72px;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--app-bg);
  color: var(--text);
}

a {
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 1030;
  box-shadow: 4px 0 22px rgba(0, 0, 0, 0.14);
}

.app-brand {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.2px;
}

.app-brand-mark {
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 4px;
  margin-right: 10px;
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.18);
}

.app-brand-logo {
  display: block;
  width: auto;
  max-width: 205px;
  max-height: 54px;
  object-fit: contain;
}

.app-sidebar-body {
  padding: 18px 14px;
  overflow-y: auto;
  flex: 1;
}

.app-nav-section {
  margin-bottom: 24px;
}

.app-nav-label {
  color: var(--sidebar-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 0 12px;
  margin-bottom: 10px;
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sidebar-text);
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  transition: 0.2s ease;
}

.app-nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.app-nav-link.active {
  background: linear-gradient(135deg, var(--sidebar-active), #60a5fa);
  color: #fff;
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.28);
}

.app-nav-link.disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.app-nav-icon {
  width: 18px;
  text-align: center;
  font-size: 0.95rem;
}

.app-main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1020;
}

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

.app-menu-toggle {
  border: 0;
  background: transparent;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #374151;
  display: none;
}

.app-menu-toggle:hover {
  background: #eef2f7;
}

.app-topbar-title {
  font-weight: 700;
  color: #111827;
}

.app-topbar-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
}

.app-content {
  padding: 28px 28px 36px;
}

.page-head {
  margin-bottom: 24px;
}

.page-title {
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 800;
  margin: 0 0 6px;
  color: #111827;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
}

.card-clean {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-clean-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-clean-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: #111827;
}

.card-title-icon {
  align-items: center;
  background: linear-gradient(135deg, #2f6df6, #12a7e8);
  border-radius: 10px;
  color: #fff;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  margin-right: 10px;
  width: 30px;
}

.locked-field {
  background: #eef5ff !important;
  border-color: #9ec5fe !important;
  color: #1f3b68 !important;
  cursor: not-allowed;
}

.document-row {
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 0;
}

.document-row:last-child {
  border-bottom: 0;
}

.card-clean-body {
  padding: 22px;
}

.kpi-card {
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  min-height: 132px;
}

.kpi-card .card-clean-body {
  padding: 22px;
}

.kpi-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.92;
  margin-bottom: 10px;
}

.kpi-card-value {
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
}

.kpi-card-icon {
  position: absolute;
  right: 18px;
  top: 18px;
  font-size: 2.6rem;
  opacity: 0.18;
}

.kpi-blue {
  background: linear-gradient(135deg, #3b82f6, #38bdf8);
}

.kpi-green {
  background: linear-gradient(135deg, #22c55e, #34d399);
}

.kpi-orange {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.kpi-red {
  background: linear-gradient(135deg, #ef4444, #fb923c);
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  gap: 12px;
}

.metric-row:last-child {
  margin-bottom: 0;
}

.metric-label {
  font-weight: 600;
  color: #374151;
}

.metric-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: #111827;
}

.metric-value-small {
  font-size: 1rem;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.info-item {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.info-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 6px;
}

.info-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
  white-space: pre-wrap;
}

.info-value-block {
  white-space: pre-wrap;
  color: #111827;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

.table-clean {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.table-clean thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 800;
  padding: 14px 18px;
  background: #fafbfd;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.table-clean tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table-clean tbody tr:hover {
  background: #fafcff;
}

.table-clean tbody tr:last-child td {
  border-bottom: 0;
}

.table-title {
  font-weight: 700;
  color: #111827;
}

.badge-pill-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge-pending {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-progress {
  background: #ede9fe;
  color: #7c3aed;
}

.badge-completed {
  background: #dcfce7;
  color: #15803d;
}

.badge-paused {
  background: #cffafe;
  color: #0e7490;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-priority-high {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-priority-medium {
  background: #fff7ed;
  color: #c2410c;
}

.badge-priority-low {
  background: #ecfeff;
  color: #0f766e;
}

.btn-soft-primary {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.btn-soft-primary:hover {
  background: #dbeafe;
  color: #1e40af;
}

.btn-soft-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.btn-soft-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-icon-sm {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.btn-action-primary,
.btn-action-warning,
.btn-action-success,
.btn-action-info {
  border: 0;
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-action-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.btn-action-warning {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.btn-action-success {
  background: linear-gradient(135deg, #15803d, #22c55e);
}

.btn-action-info {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
}

.btn-action-primary:hover,
.btn-action-warning:hover,
.btn-action-success:hover,
.btn-action-info:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.16);
}

.btn-action-primary:disabled,
.btn-action-warning:disabled,
.btn-action-success:disabled,
.btn-action-info:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-action-header {
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-action-lg {
  min-height: 50px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.detail-shell-body {
  padding: 24px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.detail-header-main {
  min-width: 0;
}

.detail-header-code {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.detail-header-title {
  align-items: center;
  display: flex;
  gap: 9px;
  font-size: 1.6rem;
  line-height: 1.15;
  font-weight: 800;
  color: #111827;
  margin-bottom: 12px;
}

.detail-header-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-tabs-wrap {
  margin-bottom: 22px;
}

.detail-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-tab-btn {
  border: 1px solid #dbe4f0;
  background: #f8fafc;
  color: #475569;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  transition: 0.15s ease;
}

.detail-tab-btn:hover {
  background: #eef4ff;
  color: #1d4ed8;
}

.detail-tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.18);
}

.tab-pane-custom {
  display: none;
}

.tab-pane-custom.active {
  display: block;
}

.info-row-modern {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.info-row-modern:first-child {
  padding-top: 0;
}

.info-row-modern:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-row-modern-left {
  flex: 1;
  min-width: 0;
}

.info-row-modern-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 6px;
}

.info-row-modern-value {
  color: #111827;
  font-weight: 700;
  word-break: break-word;
  white-space: pre-wrap;
}

.action-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.comment-card {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.comment-card:last-child {
  margin-bottom: 0;
}

.comment-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.comment-card-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #111827;
}

.comment-card-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.comment-card-date {
  font-size: 0.82rem;
  color: var(--muted);
}

.comment-card-text {
  white-space: pre-wrap;
  color: #374151;
}

.timeline-feed {
  position: relative;
}

.timeline-item {
  position: relative;
  padding-left: 58px;
  margin-bottom: 18px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 38px;
  bottom: -20px;
  width: 2px;
  background: #d9e2ef;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}

.timeline-title {
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
}

.timeline-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.timeline-payload {
  margin: 0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  font-size: 0.84rem;
  color: #334155;
  white-space: pre-wrap;
}

.filters-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.filters-actions {
  display: flex;
  align-items: end;
}

.filter-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 8px;
}

.modern-textarea {
  resize: vertical;
  min-height: 110px;
  border-radius: 14px;
  border: 1px solid #dbe4f0;
  box-shadow: none;
}

.modal-clean {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.2);
}

.modal-clean-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 22px;
}

.modal-clean-body {
  padding: 22px;
}

.modal-clean-footer {
  border-top: 1px solid var(--border);
  padding: 16px 22px;
}

.empty-state {
  padding: 32px 18px;
  text-align: center;
  color: var(--muted);
}

.login-page-modern {
  background:
    radial-gradient(circle at 14% 18%, rgba(59, 130, 246, .32), transparent 28%),
    radial-gradient(circle at 76% 12%, rgba(6, 182, 212, .22), transparent 26%),
    linear-gradient(135deg, #0f172a 0%, #17243b 52%, #edf4ff 52%, #f8fbff 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.detail-title-preventive-icon {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1rem;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.login-shell {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr);
  min-height: 100vh;
  padding: 34px;
}

.login-showcase {
  align-items: center;
  color: #fff;
  display: flex;
  padding: 36px;
  position: relative;
}

.login-showcase::before {
  background:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(90deg, #000, transparent 78%);
  opacity: .5;
  position: absolute;
}

.login-showcase-inner {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.login-product-pill {
  align-items: center;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  gap: 10px;
  letter-spacing: .08em;
  padding: 9px 14px;
  text-transform: uppercase;
}

.login-product-pill span {
  background: #60a5fa;
  border-radius: 8px;
  box-shadow: 0 0 0 8px rgba(96, 165, 250, .16);
  height: 12px;
  width: 12px;
}

.login-showcase h1 {
  font-size: clamp(2.45rem, 5vw, 5.5rem);
  font-weight: 950;
  letter-spacing: -.06em;
  line-height: .94;
  margin: 30px 0 22px;
  max-width: 760px;
}

.login-showcase p {
  color: rgba(255,255,255,.78);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.75;
  max-width: 640px;
}

.login-feature-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 42px;
}

.login-feature-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(0,0,0,.16);
  min-height: 154px;
  padding: 18px;
}

.login-feature-card i {
  align-items: center;
  background: rgba(59,130,246,.25);
  border-radius: 16px;
  color: #bfdbfe;
  display: inline-flex;
  font-size: 1.2rem;
  height: 44px;
  justify-content: center;
  margin-bottom: 18px;
  width: 44px;
}

.login-feature-card strong,
.login-feature-card span {
  display: block;
}

.login-feature-card strong {
  font-size: 1.05rem;
  font-weight: 950;
  margin-bottom: 6px;
}

.login-feature-card span {
  color: rgba(255,255,255,.72);
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.45;
}

.login-panel {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 28px;
}

.login-card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 34px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .2);
  max-width: 490px;
  padding: 34px;
  position: relative;
  width: 100%;
}

.login-card::before {
  background: linear-gradient(90deg, #3b82f6, #1e3a8a, #0f172a);
  border-radius: 999px;
  content: "";
  height: 5px;
  left: 34px;
  position: absolute;
  right: 34px;
  top: 22px;
}

.login-card-brand {
  align-items: center;
  display: flex;
  gap: 14px;
  margin: 18px 0 30px;
}

.login-brand-logo-link {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  width: 142px;
  height: 47px;
  border-radius: 7px;
  background: #071a3a;
}

.login-brand-logo {
  width: 142px;
  height: 47px;
  object-fit: cover;
  object-position: left center;
}

.login-back-home {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
  color: #718096;
  font-size: .78rem;
  font-weight: 700;
}

.login-back-home:hover {
  color: #2563eb;
}

.login-brand-mark-large {
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  border-radius: 18px;
  box-shadow: 0 18px 30px rgba(37, 99, 235, .28);
  color: #fff;
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 950;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.login-brand {
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1.1;
}

.login-muted {
  color: #64748b;
  font-size: .92rem;
  font-weight: 700;
  margin-top: 4px;
}

.login-copy h2 {
  color: #0f172a;
  font-size: 2rem;
  font-weight: 950;
  letter-spacing: -.04em;
  margin: 0 0 8px;
}

.login-copy p {
  color: #64748b;
  font-weight: 650;
  line-height: 1.55;
  margin-bottom: 24px;
}

.login-field {
  margin-bottom: 16px;
}

.login-field label {
  color: #475569;
  display: block;
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.login-label-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.login-label-row label {
  margin-bottom: 0;
}

.login-forgot-btn {
  background: transparent;
  border: 0;
  color: #2563eb;
  font-size: .82rem;
  font-weight: 900;
  padding: 0;
}

.login-forgot-btn:hover {
  color: #1e3a8a;
  text-decoration: underline;
}

.login-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.login-info-btn {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.login-input-wrap {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  display: flex;
  gap: 12px;
  min-height: 58px;
  padding: 0 16px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-input-wrap:focus-within {
  background: #fff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 5px rgba(59, 130, 246, .12);
}

.login-input-wrap.is-invalid {
  background: #fff7f7;
  border-color: #ef4444;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, .12);
}

.login-input-wrap.is-invalid > i,
.login-input-wrap input.is-invalid {
  color: #dc2626;
}

.login-input-wrap > i {
  color: #3b82f6;
}

.login-input-wrap input {
  background: transparent;
  border: 0;
  color: #0f172a;
  flex: 1;
  font-weight: 750;
  min-width: 0;
  outline: none;
}

.login-password-toggle {
  align-items: center;
  background: #eef4ff;
  border: 0;
  border-radius: 12px;
  color: #2563eb;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.login-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 16px;
  color: #be123c;
  font-weight: 800;
  margin: 14px 0;
  padding: 12px 14px;
}

.login-success {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  color: #1e3a8a;
  font-weight: 800;
  margin: 14px 0;
  padding: 12px 14px;
}

.login-success strong {
  color: #1d4ed8;
  display: block;
  font-size: .9rem;
  letter-spacing: .08em;
  margin-bottom: 4px;
}

.login-submit {
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(37, 99, 235, .25);
  color: #fff;
  display: flex;
  font-weight: 950;
  gap: 10px;
  justify-content: center;
  min-height: 58px;
  padding: 0 20px;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  width: 100%;
}

.login-submit:hover {
  box-shadow: 0 22px 44px rgba(37, 99, 235, .34);
  transform: translateY(-1px);
}

.login-submit:disabled {
  cursor: wait;
  opacity: .75;
  transform: none;
}

.login-footer-note {
  align-items: flex-start;
  background: #f1f5f9;
  border-radius: 18px;
  color: #64748b;
  display: flex;
  font-size: .86rem;
  font-weight: 700;
  gap: 10px;
  line-height: 1.45;
  margin-top: 22px;
  padding: 14px;
}

.login-footer-note i {
  color: #2563eb;
  margin-top: 2px;
}

.mobile-sidebar-backdrop {
  display: none;
}

@media (max-width: 991.98px) {
  .login-page-modern {
    background: linear-gradient(160deg, #0f172a 0%, #17243b 42%, #f8fbff 42%, #f8fbff 100%);
  }

  .login-shell {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .login-showcase {
    min-height: auto;
    padding: 28px 12px 10px;
  }

  .login-showcase h1 {
    font-size: clamp(2.2rem, 10vw, 3.6rem);
  }

  .login-feature-grid {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .login-panel {
    padding: 18px 0 28px;
  }

  .login-card {
    border-radius: 28px;
    padding: 28px 22px;
  }

  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .app-shell.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .app-main {
    margin-left: 0;
  }

  .app-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    z-index: 1025;
  }

  .app-shell.sidebar-open .mobile-sidebar-backdrop {
    display: block;
  }

  .app-content {
    padding: 20px 16px 28px;
  }

  .page-title {
    font-size: 1.65rem;
  }

  .app-topbar {
    padding: 0 16px;
  }

  .detail-header {
    flex-direction: column;
  }

  .detail-header-actions {
    width: 100%;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .action-panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .app-topbar-right .topbar-hide-mobile {
    display: none;
  }

  .kpi-card-value {
    font-size: 1.7rem;
  }

  .card-clean-body,
  .card-clean-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .timeline-item {
    padding-left: 52px;
  }

  .timeline-dot {
    width: 34px;
    height: 34px;
  }

  .timeline-item::before {
    left: 16px;
  }

  .detail-tabs {
    flex-direction: column;
  }

  .detail-tab-btn {
    width: 100%;
    text-align: left;
  }

  .detail-header-title {
    font-size: 1.35rem;
  }

  .btn-action-header {
    width: 100%;
  }
}

.detail-shell-body {
  padding: 24px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.detail-header-main {
  min-width: 0;
}

.detail-header-code {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.detail-header-title {
  font-size: 1.6rem;
  line-height: 1.15;
  font-weight: 800;
  color: #111827;
  margin-bottom: 12px;
}

.detail-header-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-action-primary,
.btn-action-warning,
.btn-action-success,
.btn-action-info {
  border: 0;
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-action-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.btn-action-warning {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.btn-action-success {
  background: linear-gradient(135deg, #15803d, #22c55e);
}

.btn-action-info {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
}

.btn-action-primary:hover,
.btn-action-warning:hover,
.btn-action-success:hover,
.btn-action-info:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.16);
}

.btn-action-primary:disabled,
.btn-action-warning:disabled,
.btn-action-success:disabled,
.btn-action-info:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-action-header {
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-action-lg {
  min-height: 50px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.badge-priority-high {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-priority-medium {
  background: #fff7ed;
  color: #c2410c;
}

.badge-priority-low {
  background: #ecfeff;
  color: #0f766e;
}

.detail-tabs-wrap {
  margin-bottom: 22px;
}

.detail-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-tab-btn {
  border: 1px solid #dbe4f0;
  background: #f8fafc;
  color: #475569;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  transition: 0.15s ease;
}

.detail-tab-btn:hover {
  background: #eef4ff;
  color: #1d4ed8;
}

.detail-tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.18);
}

.tab-pane-custom {
  display: none;
}

.tab-pane-custom.active {
  display: block;
}

.info-row-modern {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.info-row-modern:first-child {
  padding-top: 0;
}

.info-row-modern:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-row-modern-left {
  flex: 1;
  min-width: 0;
}

.info-row-modern-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 6px;
}

.info-row-modern-value {
  color: #111827;
  font-weight: 700;
  word-break: break-word;
  white-space: pre-wrap;
}

.info-value-block {
  white-space: pre-wrap;
  color: #111827;
  font-weight: 600;
}

.action-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.manual-hours-note {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  color: #475569;
}

.manual-hours-form .gap-2 {
  gap: 8px;
}

.manual-hours-helper {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.comment-card {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.comment-card:last-child {
  margin-bottom: 0;
}

.comment-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.comment-card-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #111827;
}

.comment-card-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.comment-card-date {
  font-size: 0.82rem;
  color: var(--muted);
}

.comment-card-text {
  white-space: pre-wrap;
  color: #374151;
}

.filters-grid-basic {
  display: grid;
  grid-template-columns: 2fr 1fr auto auto;
  gap: 14px;
  align-items: end;
}

.filters-grid-advanced {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: end;
}

.filters-actions-inline {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.advanced-filters-panel {
  overflow: hidden;
  transition: all 0.2s ease;
}

.advanced-filters-panel.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.advanced-filters-panel.open {
  max-height: 260px;
  opacity: 1;
  margin-top: 8px;
}

.filter-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 8px;
}

.table-sortable thead th[data-sort] {
  cursor: pointer;
  user-select: none;
}

.modern-textarea {
  resize: vertical;
  min-height: 110px;
  border-radius: 14px;
  border: 1px solid #dbe4f0;
  box-shadow: none;
}

.modal-clean {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.2);
}

.modal-clean-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 22px;
}

.modal-clean-body {
  padding: 22px;
}

.modal-clean-footer {
  border-top: 1px solid var(--border);
  padding: 16px 22px;
}

@media (max-width: 991.98px) {
  .detail-header {
    flex-direction: column;
  }

  .detail-header-actions {
    width: 100%;
  }

  .filters-grid-basic,
  .filters-grid-advanced,
  .action-panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .detail-tabs {
    flex-direction: column;
  }

  .detail-tab-btn {
    width: 100%;
    text-align: left;
  }

  .detail-header-title {
    font-size: 1.35rem;
  }

  .btn-action-header {
    width: 100%;
  }
}

.detail-header-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.export-box {
  position: relative;
}

.work-order-detail-export-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.export-toggle-btn {
  min-width: 140px;
}

.export-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
  padding: 8px;
  display: none;
  z-index: 30;
}

.export-dropdown-menu.open {
  display: block;
}

.export-dropdown-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 700;
  color: #334155;
}

.export-dropdown-item:hover {
  background: #f8fafc;
}

.confirm-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 3000;
}

.confirm-dialog-box {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(2, 8, 23, 0.28);
  text-align: center;
}

.confirm-dialog-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff7ed;
  color: #ea580c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.confirm-dialog-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
}

.confirm-dialog-text {
  color: #475569;
  margin-bottom: 18px;
  line-height: 1.5;
}

.confirm-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.inline-edit-wrap {
  width: 100%;
}

.inline-edit-input {
  min-width: 220px;
}

.inline-check-list {
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  max-height: 190px;
  overflow-y: auto;
  padding: 6px;
}

.inline-check-option {
  align-items: center;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 7px 8px;
}

.inline-check-option:hover {
  background: #f4f7fb;
}

.inline-edit-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.manual-hours-hero {
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 14px 16px;
}

.manual-hours-hero-text {
  color: #1e3a8a;
  font-weight: 600;
}

.preventive-execution-card {
  border: 1px solid #bfdbfe;
  box-shadow: 0 20px 45px rgba(37, 99, 235, .09);
}

.preventive-execution-header {
  align-items: center;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.preventive-execution-subtitle {
  color: #64748b;
  font-size: .9rem;
  font-weight: 600;
  margin-top: 4px;
}

.preventive-execution-progress {
  background: #2563eb;
  border-radius: 999px;
  color: #fff;
  font-size: .84rem;
  font-weight: 900;
  padding: 8px 12px;
  white-space: nowrap;
}

.preventive-execution-list {
  display: grid;
  gap: 10px;
}

.preventive-execution-item {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr auto;
  margin: 0;
  padding: 13px 14px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.preventive-execution-item:hover {
  background: #f1f7ff;
  border-color: #93c5fd;
  box-shadow: 0 14px 28px rgba(37, 99, 235, .08);
  transform: translateY(-1px);
}

.preventive-execution-item.is-checked {
  background: #ecfdf3;
  border-color: #86efac;
}

.preventive-execution-checkbox {
  display: none;
}

.preventive-execution-checkmark {
  align-items: center;
  background: #fff;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  color: transparent;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.preventive-execution-item.is-checked .preventive-execution-checkmark {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.preventive-execution-content {
  display: grid;
  gap: 4px;
}

.preventive-execution-text {
  color: #0f172a;
  font-weight: 900;
}

.preventive-execution-note {
  color: #64748b;
  font-size: .86rem;
  font-weight: 600;
}

.preventive-execution-required {
  background: #eef2ff;
  border-radius: 999px;
  color: #475569;
  font-size: .76rem;
  font-weight: 900;
  padding: 7px 10px;
  text-transform: uppercase;
}

.preventive-execution-required.is-required {
  background: #fff1f2;
  color: #be123c;
}

.preventive-execution-locked {
  color: #64748b;
  font-size: .88rem;
  font-weight: 800;
}

.preventive-origin-card {
  border-color: #bfdbfe;
  box-shadow: 0 18px 42px rgba(29, 78, 216, .08);
}

.preventive-origin-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.preventive-origin-item {
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 13px 14px;
}

.preventive-origin-item span {
  color: #64748b;
  display: block;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .04em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.preventive-origin-item strong {
  color: #0f172a;
  font-size: .96rem;
}

.preventive-origin-description {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #1e3a8a;
  font-weight: 750;
  margin-top: 12px;
  padding: 12px 14px;
}

.table-actions-inline {
  display: flex;
  gap: 8px;
}

.filters-grid-advanced {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  align-items: end;
}

@media (max-width: 1200px) {
  .filters-grid-advanced {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991.98px) {
  .detail-header-side {
    width: 100%;
    align-items: stretch;
  }

  .export-box {
    width: 100%;
  }

  .work-order-detail-export-actions {
    flex-direction: column;
    width: 100%;
  }

  .export-toggle-btn {
    width: 100%;
  }

  .export-dropdown-menu {
    left: 0;
    right: auto;
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .filters-grid-advanced {
    grid-template-columns: 1fr;
  }

  .preventive-execution-header,
  .preventive-execution-item {
    align-items: flex-start;
  }

  .preventive-execution-header {
    flex-direction: column;
  }

  .preventive-execution-item {
    grid-template-columns: 1fr;
  }

  .confirm-dialog-actions {
    flex-direction: column;
  }

  .confirm-dialog-actions .btn {
    width: 100%;
  }
}

.page-head-top {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.page-back-btn {
  border-radius: 12px;
}

.detail-header-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.export-box {
  position: relative;
}

.export-toggle-btn {
  min-width: 140px;
}

.export-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
  padding: 8px;
  display: none;
  z-index: 30;
}

.export-dropdown-menu.open {
  display: block;
}

.export-dropdown-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 700;
  color: #334155;
}

.export-dropdown-item:hover {
  background: #f8fafc;
}

.confirm-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 3000;
}

.confirm-dialog-box {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(2, 8, 23, 0.28);
  text-align: center;
}

.confirm-dialog-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.confirm-dialog-icon.danger {
  background: #fff7ed;
  color: #ea580c;
}

.confirm-dialog-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
}

.confirm-dialog-text {
  color: #475569;
  margin-bottom: 18px;
  line-height: 1.5;
}

.confirm-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.inline-edit-wrap {
  width: 100%;
}

.inline-edit-input {
  min-width: 220px;
}

.inline-edit-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.manual-hours-hero {
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 14px 16px;
}

.manual-hours-hero-text {
  color: #1e3a8a;
  font-weight: 600;
}

.table-actions-inline {
  display: flex;
  gap: 8px;
}

.manual-task-cell {
  max-width: 280px;
  white-space: normal;
  word-break: break-word;
}

.filter-shell {
  position: relative;
  overflow: hidden;
}

.filter-shell::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #1e3a8a, #0f172a);
}

.filter-shell-header {
  align-items: flex-start;
}

.filter-shell-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-shell-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
}

.filter-shell-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.table-shell {
  overflow: hidden;
}

.filters-grid-basic {
  display: grid;
  grid-template-columns: 2fr 1fr auto auto;
  gap: 14px;
  align-items: end;
}

.filters-grid-advanced {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  align-items: end;
}

.advanced-filters-panel {
  overflow: hidden;
  transition: all 0.2s ease;
}

.advanced-filters-panel.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.advanced-filters-panel.open {
  max-height: 320px;
  opacity: 1;
  margin-top: 8px;
}

.filters-actions-inline {
  display: flex;
  align-items: end;
}

.workorders-table-modern .table-title {
  font-weight: 800;
  color: #111827;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #dbe4f0;
  color: #334155;
  font-family: Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.clamp-2-lines {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.table-cell-compact {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.open-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border: 1px solid #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
  transition: 0.15s ease;
}

.open-detail-btn:hover {
  color: #1e40af;
  background: #dbeafe;
}

.evidence-actions {
  gap: 12px;
}

.field-helper-text {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 1200px) {
  .filters-grid-advanced {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991.98px) {
  .detail-header-side {
    width: 100%;
    align-items: stretch;
  }

  .export-box {
    width: 100%;
  }

  .export-toggle-btn {
    width: 100%;
  }

  .export-dropdown-menu {
    left: 0;
    right: auto;
    width: 100%;
  }

  .filters-grid-basic,
  .filters-grid-advanced {
    grid-template-columns: 1fr;
  }

  .filter-shell-actions {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .confirm-dialog-actions {
    flex-direction: column;
  }

  .confirm-dialog-actions .btn {
    width: 100%;
  }
}
.workorders-table-header {
  align-items: center;
}

.table-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.column-picker-wrap {
  position: relative;
}

.column-picker-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
  padding: 10px;
  display: none;
  z-index: 100;
}

.column-picker-menu.open {
  display: block;
}

.column-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  margin: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: #334155;
}

.column-picker-item:hover {
  background: #f8fafc;
}

.table-title-break {
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
  max-width: 320px;
}

.table-cell-wrap {
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
  max-width: 220px;
}

.smart-select {
  position: relative;
}

.smart-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
  padding: 8px;
  display: none;
  z-index: 60;
}

.smart-select-menu.open {
  display: block;
}

.smart-select-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  display: block;
  color: #111827;
}

.smart-select-item:hover,
.smart-select-item.active {
  background: #eff6ff;
}

.smart-select-item-title {
  font-weight: 700;
}

.smart-select-item-subtitle {
  font-size: 0.84rem;
  color: var(--muted);
}

.smart-select-multi .smart-select-input {
  margin-bottom: 10px;
}

.smart-select-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.smart-select-selection-multi {
  min-height: 42px;
  padding: 2px 0 0;
}

.smart-select-selection-placeholder {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #64748b;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 38px;
  padding: 0 12px;
}

.smart-multi-chip {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  max-width: 100%;
  padding: 8px 12px;
}

.smart-multi-chip span {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-multi-chip i {
  font-size: 0.8rem;
}

.smart-select-item.is-selected {
  border: 1px solid #bfdbfe;
}

.smart-select-item-main {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.smart-select-check {
  color: #2563eb;
  flex: 0 0 auto;
  font-size: 1rem;
}

.assets-filters-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 14px;
  align-items: end;
}

.assets-table-modern .table-title {
  font-weight: 800;
}

.asset-table-subline {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
}

.badge-asset-active {
  background: #dcfce7;
  color: #15803d;
}

.badge-asset-maintenance {
  background: #ede9fe;
  color: #7c3aed;
}

.badge-asset-maintenance-progress {
  background: #ede9fe;
  color: #7c3aed;
}

.badge-asset-inactive-site {
  background: #ffedd5;
  color: #c2410c;
}

.badge-asset-inactive {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-asset-retired {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-criticality-critical {
  background: #111827;
  color: #fff;
}

.badge-criticality-critical,
.assets-table-modern .badge-priority-high,
.assets-table-modern .badge-priority-medium,
.assets-table-modern .badge-priority-low,
.asset-tree-detail-badges .badge-priority-high,
.asset-tree-detail-badges .badge-priority-medium,
.asset-tree-detail-badges .badge-priority-low {
  justify-content: center;
  min-width: 68px;
  text-align: center;
}

.workorders-table-modern .badge-pending,
.workorders-table-modern .badge-progress,
.workorders-table-modern .badge-completed,
.workorders-table-modern .badge-paused,
.workorders-table-modern .badge-priority-high,
.workorders-table-modern .badge-priority-medium,
.workorders-table-modern .badge-priority-low {
  justify-content: center;
  min-width: 86px;
  text-align: center;
}

.asset-stats-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.asset-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border: 1px solid #dbeafe;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.12);
}

.asset-stat-chip-label {
  font-size: 0.82rem;
  color: #1d4ed8;
  font-weight: 800;
}

.asset-stat-chip-value {
  font-size: 1.1rem;
  color: #0f172a;
  font-weight: 800;
}

.asset-stat-chip-ot {
  background: linear-gradient(135deg, #e0f2fe, #f8fafc);
  border-color: #bae6fd;
  box-shadow: 0 14px 24px rgba(2, 132, 199, 0.18);
}

.asset-stat-chip-open {
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border-color: #dbeafe;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.12);
}

.asset-stat-chip-prev {
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border-color: #dbeafe;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.12);
}

.asset-placeholder-card {
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  padding: 28px 22px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.asset-placeholder-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 1.5rem;
}

.asset-placeholder-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
}

.asset-placeholder-text {
  max-width: 560px;
  margin: 0 auto;
  color: #475569;
}

.asset-generated-code-hint {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #475569;
  font-weight: 600;
}

.asset-main-photo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.asset-main-photo {
  width: 100%;
  max-width: 320px;
  height: 220px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #f8fafc;
}

.asset-main-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 2rem;
}

.asset-qr-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding-top: 18px;
}

.asset-qr-card-header .card-clean-title {
  display: flex;
  align-items: center;
}

.asset-qr-main {
  width: 100%;
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  text-align: left;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
  border: 1px solid rgba(37, 99, 235, .12);
}

.asset-qr-preview {
  width: 136px;
  height: 136px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, .22);
  border-radius: 14px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, rgba(37, 99, 235, .45), rgba(14, 165, 233, .18)) border-box;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .1);
}

.asset-qr-preview img,
.asset-qr-popup img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.asset-qr-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #64748b;
  line-height: 1.45;
  min-width: 0;
}

.asset-qr-copy strong {
  color: #0f172a;
  font-weight: 900;
  word-break: break-word;
}

.asset-qr-eyebrow {
  width: max-content;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.asset-qr-actions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding-top: 0;
}

.asset-qr-btn {
  min-width: 150px;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
}

.asset-qr-btn.btn-outline-secondary {
  border-color: rgba(37, 99, 235, .28);
  color: #334155;
  background: #fff;
}

.asset-qr-popup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.asset-qr-popup img {
  width: min(360px, 72vw);
  height: min(360px, 72vw);
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 16px;
  background: #fff;
}

.asset-qr-popup-code {
  font-size: 1rem;
  font-weight: 900;
  color: #0f172a;
}

.asset-qr-popup-text {
  max-width: 360px;
  color: #64748b;
  line-height: 1.5;
}

@media (max-width: 575.98px) {
  .asset-qr-main {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .asset-qr-copy {
    align-items: center;
  }

  .asset-qr-actions {
    flex-direction: column;
  }

  .asset-qr-btn {
    width: 100%;
  }
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

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

.evidence-grid-asset {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.evidence-file-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.evidence-file-card-compact {
  min-width: 0;
}

.evidence-file-card .table-actions-inline {
  flex-wrap: wrap;
}

.evidence-file-preview {
  height: 120px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.evidence-file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evidence-file-fallback {
  color: #94a3b8;
  font-size: 2rem;
}

.evidence-file-fallback-pdf {
  color: #dc2626;
}

.evidence-file-fallback-excel {
  color: #15803d;
}

.evidence-file-fallback-word {
  color: #2563eb;
}

.evidence-file-meta {
  padding: 12px;
}

.evidence-file-type {
  font-size: 0.78rem;
  font-weight: 800;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.evidence-file-name {
  font-weight: 700;
  color: #111827;
  word-break: break-word;
}

.evidence-file-date,
.evidence-file-size {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.detail-inline-link {
  color: #1d4ed8;
  font-weight: 700;
}

.detail-inline-link:hover {
  color: #1e40af;
}

.documents-panel-heading {
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.table-date-strong {
  font-weight: 800;
  color: #0f172a;
}

.table-date-time {
  color: #64748b;
}

.documents-split-shell {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.documents-section-box {
  height: 100%;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.documents-section-box-ot {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
}

.documents-section-box-asset {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff, #eef2ff);
}

.custom-fields-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
}

.custom-fields-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.custom-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin-bottom: 10px;
}

.custom-fields-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.custom-field-summary-card {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid #dbeafe;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.08);
}

.custom-field-summary-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.custom-field-summary-value {
  color: #0f172a;
  font-weight: 700;
  word-break: break-word;
}

.asset-workorders-filter-panel.collapsed {
  display: none;
}

.asset-workorders-filter-panel.open {
  display: block;
}

@media (max-width: 991.98px) {
  .column-picker-menu {
    right: auto;
    left: 0;
  }

  .table-title-break,
  .table-cell-wrap {
    max-width: none;
  }

  .assets-filters-grid {
    grid-template-columns: 1fr;
  }

  .custom-field-row {
    grid-template-columns: 1fr;
  }

  .custom-fields-header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .evidence-grid-wo,
  .evidence-grid-asset {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .evidence-grid {
    grid-template-columns: 1fr;
  }

  .evidence-grid-wo,
  .evidence-grid-asset {
    grid-template-columns: 1fr;
  }
}
.view-switcher{display:inline-flex;align-items:center;gap:8px;padding:6px;border:1px solid var(--border);border-radius:14px;background:#fff;box-shadow:0 10px 20px rgba(15,23,42,0.06);}
.view-switcher-btn{border:0;background:transparent;color:#475569;font-weight:800;border-radius:10px;padding:9px 14px;transition:.15s ease;}
.view-switcher-btn:hover{background:#f8fafc;color:#1d4ed8;}
.view-switcher-btn.active{background:linear-gradient(135deg,#2563eb,#3b82f6);color:#fff;box-shadow:0 10px 18px rgba(37,99,235,0.18);}

.view-switch {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .07);
  display: inline-flex;
  gap: 6px;
  padding: 6px;
}

.view-switch-btn {
  background: transparent;
  border: 0;
  border-radius: 12px;
  color: #475569;
  font-weight: 950;
  padding: 9px 14px;
  transition: .16s ease;
}

.view-switch-btn:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.view-switch-btn.active {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 12px 24px rgba(37, 99, 235, .2);
  color: #fff;
}

.workorders-calendar-shell {
  overflow: hidden;
}

.workorders-calendar-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.workorders-calendar-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.workorders-calendar-current {
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border: 1px solid rgba(37, 99, 235, .22);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .9rem;
  font-weight: 950;
  letter-spacing: .02em;
  margin-top: 8px;
  padding: 7px 12px;
  text-transform: capitalize;
}

.workorders-calendar-legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

.workorders-calendar-legend span {
  align-items: center;
  color: #475569;
  display: inline-flex;
  font-size: .84rem;
  font-weight: 850;
  gap: 6px;
}

.calendar-dot {
  border-radius: 999px;
  display: inline-flex;
  height: 10px;
  width: 10px;
}

.calendar-dot.status-pending { background: #2563eb; }
.calendar-dot.status-progress { background: #7c3aed; }
.calendar-dot.status-paused { background: #f59e0b; }
.calendar-dot.status-completed { background: #16a34a; }
.calendar-dot.status-overdue { background: #dc2626; }

.workorders-calendar {
  --fc-border-color: #dbe4f0;
  --fc-neutral-bg-color: #f8fafc;
  --fc-page-bg-color: transparent;
  --fc-small-font-size: .78rem;
}

.workorders-calendar .fc-scrollgrid,
.workorders-calendar .fc-theme-standard td,
.workorders-calendar .fc-theme-standard th {
  border-color: #e2e8f0;
}

.workorders-calendar .fc-col-header-cell {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.workorders-calendar .fc-day-today.fc-col-header-cell {
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
  box-shadow:none;
  color:#fff;
}

.workorders-calendar .fc-day-today.fc-col-header-cell .fc-col-header-cell-cushion {
  color:#fff;
}

.workorders-calendar .fc-col-header-cell-cushion {
  color: #fff;
  text-decoration: none;
}

.workorders-calendar .fc-daygrid-day-number {
  background: transparent;
  border-radius: 0;
  color: #0f172a;
  display: inline-block;
  font-weight: 900;
  margin: 8px 8px 0 0;
  min-width: 0;
  padding: 0;
  text-decoration: none;
}

.workorders-calendar .fc-day-other .fc-daygrid-day-number {
  color: #94a3b8;
}

.workorders-calendar .fc-event-mirror,
.fc-event-mirror {
  opacity: .96 !important;
  pointer-events: none;
  z-index: 9999 !important;
}

.workorders-calendar .fc-event-mirror .wo-calendar-event-card,
.fc-event-mirror .wo-calendar-event-card {
  box-shadow: 0 18px 34px rgba(15, 23, 42, .24);
  transform: scale(1.02);
}

.workorders-calendar .fc-day-today {
  background: linear-gradient(180deg, rgba(37, 99, 235, .13), rgba(14, 165, 233, .08)) !important;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .3);
}

.workorders-calendar .fc-daygrid-more-link {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-weight: 950;
  margin: 4px 6px;
  padding: 4px 10px;
}

.workorders-calendar .fc-event {
  background: transparent !important;
  border: 0 !important;
  border-radius: 12px;
  box-shadow: none;
  cursor: pointer;
  margin: 3px 4px;
  overflow: hidden;
}

.workorders-calendar .fc-event-main {
  color: inherit !important;
}

.workorders-calendar .fc-daygrid-event {
  white-space: normal;
}

.wo-calendar-event-card {
  background: #dbeafe;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .055);
  color: #0f172a;
  min-height: 54px;
  padding: 7px 9px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.workorders-calendar .fc-event:hover .wo-calendar-event-card {
  border-color: rgba(37, 99, 235, .48);
  box-shadow: 0 14px 26px rgba(15, 23, 42, .12);
  transform: translateY(-1px);
}

.wo-calendar-event-top {
  align-items: center;
  display: flex;
  font-size: .68rem;
  font-weight: 950;
  justify-content: space-between;
  letter-spacing: .04em;
  gap: 8px;
}

.wo-calendar-event-code {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  max-width: calc(100% - 28px);
  overflow: hidden;
  padding: 2px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wo-calendar-preventive-mini {
  align-items: center;
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .78rem;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.wo-calendar-event-title {
  align-items: center;
  color: #0f172a;
  display: flex;
  font-size: .78rem;
  font-weight: 950;
  gap: 5px;
  line-height: 1.18;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wo-calendar-title-preventive-icon {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .72rem;
  height: 21px;
  justify-content: center;
  width: 21px;
}

.wo-table-title-with-icon {
  align-items: center;
  display: flex;
  gap: 7px;
}

.wo-table-title-with-icon > span:last-child {
  min-width: 0;
}

.wo-table-preventive-icon {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .76rem;
  height: 23px;
  justify-content: center;
  width: 23px;
}

.wo-calendar-event-meta {
  color: #64748b;
  font-size: .68rem;
  font-weight: 800;
  margin-top: 2px;
  opacity: .82;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wo-calendar-event-pending .wo-calendar-event-card {
  background: #dbeafe;
  border-color: #bfdbfe;
}

.wo-calendar-event-progress .wo-calendar-event-card {
  background: #ede9fe;
  border-color: #ddd6fe;
}

.wo-calendar-event-paused .wo-calendar-event-card {
  background: #fef3c7;
  border-color: #fde68a;
}

.wo-calendar-event-completed .wo-calendar-event-card {
  background: #dcfce7;
  border-color: #bbf7d0;
}

.wo-calendar-event-overdue .wo-calendar-event-card {
  background: #fee2e2;
  border-color: #fecdd3;
}

.wo-calendar-event-preventive .wo-calendar-event-card {
  outline: 2px solid rgba(37, 99, 235, .22);
  outline-offset: 1px;
}

.workorders-calendar .fc-popover {
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
  min-width: 390px;
  overflow: hidden;
  z-index: 30;
}

.workorders-calendar .fc-popover-header {
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #0f172a);
  color: #fff;
  display: flex;
  font-weight: 950;
  justify-content: space-between;
  padding: 12px 16px;
  text-transform: capitalize;
}

.workorders-calendar .fc-popover-title {
  color: #fff;
  font-size: .96rem;
}

.workorders-calendar .fc-popover-close {
  color: #fff;
  opacity: .9;
}

.workorders-calendar .fc-popover-body {
  background:
    linear-gradient(rgba(59,130,246,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,.04) 1px, transparent 1px),
    #fff;
  background-size: 22px 22px;
  max-height: 420px;
  overflow: auto;
  padding: 12px;
}

.workorders-calendar .fc-popover .fc-daygrid-event {
  margin: 8px 0;
}

@media (max-width: 575.98px) {
  .workorders-calendar .fc-popover {
    left: 12px !important;
    min-width: 0;
    width: calc(100vw - 24px);
  }
}

.calendar-quick-view {
  background: #fff;
  border: 1px solid rgba(219, 234, 254, .9);
  border-radius: 26px;
  box-shadow: 0 34px 100px rgba(2, 6, 23, .34);
  max-width: 620px;
  padding: 28px;
  position: relative;
  width: min(620px, calc(100vw - 32px));
}

.calendar-quick-close {
  align-items: center;
  background: #ef4444;
  border: 0;
  border-radius: 14px;
  color: #fff;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 36px;
}

.calendar-quick-close:hover {
  background: #dc2626;
  color: #fff;
}

.calendar-quick-head,
.calendar-quick-status-row,
.calendar-quick-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.calendar-quick-head {
  padding-right: 54px;
}

.calendar-quick-view h3 {
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 950;
  margin: 16px 0 18px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.calendar-quick-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.calendar-quick-grid div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 14px;
}

.calendar-quick-grid span {
  color: #64748b;
  display: block;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.calendar-quick-grid strong {
  color: #0f172a;
}

.calendar-preventive-pill {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-weight: 950;
  padding: 7px 10px;
}

.calendar-quick-head .code-pill {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1d4ed8;
}
.calendar-date-pill{
  align-items:center;
  background:#eff6ff;
  border:1px solid #bfdbfe;
  border-radius:999px;
  color:#1d4ed8;
  display:inline-flex;
  font-weight:950;
  padding:7px 10px;
}

.calendar-quick-actions {
  justify-content: flex-end;
  margin-top: 20px;
}
.calendar-action-menu{
  background:#fff;
  border:1px solid rgba(191,219,254,.95);
  border-radius:18px;
  box-shadow:0 28px 80px rgba(15,23,42,.24);
  left:12px;
  max-width:360px;
  padding:16px;
  position:fixed;
  top:12px;
  width:360px;
  z-index:4000;
}
.calendar-action-menu.is-mobile{
  border-radius:20px 20px 0 0;
  bottom:0;
  left:0;
  max-width:none;
  right:0;
  top:auto;
  width:100%;
}
.calendar-action-close{
  align-items:center;
  background:#ef4444;
  border:0;
  border-radius:12px;
  color:#fff;
  display:inline-flex;
  height:32px;
  justify-content:center;
  position:absolute;
  right:12px;
  top:12px;
  width:32px;
}
.calendar-action-close:hover{background:#dc2626;color:#fff;}
.calendar-action-loading{
  align-items:center;
  color:#475569;
  display:flex;
  font-weight:800;
  min-height:64px;
}
.calendar-action-head{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding-right:40px;
}
.calendar-action-title{
  color:#0f172a;
  font-size:1rem;
  font-weight:950;
  line-height:1.25;
  margin:12px 0 8px;
  overflow-wrap:anywhere;
}
.calendar-action-meta,
.calendar-action-status{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.calendar-action-meta{
  color:#64748b;
  font-size:.82rem;
  font-weight:800;
  margin-bottom:10px;
}
.calendar-action-status{margin-bottom:12px;}
.calendar-action-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.calendar-create-menu{
  padding:22px;
  width:330px;
}
.calendar-create-menu .calendar-action-head{
  margin-bottom:18px;
  padding-right:46px;
}
.calendar-create-primary-btn{
  justify-content:center;
  min-height:48px;
  padding:12px 18px;
  width:100%;
}
.calendar-action-item{
  align-items:center;
  background:#f8fafc;
  border:1px solid #dbeafe;
  border-radius:14px;
  color:#0f172a;
  display:flex;
  gap:10px;
  padding:10px 12px;
  text-align:left;
  transition:.15s ease;
  width:100%;
}
.calendar-action-item:hover:not(:disabled){
  background:#eff6ff;
  border-color:#93c5fd;
  color:#1d4ed8;
  transform:translateY(-1px);
}
.calendar-action-item:disabled{
  cursor:not-allowed;
  opacity:.48;
}
.calendar-action-icon{
  align-items:center;
  background:#dbeafe;
  border-radius:12px;
  color:#2563eb;
  display:inline-flex;
  flex:0 0 34px;
  height:34px;
  justify-content:center;
  width:34px;
}
.calendar-action-copy{min-width:0;}
.calendar-action-copy strong{
  display:block;
  font-size:.9rem;
  font-weight:950;
}
.calendar-action-copy small{
  color:#64748b;
  display:block;
  font-size:.75rem;
  font-weight:700;
  line-height:1.2;
}
.calendar-action-item.warning .calendar-action-icon{background:#fef3c7;color:#d97706;}
.calendar-action-item.info .calendar-action-icon{background:#e0f2fe;color:#0284c7;}
.calendar-action-item.success .calendar-action-icon{background:#dcfce7;color:#16a34a;}
.calendar-action-item.danger .calendar-action-icon{background:#fee2e2;color:#dc2626;}
.calendar-action-warning{
  background:#fff7ed;
  border:1px solid #fed7aa;
  border-radius:12px;
  color:#9a3412;
  font-size:.8rem;
  font-weight:800;
  line-height:1.35;
  margin:8px 0 12px;
  padding:9px 10px;
}
.assets-tree-shell{overflow:visible;}
.assets-tree-layout{display:grid;grid-template-columns:360px minmax(0,1fr);min-height:760px;}
.assets-tree-sidebar{border-right:1px solid var(--border);background:linear-gradient(180deg,#fbfdff,#f8fafc);display:flex;flex-direction:column;min-height:100%;}
.assets-tree-sidebar-head{padding:20px 20px 14px;border-bottom:1px solid var(--border);}
.assets-tree-container{padding:14px;overflow:auto;flex:1;}
.assets-tree-detail-panel{background:#fff;align-self:start;position:sticky;top:86px;max-height:calc(100vh - 104px);overflow:auto;}
.assets-tree-detail-inner{padding:24px;min-height:100%;}
.tree-site-block{margin-bottom:14px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;box-shadow:0 8px 20px rgba(15,23,42,0.04);overflow:hidden;}
.tree-site-row{width:100%;border:0;background:linear-gradient(135deg,#eff6ff,#f8fafc);display:flex;align-items:center;gap:10px;padding:14px 16px;font-weight:800;color:#0f172a;}
.tree-site-toggle{width:18px;text-align:center;color:#2563eb;}
.tree-site-name{flex:1;text-align:left;}
.tree-site-count{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:30px;border-radius:999px;background:#dbeafe;color:#1d4ed8;font-size:.8rem;}
.tree-site-roots{padding:10px;}
.tree-node-block{margin-bottom:6px;}
.tree-node-row{display:flex;align-items:flex-start;gap:10px;padding:10px 12px 10px calc(12px + (var(--tree-level) * 22px));border-radius:14px;cursor:pointer;transition:.15s ease;}
.tree-node-row:hover{background:#f8fafc;}
.tree-node-row.active{background:linear-gradient(135deg,#eff6ff,#ffffff);border:1px solid #bfdbfe;box-shadow:0 10px 20px rgba(37,99,235,0.12);}
.tree-toggle-btn{border:0;background:#eff6ff;color:#2563eb;width:28px;height:28px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px;margin-top:2px;}
.tree-toggle-btn.is-leaf{background:transparent;color:#cbd5e1;}
.tree-node-content{min-width:0;flex:1;display:flex;flex-direction:column;gap:8px;}
.tree-node-title-row{display:flex;align-items:center;gap:10px;justify-content:space-between;}
.tree-status-dot{width:10px;height:10px;border-radius:999px;box-shadow:0 0 0 4px rgba(148,163,184,.16);flex:0 0 10px;}
.tree-status-dot-active{background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.16);}
.tree-status-dot-maintenance{background:#7c3aed;box-shadow:0 0 0 4px rgba(124,58,237,.18);}
.tree-status-dot-maintenance-progress{background:#7c3aed;box-shadow:0 0 0 4px rgba(124,58,237,.18);}
.tree-status-dot-site-inactive{background:#f97316;box-shadow:0 0 0 4px rgba(249,115,22,.18);}
.tree-status-dot-inactive{background:#ef4444;box-shadow:0 0 0 4px rgba(239,68,68,.18);}
.tree-node-name{font-weight:800;color:#0f172a;min-width:0;word-break:break-word;}
.tree-node-code{font-family:Consolas,monospace;font-size:.78rem;color:#64748b;white-space:nowrap;}
.tree-node-meta-row{display:flex;gap:8px;flex-wrap:wrap;}
.asset-tree-empty-panel{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:40px;}
.asset-tree-detail-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;flex-wrap:wrap;padding-bottom:18px;margin-bottom:18px;border-bottom:1px solid var(--border);}
.asset-tree-detail-actions{display:flex;gap:10px;flex-wrap:wrap;}
.asset-tree-detail-badges{display:flex;gap:10px;flex-wrap:wrap;}
.asset-tree-detail-section{padding:18px;border:1px solid var(--border);border-radius:18px;background:linear-gradient(180deg,#fff,#f8fafc);margin-bottom:18px;}
.asset-tree-section-title{font-size:.82rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:800;margin-bottom:12px;}
.asset-breadcrumb-trail{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.asset-breadcrumb-chip{display:inline-flex;align-items:center;padding:8px 12px;border-radius:999px;background:#eef4ff;border:1px solid #dbeafe;color:#1d4ed8;font-weight:800;}
.asset-breadcrumb-chip.current{background:#1d4ed8;color:#fff;border-color:#1d4ed8;}
.asset-breadcrumb-separator{color:#94a3b8;}
.asset-tree-child-list{display:flex;gap:10px;flex-wrap:wrap;}
.asset-tree-child-chip{border:1px solid #dbeafe;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:8px 12px;font-weight:700;}
.asset-tree-kpis{display:flex;gap:10px;flex-wrap:wrap;}
@media (max-width:1199.98px){.assets-tree-layout{grid-template-columns:1fr;}.assets-tree-sidebar{border-right:0;border-bottom:1px solid var(--border);}}
@media (max-width:575.98px){.view-switcher{width:100%;justify-content:space-between;}.view-switcher-btn{flex:1;}.tree-node-title-row{flex-direction:column;align-items:flex-start;}.asset-tree-detail-actions .btn{width:100%;}.asset-breadcrumb-trail{align-items:flex-start;}}
.app-topbar-subtitle,
.page-subtitle{
  display:none !important;
}
.page-head{
  margin-bottom:18px;
}
.assets-filter-actions{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.assets-filter-actions-left,
.assets-filter-actions-right{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.tree-node-icon{
  margin-right:8px;
  flex:0 0 auto;
  width:26px;
  height:26px;
  border-radius:10px;
  background:#eff6ff;
  color:#2563eb;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 26px;
}
.tree-node-title-row .tree-node-icon + .tree-node-name{
  margin-left:2px;
}
.detail-header-title .tree-node-icon{
  margin-right:14px;
}
.asset-preventive-list{
  display:flex;
  flex-direction:column;
}
.asset-preventive-card{
  border-radius:0;
  border-left:0;
  border-right:0;
}
.asset-preventive-card:first-child{
  border-top:0;
}
.asset-preventive-card:last-child{
  border-bottom:0;
}
.asset-preventive-wo-summary{
  max-width:520px;
}
.timeline-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.asset-history-source{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:5px 10px;
  background:#eef4ff;
  color:#1d4ed8;
  font-weight:900;
  font-size:.78rem;
}
.asset-history-description{
  margin-top:10px;
  color:#334155;
  line-height:1.45;
  font-weight:650;
}
.history-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:18px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
.history-search-box{
  flex:1 1 360px;
  display:flex;
  align-items:center;
  gap:10px;
  min-width:240px;
  padding:0 14px;
  min-height:44px;
  border:1px solid #d7e2f0;
  border-radius:12px;
  background:#fff;
  box-shadow:0 6px 16px rgba(15,23,42,.04);
}
.history-search-box i{
  color:#2563eb;
}
.history-search-box input{
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  color:#0f172a;
  font-weight:700;
}
.history-count-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 14px;
  border:1px solid #d7e2f0;
  border-radius:12px;
  background:#fff;
  color:#1d4ed8;
  font-size:.86rem;
  font-weight:900;
  white-space:nowrap;
  box-shadow:0 6px 16px rgba(15,23,42,.04);
}
.timeline-feed .timeline-card{
  position:relative;
  overflow:hidden;
  border-color:#dbeafe;
  background:linear-gradient(135deg,#ffffff,#f8fbff);
  box-shadow:0 12px 30px rgba(15,23,42,.05);
}
.timeline-feed .timeline-card::before{
  content:'';
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:linear-gradient(180deg,#2563eb,#12aeea);
}
.timeline-feed .timeline-item:hover .timeline-card{
  transform:translateY(-1px);
  box-shadow:0 16px 36px rgba(37,99,235,.12);
}
.asset-history-dot-info{
  background:#dbeafe;
  color:#1d4ed8;
}
.asset-history-dot-success{
  background:#dcfce7;
  color:#15803d;
}
.tree-node-title-row{
  align-items:center;
}
.tree-node-meta-row{
  display:none !important;
}
@media (max-width:991.98px){
  .assets-filter-actions{
    align-items:flex-start;
    flex-direction:column;
  }
  .assets-filter-actions-left,
  .assets-filter-actions-right{
    width:100%;
  }
}
.app-topbar-left > div{
  display:none !important;
}
@media (max-width:1199.98px){
  .assets-tree-detail-panel{
    position:static;
    max-height:none;
    overflow:visible;
  }
}
.assets-tree-layout{
  grid-template-columns:minmax(460px, 46%) minmax(0, 54%) !important;
}
.assets-tree-detail-inner{
  padding:20px !important;
}
.table-pagination-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px 20px;
  border-top:1px solid var(--border);
  background:linear-gradient(180deg,#fff,#f8fafc);
}
.table-pagination-meta{
  color:#64748b;
  font-size:.92rem;
  font-weight:700;
}
.table-pagination-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.table-pagination-page{
  color:#0f172a;
  font-weight:800;
  padding:0 6px;
}
.confirm-dialog-input{
  margin-bottom:18px;
  border-radius:12px;
  border:1px solid #cbd5e1;
  min-height:46px;
  text-align:center;
  font-weight:800;
  letter-spacing:.04em;
}
.asset-tree-detail-badges{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:8px;
}
.asset-import-dropzone{
  border:2px dashed #bfdbfe;
  border-radius:20px;
  background:linear-gradient(180deg,#ffffff,#f8fbff);
  padding:28px 24px;
  text-align:center;
  transition:.15s ease;
}
.asset-import-dropzone.dragover{
  border-color:#2563eb;
  background:linear-gradient(180deg,#eff6ff,#ffffff);
  box-shadow:0 12px 28px rgba(37,99,235,.12);
}
.asset-import-dropzone-icon{
  width:68px;
  height:68px;
  border-radius:50%;
  background:#eff6ff;
  color:#2563eb;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:1.5rem;
  margin-bottom:14px;
}
.asset-import-dropzone-title{
  font-size:1.05rem;
  font-weight:800;
  color:#0f172a;
  margin-bottom:6px;
}
.asset-import-dropzone-text{
  color:#64748b;
  margin-bottom:14px;
}
.asset-import-file-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-weight:700;
}
.asset-import-file-pill small{
  color:#64748b;
  font-weight:800;
  margin-left:4px;
}
.asset-import-file-ready{
  background:#ecfdf5;
  color:#15803d;
}
.asset-import-file-ready small{
  color:#15803d;
}
.asset-import-file-loading{
  background:#eff6ff;
  color:#2563eb;
}
.asset-import-steps{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.asset-import-step{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid #dbe4f0;
  background:#f8fafc;
  color:#475569;
  font-weight:700;
}
.asset-import-step.active{
  background:linear-gradient(135deg,#2563eb,#3b82f6);
  color:#fff;
  border-color:transparent;
  box-shadow:0 10px 18px rgba(37,99,235,.18);
}
.asset-import-step.done{
  background:#ecfdf5;
  color:#15803d;
  border-color:#bbf7d0;
}
.asset-import-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}
.asset-import-summary-card{
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px 16px;
  background:#fff;
}
.asset-import-summary-card strong{
  display:block;
  font-size:1.25rem;
  color:#0f172a;
}
.asset-import-filterbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:12px 16px;
  border-top:1px solid #e2e8f0;
  border-bottom:1px solid #e2e8f0;
  background:#f8fafc;
}
.asset-import-filter-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid #dbeafe;
  border-radius:8px;
  background:#fff;
  color:#334155;
  padding:8px 12px;
  font-weight:850;
}
.asset-import-filter-chip strong{
  min-width:28px;
  padding:2px 7px;
  border-radius:999px;
  background:#eaf2ff;
  color:#1d4ed8;
  text-align:center;
}
.asset-import-filter-chip.active{
  border-color:#2563eb;
  background:#eff6ff;
  color:#1d4ed8;
  box-shadow:0 8px 18px rgba(37,99,235,.14);
}
.asset-import-filter-valid.active{border-color:#22c55e;background:#f0fdf4;color:#15803d;}
.asset-import-filter-valid.active strong{background:#dcfce7;color:#15803d;}
.asset-import-filter-warning.active{border-color:#f59e0b;background:#fffbeb;color:#b45309;}
.asset-import-filter-warning.active strong{background:#fef3c7;color:#b45309;}
.asset-import-filter-error.active{border-color:#ef4444;background:#fef2f2;color:#b91c1c;}
.asset-import-filter-error.active strong{background:#fee2e2;color:#b91c1c;}
.asset-import-summary-valid{border-color:#bbf7d0;background:#f0fdf4;}
.asset-import-summary-warning{border-color:#fde68a;background:#fffbeb;}
.asset-import-summary-error{border-color:#fecaca;background:#fef2f2;}
.asset-import-preview-table tbody tr.preview-valid{background:#f0fdf4;}
.asset-import-preview-table tbody tr.preview-warning{background:#fffbeb;}
.asset-import-preview-table tbody tr.preview-error{background:#fef2f2;}
.import-row-status{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:800;
}
.import-row-status-valid{color:#15803d;}
.import-row-status-warning{color:#b45309;}
.import-row-status-error{color:#b91c1c;}
.asset-import-result-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.asset-import-result-item{
  padding:12px 14px;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  color:#334155;
  font-weight:600;
}
.asset-import-loading-card{
  min-height:360px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:14px;
  border:1px solid #dbeafe;
  border-radius:18px;
  background:linear-gradient(135deg,#f8fbff,#eef6ff);
}
.asset-import-loading-ring{
  width:76px;
  height:76px;
  border-radius:18px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#2563eb,#0ea5e9);
  color:#fff;
  font-size:2rem;
  box-shadow:0 18px 34px rgba(37,99,235,.24);
}
.asset-import-loading-bar{
  width:min(360px,80%);
  height:8px;
  overflow:hidden;
  border-radius:999px;
  background:#dbeafe;
}
.asset-import-loading-bar span{
  display:block;
  width:42%;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#2563eb,#22c55e);
  animation:assetImportLoading 1.25s ease-in-out infinite;
}
.asset-import-complete-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid #bbf7d0;
  border-radius:999px;
  padding:8px 12px;
  background:#ecfdf5;
  color:#15803d;
  font-weight:900;
}
@keyframes assetImportLoading{
  0%{transform:translateX(-100%);}
  50%{transform:translateX(80%);}
  100%{transform:translateX(240%);}
}
#assetImportModal .modal-dialog{
  max-width: 1380px;
}
.asset-import-preview-table tbody td:last-child{
  font-size:.84rem;
  line-height:1.35;
}
@media (max-width:1199.98px){
  .assets-tree-layout{
    grid-template-columns:1fr !important;
  }
  .asset-import-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:575.98px){
  .table-pagination-bar{
    flex-direction:column;
    align-items:flex-start;
  }
  .preventive-result-grid{
    grid-template-columns:1fr;
  }
  .preventive-wo-metrics{
    grid-template-columns:1fr 1fr;
  }
  .asset-import-summary{
    grid-template-columns:1fr;
  }
}
.preventive-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.preventive-kpi-card {
  background: linear-gradient(135deg, #eaf2ff, #ffffff);
  border: 0;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(20, 55, 100, 0.08);
  position: relative;
}

.preventive-kpi-info {
  align-items: center;
  background: rgba(47, 111, 236, .1);
  border: 1px solid rgba(47, 111, 236, .22);
  border-radius: 999px;
  color: #2f6fec;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 26px;
}

.preventive-kpi-card span {
  display: block;
  color: #667085;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.preventive-kpi-card strong {
  display: block;
  color: #123a7a;
  font-size: 2rem;
  line-height: 1;
  margin-top: 10px;
}

.preventive-kpi-card.warning {
  background: linear-gradient(135deg, #fff7dc, #ffffff);
  border: 0;
}

.preventive-kpi-card.danger {
  background: linear-gradient(135deg, #ffe8e8, #ffffff);
  border: 0;
}

.preventive-kpi-card.success {
  background: linear-gradient(135deg, #e5fff0, #ffffff);
  border: 0;
}

.preventive-list {
  display: flex;
  flex-direction: column;
}

.preventive-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid #e9eef7;
}

.preventive-card-main {
  flex: 1;
  min-width: 0;
}

.preventive-card:last-child {
  border-bottom: 0;
}

.preventive-card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.preventive-title-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.preventive-card h3 {
  color: #101828;
  font-size: 1rem;
  font-weight: 900;
  margin: 0;
}

.preventive-status-badge {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-size: .74rem;
  font-weight: 900;
  gap: 5px;
  letter-spacing: .01em;
  padding: 4px 7px;
  text-transform: uppercase;
  white-space: nowrap;
}

.preventive-status-active {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #15803d;
}

.preventive-status-site-inactive {
  background: #ffedd5;
  border: 1px solid #fdba74;
  color: #c2410c;
}

.preventive-status-inactive {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.preventive-status-badge i {
  font-size: .78rem;
}

.preventive-detail-modal .modal-dialog {
  max-width: min(1560px, calc(100vw - 18px));
}

.preventive-detail-panel {
  max-height: calc(100vh - 34px);
  overflow: hidden;
}

.preventive-detail-tabs {
  align-items: center;
  background: #f8fbff;
  border-bottom: 1px solid #dbe7f5;
  display: flex;
  gap: 10px;
  padding: 14px 20px 0;
}

.preventive-detail-tabs button {
  align-items: center;
  background: #fff;
  border: 1px solid #c9d8ea;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  color: #475569;
  display: inline-flex;
  font-weight: 900;
  gap: 8px;
  padding: 11px 14px;
}

.preventive-detail-tabs button.active {
  background: #1a8df0;
  border-color: #1a8df0;
  color: #fff;
  box-shadow: 0 10px 24px rgba(26,141,240,.22);
}

.preventive-detail-body {
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding: 20px;
}

.preventive-detail-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preventive-detail-card {
  background: #fff;
  border: 1px solid #d6e3f2;
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(15,23,42,.06);
  padding: 16px;
}

.preventive-detail-card h4 {
  align-items: center;
  border-bottom: 1px solid #e4edf7;
  color: #111827;
  display: flex;
  font-size: 1rem;
  font-weight: 900;
  gap: 9px;
  margin: 0 0 14px;
  padding-bottom: 12px;
}

.preventive-detail-card h4 i {
  color: #1769e8;
}

.preventive-detail-kv {
  align-items: center;
  border-bottom: 1px solid #eef3f9;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
}

.preventive-detail-kv:last-child {
  border-bottom: 0;
}

.preventive-detail-kv span {
  color: #64748b;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.preventive-detail-kv strong {
  color: #0f172a;
  text-align: right;
}

.preventive-detail-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preventive-detail-chip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #0f55d7;
  font-size: .86rem;
  font-weight: 800;
  padding: 6px 10px;
}

.preventive-detail-checklist {
  display: grid;
  gap: 10px;
}

.preventive-detail-checkitem {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #d6e6ff;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr auto;
  padding: 12px;
}

.preventive-detail-checkitem span {
  align-items: center;
  background: #1a8df0;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.preventive-detail-checkitem strong {
  color: #111827;
  font-size: .96rem;
}

.preventive-detail-checkitem em {
  color: #64748b;
  font-size: .78rem;
  font-style: normal;
  font-weight: 900;
}

.preventive-detail-toolbar {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.preventive-detail-toolbar.compact {
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
}

.preventive-detail-status-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preventive-detail-status-btn {
  align-items: center;
  background: #fff;
  border: 1px solid #d6e3f2;
  border-radius: 10px;
  color: #334155;
  display: inline-flex;
  gap: 9px;
  padding: 9px 12px;
}

.preventive-detail-status-btn.tone-warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.preventive-detail-status-btn.tone-blue {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #6d28d9;
}

.preventive-detail-status-btn.tone-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.preventive-detail-status-btn.tone-success {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}

.preventive-detail-status-btn.tone-danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.preventive-detail-status-btn.tone-neutral {
  background: #fff;
  border-color: #94a3b8;
  color: #334155;
}

.preventive-detail-status-btn span {
  font-weight: 900;
}

.preventive-detail-status-btn strong {
  border-radius: 999px;
  padding: 2px 8px;
}

.preventive-detail-status-btn.active {
  box-shadow: 0 10px 24px rgba(15,23,42,.16);
  outline: 2px solid rgba(26,141,240,.2);
}

.preventive-detail-status-btn.tone-warning strong { background:#fff7ed;color:#c2410c; }
.preventive-detail-status-btn.tone-blue strong,
.preventive-detail-status-btn.tone-info strong { background:#eff6ff;color:#1d4ed8; }
.preventive-detail-status-btn.tone-success strong { background:#dcfce7;color:#15803d; }
.preventive-detail-status-btn.tone-danger strong { background:#fee2e2;color:#b91c1c; }
.preventive-detail-status-btn.tone-neutral strong { background:#f8fafc;color:#334155; }

.preventive-detail-filters {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(360px, 1fr) 170px 170px auto;
  width: 100%;
}

.preventive-detail-search-box {
  margin: 0;
  min-height: 38px;
}

.preventive-detail-wo-filters {
  grid-template-columns: minmax(220px, .75fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(118px, .7fr);
}

.preventive-detail-table {
  min-width: 1050px;
}

.preventive-detail-table td,
.preventive-detail-table th {
  vertical-align: middle;
}

.preventive-detail-pagination {
  margin-top: 14px;
}

.preventive-detail-title-note {
  align-items: center;
  color: #475569;
  display: flex;
  font-weight: 800;
  gap: 8px;
}

.preventive-detail-history-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.preventive-history-card-head {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.preventive-history-user {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  gap: 8px;
  max-width: 270px;
  padding: 6px 10px;
}

.preventive-history-user span {
  align-items: center;
  background: #dbeafe;
  border-radius: 999px;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.preventive-history-user strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-card-side {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.badge-status-pending { background:#dbeafe;color:#1d4ed8; }
.badge-status-progress { background:#ede9fe;color:#6d28d9; }
.badge-status-completed { background:#dcfce7;color:#15803d; }
.badge-status-overdue { background:#fee2e2;color:#b91c1c; }

@media (max-width: 900px) {
  .preventive-origin-grid {
    grid-template-columns: 1fr;
  }

  .preventive-detail-grid,
  .preventive-detail-filters {
    grid-template-columns: 1fr;
  }

  .preventive-detail-tabs {
    overflow-x: auto;
  }

  .preventive-detail-toolbar.compact {
    align-items: stretch;
    flex-direction: column;
  }
}

.preventive-card p {
  color: #667085;
  margin: 0 0 12px;
}

.preventive-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preventive-card-meta span {
  background: #f6f8fb;
  border: 1px solid #e7edf5;
  border-radius: 999px;
  color: #475467;
  font-size: .82rem;
  font-weight: 700;
  padding: 7px 10px;
}

.preventive-card-meta i {
  color: #2f6fec;
  margin-right: 6px;
}

.preventive-wo-summary {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
  margin-top: 14px;
  max-width: 620px;
  padding: 12px 14px;
}

.preventive-wo-summary-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.preventive-wo-summary-head span {
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.preventive-wo-summary-head strong {
  color: #0f172a;
  font-size: 1.28rem;
  line-height: 1;
}

.preventive-wo-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 8px;
}

.preventive-wo-metrics span {
  border: 1px solid transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
}

.preventive-wo-metrics small {
  font-size: .72rem;
  font-weight: 900;
}

.preventive-wo-metrics b {
  font-size: .98rem;
  font-weight: 900;
}

.preventive-wo-metrics .pending { background: #eff6ff; border-color: #bfdbfe; }
.preventive-wo-metrics .pending small,
.preventive-wo-metrics .pending b { color: #1d4ed8; }
.preventive-wo-metrics .progress { background: #ede9fe; border-color: #ddd6fe; }
.preventive-wo-metrics .progress small,
.preventive-wo-metrics .progress b { color: #7c3aed; }
.preventive-wo-metrics .completed { background: #dcfce7; border-color: #bbf7d0; }
.preventive-wo-metrics .completed small,
.preventive-wo-metrics .completed b { color: #15803d; }
.preventive-wo-metrics .overdue { background: #fee2e2; border-color: #fecaca; }
.preventive-wo-metrics .overdue small,
.preventive-wo-metrics .overdue b { color: #b91c1c; }

.preventive-skipped-assets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.preventive-skipped-assets span,
.preventive-skipped-assets em {
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(180, 83, 9, .18);
  border-radius: 12px;
  display: block;
  font-style: normal;
  padding: 9px 10px;
}

.preventive-skipped-assets strong {
  color: #0f172a;
  display: block;
  font-weight: 900;
}

.preventive-skipped-assets small {
  color: #64748b;
  display: block;
  font-weight: 700;
  margin-top: 2px;
}

.preventive-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.preventive-result-grid-1 { grid-template-columns: 1fr; }
.preventive-result-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.preventive-result-tile {
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 14px 12px;
  text-align: center;
}

.preventive-result-icon {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  margin-bottom: 8px;
  width: 32px;
}

.preventive-result-tile strong {
  color: #0f172a;
  display: block;
  font-size: 1.35rem;
  line-height: 1;
}

.preventive-result-tile small {
  color: #64748b;
  display: block;
  font-weight: 800;
  margin-top: 6px;
}

.preventive-result-tile.success { border-color: #bbf7d0; background: #f0fdf4; }
.preventive-result-tile.success .preventive-result-icon { background: #dcfce7; color: #15803d; }
.preventive-result-tile.blue { border-color: #bfdbfe; background: #eff6ff; }
.preventive-result-tile.blue .preventive-result-icon { background: #dbeafe; color: #1d4ed8; }
.preventive-result-tile.warning { border-color: #fde68a; background: #fffbeb; }
.preventive-result-tile.warning .preventive-result-icon { background: #fef3c7; color: #b45309; }
.preventive-result-tile.danger { border-color: #fecaca; background: #fef2f2; }
.preventive-result-tile.danger .preventive-result-icon { background: #fee2e2; color: #b91c1c; }
.preventive-result-tile.info { border-color: #bfdbfe; background: #eff6ff; }

.preventive-delete-preview-title {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 900;
  margin: 4px 0 12px;
}

.preventive-delete-message {
  border-radius: 14px;
  font-weight: 700;
  line-height: 1.45;
  margin-top: 12px;
  padding: 12px 14px;
  text-align: left;
}

.preventive-delete-message.info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

.preventive-delete-message.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.preventive-delete-message.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.preventive-delete-message.danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.preventive-popup-note {
  color: #475569;
  font-weight: 500;
  line-height: 1.55;
  margin: 14px 0 0;
  text-align: center;
}

.preventive-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.preventive-asset-picker {
  border: 1px solid #e4eaf2;
  border-radius: 14px;
  max-height: 290px;
  overflow: auto;
  padding: 8px;
}

#preventiveModal .modal-dialog {
  max-width: 1480px;
}

#preventiveModal .col-lg-5 {
  flex: 0 0 46%;
  max-width: 46%;
}

#preventiveModal .col-lg-7 {
  flex: 0 0 54%;
  max-width: 54%;
}

.preventive-picker-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preventive-asset-site-group + .preventive-asset-site-group {
  border-top: 1px solid #eef2f7;
  margin-top: 8px;
  padding-top: 8px;
}

.preventive-asset-site-title {
  color: #2f6fec;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  padding: 6px 8px;
  text-transform: uppercase;
}

@media (max-width: 992px) {
  #preventiveModal .col-lg-5,
  #preventiveModal .col-lg-7 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.preventive-asset-option {
  align-items: flex-start;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 10px;
}

.preventive-asset-option:hover {
  background: #f4f8ff;
}

.preventive-asset-option strong,
.preventive-asset-option small {
  display: block;
}

.preventive-asset-option small {
  color: #667085;
  font-size: .78rem;
}

.preventive-checklist-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto auto;
  margin-bottom: 8px;
}

.preventive-checklist-required {
  color: #475467;
  font-size: .82rem;
  font-weight: 800;
  margin: 0;
}

.preventive-weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preventive-weekdays label {
  background: #f5f8ff;
  border: 1px solid #dbe8ff;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  margin: 0;
  padding: 8px 12px;
}

.preventive-weekdays input {
  margin-right: 6px;
}

@media (max-width: 992px) {
  .preventive-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preventive-card {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .preventive-kpi-grid {
    grid-template-columns: 1fr;
  }

  .preventive-checklist-row {
    grid-template-columns: 1fr;
  }
}

/* Global SaaS theme uplift: shared visual language from the login screen. */
body:not(.login-page-modern) {
  background:
    radial-gradient(circle at 8% 0%, rgba(59, 130, 246, .16), transparent 26%),
    radial-gradient(circle at 92% 8%, rgba(30, 58, 138, .10), transparent 24%),
    linear-gradient(135deg, #eff6ff 0%, #ffffff 52%, #f4f7fb 100%);
}

body:not(.login-page-modern)::before {
  background:
    linear-gradient(rgba(15, 23, 42, .026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .026) 1px, transparent 1px);
  background-size: 38px 38px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.app-shell {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .03), transparent 42%),
    transparent;
}

.app-sidebar {
  background:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(180deg, #101b2d 0%, #132744 55%, #0b1728 100%);
  background-size: 34px 34px, 34px 34px, auto;
  border-right: 1px solid rgba(255,255,255,.08);
  box-shadow: 18px 0 60px rgba(15, 23, 42, .18);
}

.app-brand {
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  min-height: 86px;
  padding: 0 18px;
  justify-content:center;
}

.app-brand-mark {
  background: linear-gradient(135deg, #60a5fa, #1e3a8a);
  border-radius: 999px;
  box-shadow: 0 0 0 7px rgba(96, 165, 250, .16), 0 0 28px rgba(96, 165, 250, .45);
}

.app-brand-logo {
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .16));
  margin:0 auto;
}

.notifications-info-btn {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  height: 22px;
  justify-content: center;
  margin-left: 6px;
  padding: 0;
  width: 22px;
}

.notifications-info-btn:hover {
  background: #dbeafe;
  color: #1e3a8a;
}

.app-nav-label {
  color: rgba(255,255,255,.48);
  font-weight: 950;
}

.app-nav-link {
  border: 1px solid transparent;
  font-weight: 850;
}

.app-nav-link:hover {
  background: rgba(255, 255, 255, .095);
  border-color: rgba(255, 255, 255, .12);
  transform: translateX(2px);
}

.app-nav-link.active {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 18px 38px rgba(37, 99, 235, .34);
}

.app-nav-icon {
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border-radius: 12px;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.app-nav-link.active .app-nav-icon {
  background: rgba(255, 255, 255, .2);
}

.app-main {
  background:
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,255,255,.58) 38%, transparent 38%),
    transparent;
}

.app-topbar {
  background: rgba(255, 255, 255, .72);
  border-bottom: 1px solid rgba(203, 213, 225, .72);
  box-shadow: 0 18px 55px rgba(15, 23, 42, .08);
}

@supports (backdrop-filter: blur(12px)) {
  .app-topbar {
    backdrop-filter: blur(16px);
  }
}

.app-topbar-title {
  color: #0f172a;
  font-weight: 950;
}

.app-topbar-subtitle {
  color: #64748b;
  font-weight: 700;
}

.app-content {
  padding: 30px 34px 44px;
}

.page-title,
.detail-header-title {
  color: #0f172a;
  font-weight: 950;
  letter-spacing: -.045em;
}

.page-head {
  background:
    radial-gradient(circle at 42% 0%, rgba(96, 165, 250, .22), transparent 34%),
    linear-gradient(135deg, #2563eb 0%, #1e3a8a 46%, #0b1220 100%);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .12);
  overflow: hidden;
  padding: 24px 28px;
  position: relative;
}

.page-head::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, .38) 100%);
  clip-path: polygon(42% 0, 100% 0, 100% 100%, 0 100%);
  content: "";
  inset: 0 0 0 42%;
  opacity: .28;
  position: absolute;
}

.page-head > * {
  position: relative;
  z-index: 1;
}

.page-head .page-title {
  color: #fff;
}

.page-subtitle {
  color: rgba(255,255,255,.72);
  font-weight: 650;
}

.card-clean,
.filter-shell,
.table-shell,
.detail-shell {
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(203, 213, 225, .74);
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, .08);
}

@supports (backdrop-filter: blur(12px)) {
  .card-clean,
  .filter-shell,
  .table-shell,
  .detail-shell {
    backdrop-filter: blur(12px);
  }
}

.card-clean-header {
  background: linear-gradient(135deg, rgba(248, 250, 252, .95), rgba(255,255,255,.65));
  border-bottom: 1px solid rgba(203, 213, 225, .7);
  border-radius: 24px 24px 0 0;
}

.card-clean-title {
  color: #0f172a;
  font-weight: 950;
  letter-spacing: -.02em;
}

.filter-shell {
  border-top: 4px solid transparent;
  position: relative;
}

.detail-shell {
  position: relative;
}

.filter-shell::before,
.detail-shell::before {
  background: linear-gradient(90deg, #3b82f6, #1e3a8a, #0f172a);
  border-radius: 999px;
  content: "";
  height: 4px;
  left: 18px;
  position: absolute;
  right: 18px;
  top: -4px;
}

.form-control,
.custom-select {
  background-color: #f8fafc;
  border: 1px solid #dbe4f0;
  border-radius: 15px;
  color: #0f172a;
  font-weight: 700;
  min-height: 44px;
}

.form-control:focus,
.custom-select:focus {
  background: #fff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 5px rgba(59, 130, 246, .12);
}

.filter-label,
.info-label {
  color: #64748b;
  font-weight: 950;
}

.btn-action-primary,
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border: 0;
  box-shadow: 0 16px 32px rgba(37, 99, 235, .23);
}

.btn-action-primary:hover,
.btn-primary:hover {
  box-shadow: 0 22px 44px rgba(37, 99, 235, .32);
  transform: translateY(-1px);
}

.btn-outline-secondary,
.btn-soft-primary,
.export-toggle-btn {
  background: rgba(255, 255, 255, .78);
  border-color: #cbd5e1;
  border-radius: 14px;
  color: #334155;
  font-weight: 850;
}

.btn-outline-secondary:hover,
.btn-soft-primary:hover,
.export-toggle-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.btn-soft-danger {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 14px;
  color: #be123c;
  font-weight: 850;
}

.kpi-card,
.preventive-kpi-card,
.asset-stat-chip {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .13);
}

.dashboard-toolbar {
  align-items: center;
  background:
    radial-gradient(circle at 78% 16%, rgba(96, 165, 250, .16), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.9));
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px 20px;
}

.dashboard-site-filter {
  min-width: 280px;
}

.dashboard-toolbar-actions {
  align-items: end;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-export-block {
  min-width: 210px;
}

.dashboard-pdf-export-btn {
  align-items: center;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  padding-left: 18px;
  padding-right: 18px;
  width: 100%;
}

.dashboard-health-card {
  --health-accent: #2563eb;
  --health-dark: #12235c;
  --health-mid: #2456d6;
  --health-bright: #0ea5e9;
  --health-soft: rgba(255, 255, 255, .16);
  background:
    linear-gradient(rgba(255,255,255,.105) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.105) 1px, transparent 1px),
    radial-gradient(circle at 78% 18%, rgba(255,255,255,.22), transparent 18%),
    linear-gradient(135deg, var(--health-dark) 0%, var(--health-mid) 52%, var(--health-bright) 100%);
  background-size: 26px 26px, 26px 26px, auto, auto;
  border: 1px solid rgba(191, 219, 254, .55);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .18);
  overflow: hidden;
  padding: 26px;
  position: relative;
}

.dashboard-health-card::before {
  background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,0) 58%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.dashboard-health-card::after {
  background: rgba(255,255,255,.72);
  border-radius: 999px;
  box-shadow: 0 0 70px rgba(255,255,255,.34);
  content: "";
  height: 150px;
  opacity: .14;
  position: absolute;
  right: -34px;
  top: -38px;
  width: 150px;
}

.dashboard-health-excellent {
  --health-accent: #22c55e;
  --health-dark: #172554;
  --health-mid: #2563eb;
  --health-bright: #0ea5e9;
}

.dashboard-health-stable {
  --health-accent: #60a5fa;
  --health-dark: #16265e;
  --health-mid: #2563eb;
  --health-bright: #0ea5e9;
}

.dashboard-health-warning {
  --health-accent: #f59e0b;
  --health-dark: #172554;
  --health-mid: #2563eb;
  --health-bright: #0ea5e9;
}

.dashboard-health-critical {
  --health-accent: #fb7185;
  --health-dark: #172554;
  --health-mid: #1d4ed8;
  --health-bright: #0ea5e9;
}

.dashboard-health-main {
  align-items: center;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.dashboard-health-copy {
  max-width: 820px;
}

.dashboard-health-eyebrow {
  color: rgba(255, 255, 255, .82);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .04em;
  margin: 0;
  text-transform: uppercase;
}

.dashboard-health-eyebrow-row {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  margin-bottom: 8px;
}

.dashboard-health-info-btn {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.36);
  color: #fff;
  height: 26px;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 26px;
}

.dashboard-health-copy h2 {
  color: #ffffff;
  font-size: clamp(1.8rem, 2.7vw, 3rem);
  font-weight: 950;
  line-height: 1.1;
  margin: 0 0 8px;
  text-shadow: 0 12px 34px rgba(15, 23, 42, .24);
}

.dashboard-health-copy p {
  color: rgba(255, 255, 255, .84);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.5;
  margin: 0;
  max-width: 780px;
}

.dashboard-health-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.dashboard-health-badge,
.dashboard-health-trend {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: .84rem;
  font-weight: 950;
  gap: 8px;
  min-height: 34px;
  padding: 8px 14px;
}

.dashboard-health-badge {
  background: rgba(255, 255, 255, .9);
  color: #0f172a;
}

.dashboard-health-badge i {
  color: var(--health-accent);
}

.dashboard-health-trend {
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  color: #ffffff;
}

.dashboard-health-score {
  align-items: center;
  aspect-ratio: 1;
  background: conic-gradient(var(--health-color) calc(var(--health-score) * 1%), rgba(255,255,255,.18) 0);
  border-radius: 999px;
  display: flex;
  flex: 0 0 162px;
  justify-content: center;
  position: relative;
  width: 162px;
  z-index: 1;
}

.dashboard-health-score::after {
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.78));
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.64), 0 18px 45px rgba(15, 23, 42, .18);
  content: "";
  height: 114px;
  position: absolute;
  width: 114px;
}

.dashboard-health-score div {
  align-items: baseline;
  color: #0f172a;
  display: flex;
  gap: 3px;
  position: relative;
  z-index: 1;
}

.dashboard-health-score strong {
  font-size: 2.7rem;
  font-weight: 950;
  line-height: 1;
}

.dashboard-health-score span {
  color: #64748b;
  font-size: .9rem;
  font-weight: 900;
}

.dashboard-health-factors {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

.dashboard-health-factor {
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
  padding: 14px;
}

.dashboard-health-factor-top {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.dashboard-health-factor-top span {
  color: rgba(255, 255, 255, .74);
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.2;
}

.dashboard-health-factor-top strong {
  color: #ffffff;
  font-size: .9rem;
  font-weight: 950;
  white-space: nowrap;
}

.dashboard-health-factor-bar {
  background: rgba(255, 255, 255, .18);
  border-radius: 999px;
  height: 7px;
  margin-top: 12px;
  overflow: hidden;
}

.dashboard-health-factor-bar i {
  background: #ffffff;
  border-radius: inherit;
  display: block;
  height: 100%;
}

.dashboard-health-factor.factor-good .dashboard-health-factor-bar i { background: #22c55e; }
.dashboard-health-factor.factor-notice .dashboard-health-factor-bar i { background: #60a5fa; }
.dashboard-health-factor.factor-warning .dashboard-health-factor-bar i { background: #facc15; }
.dashboard-health-factor.factor-critical .dashboard-health-factor-bar i { background: #fb7185; }

.dashboard-chart-card .card-clean-body {
  height: 330px;
}

.dashboard-chart-card,
.dashboard-ops-card,
.dashboard-toolbar {
  border-color: rgba(147, 197, 253, .34);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .09);
}

.dashboard-card-header {
  align-items: flex-start;
  background:
    radial-gradient(circle at 92% 20%, rgba(37, 99, 235, .10), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,250,252,.9));
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.dashboard-card-subtitle {
  color: #64748b;
  display: block;
  font-size: .82rem;
  font-weight: 750;
  margin-top: 3px;
}

.dashboard-kpi-card {
  min-height: 118px;
  overflow: hidden;
  position: relative;
}

.dashboard-kpi-card::after {
  background: radial-gradient(circle, rgba(255,255,255,.36), transparent 62%);
  content: "";
  height: 150px;
  position: absolute;
  right: -52px;
  top: -52px;
  width: 150px;
}

.dashboard-kpi-card .card-clean-body {
  position: relative;
  z-index: 1;
}

.dashboard-info-btn {
  align-items: center;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 999px;
  color: rgba(255,255,255,.92);
  display: inline-flex;
  height: 28px;
  justify-content: center;
  position: absolute;
  right: 18px;
  top: 16px;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
  width: 28px;
  z-index: 2;
}

.dashboard-info-btn:hover {
  background: rgba(255,255,255,.34);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .18);
  color: #fff;
  transform: translateY(-1px);
}

.dashboard-info-btn.light {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
  flex: 0 0 auto;
  position: static;
}

.dashboard-info-btn.light:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.dashboard-ops-card {
  min-height: 100%;
}

.dashboard-big-metric {
  align-items: baseline;
  color: #0f172a;
  display: flex;
  gap: 8px;
  font-size: clamp(2.25rem, 3vw, 3.1rem);
  font-weight: 950;
  line-height: 1;
}

.dashboard-big-metric small {
  color: #64748b;
  font-size: 1rem;
  font-weight: 900;
}

.dashboard-overdue-box {
  align-items: center;
  background:
    radial-gradient(circle at 90% 18%, rgba(37, 99, 235, .14), transparent 34%),
    linear-gradient(135deg, #eff6ff, #ffffff);
  border: 1px solid #bfdbfe;
  border-radius: 22px;
  display: flex;
  gap: 14px;
  padding: 18px;
}

.dashboard-overdue-box strong {
  color: #1d4ed8;
  font-size: 2.7rem;
  font-weight: 950;
  line-height: 1;
}

.dashboard-overdue-box span,
.dashboard-overdue-sub {
  color: #475569;
  font-weight: 900;
}

.dashboard-overdue-sub {
  margin-top: 14px;
}

.dashboard-overdue-sub span {
  color: #2563eb;
}

.dashboard-heatmap {
  overflow-x: auto;
}

.dashboard-heatmap-hours {
  display: grid;
  gap: 4px;
  grid-template-columns: 34px repeat(24, minmax(22px, 1fr));
  margin-bottom: 6px;
  min-width: 780px;
}

.dashboard-heatmap-hours::before {
  content: "";
}

.dashboard-heatmap-hours span {
  color: #64748b;
  font-size: .72rem;
  font-weight: 800;
  text-align: center;
}

.dashboard-heatmap-grid {
  display: grid;
  gap: 4px;
  grid-template-columns: 34px repeat(24, minmax(22px, 1fr));
  min-width: 780px;
}

.dashboard-heatmap-label {
  color: #334155;
  font-size: .78rem;
  font-weight: 950;
  line-height: 24px;
  text-align: center;
}

.dashboard-heatmap-cell {
  background: #eff6ff;
  border-radius: 7px;
  height: 24px;
}

.dashboard-heatmap-cell.heat-1 { background: #dbeafe; }
.dashboard-heatmap-cell.heat-2 { background: #bfdbfe; }
.dashboard-heatmap-cell.heat-3 { background: #60a5fa; }
.dashboard-heatmap-cell.heat-4 { background: #2563eb; }
.dashboard-heatmap-cell.heat-5 { background: #312e81; }

.kpi-navy {
  background:
    radial-gradient(circle at 88% 22%, rgba(96, 165, 250, .30), transparent 30%),
    linear-gradient(135deg, #0f172a, #1e3a8a);
}

.kpi-purple {
  background:
    radial-gradient(circle at 86% 20%, rgba(196, 181, 253, .22), transparent 32%),
    linear-gradient(135deg, #2563eb, #4338ca);
}

.kpi-sky {
  background:
    radial-gradient(circle at 86% 20%, rgba(255, 255, 255, .28), transparent 32%),
    linear-gradient(135deg, #2563eb, #0ea5e9);
}

.kpi-deep-blue {
  background:
    radial-gradient(circle at 88% 22%, rgba(14, 165, 233, .26), transparent 30%),
    linear-gradient(135deg, #1d4ed8, #0f172a);
}

.dashboard-info-popup {
  border: 1px solid rgba(147, 197, 253, .45);
  box-shadow: 0 32px 90px rgba(15, 23, 42, .24);
  max-width: 430px;
}

.dashboard-info-popup .confirm-dialog-icon {
  background: linear-gradient(135deg, #2563eb, #0f172a);
  color: #fff;
}

@media (max-width: 991.98px) {
  .dashboard-health-factors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .dashboard-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-site-filter {
    min-width: 0;
    width: 100%;
  }

  .dashboard-health-card {
    padding: 18px;
  }

  .dashboard-health-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-health-score {
    flex-basis: 132px;
    width: 132px;
  }

  .dashboard-health-score::after {
    height: 94px;
    width: 94px;
  }

  .dashboard-health-factors {
    grid-template-columns: 1fr;
  }
}

.kpi-blue,
.preventive-kpi-card {
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(135deg, #1d4ed8, #0ea5e9);
  background-size: 24px 24px, 24px 24px, auto;
}

.kpi-blue {
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  background-size: auto;
}

.kpi-green {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.kpi-orange {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.kpi-red {
  background: linear-gradient(135deg, #dc2626, #fb7185);
}

.metric-row,
.info-item,
.timeline-card,
.preventive-execution-item {
  background: rgba(248, 250, 252, .88);
  border-color: rgba(203, 213, 225, .72);
}

.table-wrap {
  border-radius: 0 0 24px 24px;
}

.table-clean {
  background: rgba(255,255,255,.72);
}

.table-clean thead th {
  background: #eef4ff;
  color: #475569;
  font-weight: 950;
}

.table-clean tbody tr {
  transition: background .16s ease, transform .16s ease;
}

.table-clean tbody tr:hover {
  background: #f1f7ff;
}

.detail-header {
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.84)),
    linear-gradient(90deg, rgba(37,99,235,.16), transparent);
  border: 1px solid rgba(203, 213, 225, .74);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .1);
}

.detail-header-code {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 950;
}

.detail-tab-btn {
  background: rgba(255,255,255,.76);
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  font-weight: 900;
}

.detail-tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border-color: transparent;
  box-shadow: 0 18px 36px rgba(37, 99, 235, .24);
}

.advanced-filters-panel.open,
.asset-workorders-filter-panel.open {
  background: rgba(248, 250, 252, .88);
  border: 1px solid rgba(203, 213, 225, .78);
  border-radius: 22px;
  padding: 16px;
}

.table-pagination-bar {
  background: rgba(248, 250, 252, .86);
  border-top: 1px solid rgba(203, 213, 225, .74);
}

.modal-clean,
.modal-content {
  border: 1px solid rgba(203, 213, 225, .74);
  border-radius: 28px;
  box-shadow: 0 34px 90px rgba(15, 23, 42, .25);
}

.modal-clean-header,
.modal-header {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border-bottom: 1px solid rgba(203, 213, 225, .72);
}

@media (max-width: 991.98px) {
  .app-content {
    padding: 20px 16px 34px;
  }

  .app-main {
    background: transparent;
  }
}

/* Preventive module polish after global theme. */
.preventive-kpi-card {
  min-height: 132px;
  overflow: hidden;
  padding: 22px;
}

.preventive-kpi-card::after {
  bottom: 16px;
  color: rgba(255,255,255,.2);
  content: "\f073";
  font-family: "Font Awesome 6 Free";
  font-size: 3rem;
  font-weight: 900;
  position: absolute;
  right: 18px;
}

.preventive-kpi-card:nth-child(1)::after {
  content: "\f1ad";
}

.preventive-kpi-card:nth-child(2)::after {
  content: "\f017";
}

.preventive-kpi-card:nth-child(3)::after {
  content: "\f071";
}

.preventive-kpi-card:nth-child(4)::after {
  content: "\f058";
}

.preventive-kpi-card span,
.preventive-kpi-card strong {
  color: #fff;
  position: relative;
  z-index: 1;
}

.preventive-kpi-card span {
  opacity: .86;
}

.preventive-kpi-card strong {
  font-size: 2.1rem;
  margin-top: 12px;
}

.preventive-kpi-info {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.24);
  color: #fff;
  z-index: 2;
}

.preventive-kpi-card {
  background:
    radial-gradient(circle at 88% 22%, rgba(96, 165, 250, .28), transparent 30%),
    linear-gradient(135deg, #2563eb 0%, #1d4ed8 46%, #0f172a 100%);
  background-size: auto;
  border: 0 !important;
}

.preventive-kpi-card.warning {
  background:
    radial-gradient(circle at 88% 22%, rgba(147, 197, 253, .25), transparent 30%),
    linear-gradient(135deg, #3b82f6 0%, #1e3a8a 48%, #0f172a 100%);
  border: 0 !important;
}

.preventive-kpi-card.danger {
  background:
    radial-gradient(circle at 88% 22%, rgba(59, 130, 246, .25), transparent 30%),
    linear-gradient(135deg, #1e3a8a 0%, #172554 48%, #0f172a 100%);
  border: 0 !important;
}

.preventive-kpi-card.success {
  background:
    radial-gradient(circle at 88% 22%, rgba(14, 165, 233, .24), transparent 30%),
    linear-gradient(135deg, #2563eb 0%, #1e40af 52%, #0f172a 100%);
  border: 0 !important;
}

.preventive-filters-basic {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 2fr) minmax(180px, 1fr) minmax(180px, 1fr);
}

.preventive-filters-advanced {
  background: rgba(248, 250, 252, .88);
  border: 1px solid rgba(203, 213, 225, .78);
  border-radius: 22px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  margin-top: 16px;
  padding: 16px;
}

.preventive-filters-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  margin-top: 16px;
}

.preventive-filters-clear {
  margin-top: 14px;
}

.preventive-list .preventive-card {
  background: rgba(255,255,255,.78);
  gap: 26px;
  padding: 22px 24px;
}

.preventive-list .preventive-card:hover {
  background: #f8fbff;
}

.preventive-card-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Work order detail spacing pass. */
.detail-shell-body {
  padding: 30px;
}

.detail-header {
  align-items: flex-start;
  border-bottom: 0;
  gap: 26px;
  margin: 0 0 28px;
  padding: 26px;
}

.detail-tabs-wrap {
  margin: 0 0 26px;
}

.detail-tab-content {
  padding-top: 2px;
}

.tab-pane-custom.active > .row {
  margin-left: -12px;
  margin-right: -12px;
}

.tab-pane-custom.active > .row > [class*="col-"] {
  padding-left: 12px;
  padding-right: 12px;
}

.tab-pane-custom .card-clean {
  margin-bottom: 22px;
}

@media (max-width: 1200px) {
  .preventive-filters-advanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .preventive-filters-basic,
  .preventive-filters-advanced {
    grid-template-columns: 1fr;
  }

  .detail-shell-body {
    padding: 20px;
  }

  .detail-header {
    padding: 22px;
  }
}

/* Users / company self-service module. */
.users-plan-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.users-plan-card {
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(135deg, #1d4ed8, #0ea5e9);
  background-size: 24px 24px, 24px 24px, auto;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .13);
  color: #fff;
  min-height: 148px;
  overflow: hidden;
  padding: 20px;
  position: relative;
}

.users-plan-card-main {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.users-plan-card-icon {
  align-items: center;
  background: rgba(255,255,255,.16);
  border-radius: 16px;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  margin-bottom: 18px;
  width: 42px;
}

.users-plan-card span,
.users-plan-card strong,
.users-plan-card small {
  display: block;
  position: relative;
  z-index: 1;
}

.users-plan-card span {
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .08em;
  opacity: .86;
  text-transform: uppercase;
}

.users-plan-card strong {
  font-size: 1.55rem;
  font-weight: 950;
  line-height: 1.1;
  margin-top: 8px;
}

.users-plan-card strong small,
.users-plan-card > small {
  color: rgba(255,255,255,.72);
  font-size: .84rem;
  font-weight: 800;
}

.users-plan-meter {
  background: rgba(255,255,255,.2);
  border-radius: 999px;
  bottom: 18px;
  height: 8px;
  left: 20px;
  overflow: hidden;
  position: absolute;
  right: 20px;
}

.users-plan-meter span {
  background: #fff;
  border-radius: inherit;
  height: 100%;
}

.users-filters-grid {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 2fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
}

.users-filter-actions {
  display: flex;
  justify-content: flex-end;
}

.users-user-cell {
  align-items: center;
  display: flex;
  gap: 12px;
}

.users-avatar {
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border-radius: 16px;
  color: #fff;
  display: inline-flex;
  font-weight: 950;
  height: 42px;
  justify-content: center;
  width: 42px;
  overflow: hidden;
}

.users-avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.users-role-pill,
.users-site-chip {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: .82rem;
  font-weight: 900;
  justify-content: center;
  margin: 2px;
  padding: 7px 10px;
  text-align: center;
}

.users-role-cell {
  text-align: center;
}

.users-role-pill {
  min-width: 92px;
  white-space: normal;
}

.users-site-chip {
  background: #f1f5f9;
  color: #475569;
}

.users-sites-inline,
.users-sites-popup-list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.users-site-chip-more {
  border: 0;
  background: #e5e7eb;
  color: #475569;
  cursor: pointer;
  font-weight: 950;
}

.users-site-chip-all {
  background: #e5e7eb;
  color: #475569;
}

.users-center-name-cell {
  align-items: center;
  display: flex;
  gap: 12px;
}

.users-center-icon {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  color: #2563eb;
  display: inline-flex;
  flex: 0 0 38px;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.users-sites-popup-list {
  justify-content: center;
  margin-top: 6px;
}

.users-sites-picker-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.users-user-modal {
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow:
    0 -18px 46px rgba(226, 232, 240, .28),
    0 34px 100px rgba(2, 6, 23, .42),
    0 0 0 6px rgba(191, 219, 254, .16);
  overflow: hidden;
  outline: 1px solid rgba(219, 234, 254, .72);
}

.users-user-modal-header {
  align-items: center;
  background:
    radial-gradient(circle at 42% 0%, rgba(96, 165, 250, .22), transparent 34%),
    linear-gradient(135deg, #2563eb 0%, #1e3a8a 46%, #0b1220 100%);
  color: #fff;
  min-height: 106px;
  padding: 22px 28px;
  position: relative;
}

.users-user-modal-header .close {
  align-items: center;
  background: #ef4444;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 16px;
  display: inline-flex;
  color: #fff;
  font-size: 1.6rem;
  height: 42px;
  justify-content: center;
  opacity: 1;
  position: absolute;
  right: 34px;
  top: 30px;
  text-shadow: none;
  width: 42px;
}

.users-user-modal-header .close span {
  display: block;
  line-height: 1;
  transform: translateY(-2px);
}

.users-user-modal-header .close:hover {
  background: #b91c1c;
  box-shadow: 0 14px 28px rgba(185, 28, 28, .28);
}

.users-user-modal-title {
  align-items: center;
  display: flex;
  gap: 14px;
}

.users-user-modal-title .modal-title {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 950;
  margin: 0;
}

.users-user-modal-title p {
  color: rgba(226, 232, 240, .88);
  font-weight: 750;
  margin: 3px 0 0;
}

.users-user-modal-icon {
  align-items: center;
  background: linear-gradient(135deg, #3b82f6, #1e3a8a);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(14, 165, 233, .22);
  display: inline-flex;
  font-size: 1.25rem;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.users-user-modal .modal-body {
  background:
    linear-gradient(135deg, rgba(239, 246, 255, .78), rgba(255, 255, 255, .96)),
    radial-gradient(circle at 15% 10%, rgba(59, 130, 246, .12), transparent 32%);
  padding: 22px 26px 18px;
}

.users-user-modal-strip {
  display: none;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.users-user-modal-strip div {
  align-items: center;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(203, 213, 225, .82);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
  color: #334155;
  display: flex;
  font-weight: 900;
  gap: 10px;
  padding: 12px 14px;
}

.users-user-modal-strip i,
.users-user-form-grid .filter-label i {
  color: #2563eb;
}

.users-user-form-grid .form-control {
  background: rgba(255, 255, 255, .9);
  border-radius: 16px;
  min-height: 46px;
}

.users-user-form-grid .form-control:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.users-user-modal .modal-footer {
  background: rgba(248, 250, 252, .96);
  border-top: 1px solid rgba(203, 213, 225, .74);
  padding: 16px 26px;
}

.users-site-modal .users-user-modal-icon {
  background: linear-gradient(135deg, #3b82f6, #1e3a8a);
}

.users-site-modal-note {
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
  border: 1px solid rgba(147, 197, 253, .72);
  border-radius: 18px;
  color: #334155;
  font-weight: 850;
  margin: 6px 0 0;
  padding: 14px 16px;
}

.users-site-modal-note i {
  color: #2563eb;
  margin-right: 8px;
}

.app-form-modal {
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow:
    0 -18px 46px rgba(226, 232, 240, .28),
    0 34px 100px rgba(2, 6, 23, .42),
    0 0 0 6px rgba(191, 219, 254, .16);
  overflow: hidden;
  outline: 1px solid rgba(219, 234, 254, .72);
}

.app-form-modal-header {
  align-items: center;
  background:
    radial-gradient(circle at 42% 0%, rgba(96, 165, 250, .22), transparent 34%),
    linear-gradient(135deg, #2563eb 0%, #1e3a8a 46%, #0b1220 100%);
  color: #fff;
  min-height: 106px;
  padding: 22px 28px;
  position: relative;
}

.app-form-modal-header .modal-title {
  color: #fff;
  font-size: 1.34rem;
  font-weight: 950;
  letter-spacing: -.02em;
  margin: 0;
}

.app-form-modal-header p {
  color: rgba(226, 232, 240, .9);
  font-weight: 750;
  margin: 4px 0 0;
}

.app-form-modal-title {
  align-items: center;
  display: flex;
  gap: 14px;
  padding-right: 54px;
}

.app-form-modal-icon {
  align-items: center;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(14, 165, 233, .22);
  display: inline-flex;
  font-size: 1.25rem;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.app-form-modal-header .close {
  align-items: center;
  background: #ef4444;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 16px;
  color: #fff;
  display: inline-flex;
  font-size: 1.6rem;
  height: 42px;
  justify-content: center;
  opacity: 1;
  position: absolute;
  right: 34px;
  text-shadow: none;
  top: 30px;
  width: 42px;
}

.app-form-modal-header .close span {
  display: block;
  line-height: 1;
  transform: translateY(-2px);
}

.app-form-modal-header .close:hover {
  background: #b91c1c;
  box-shadow: 0 14px 28px rgba(185, 28, 28, .28);
}

.app-form-modal-header .app-modal-close {
  align-items: center;
  background: #ef4444;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 16px;
  color: #fff;
  display: inline-flex;
  font-size: 1.35rem;
  height: 42px;
  justify-content: center;
  opacity: 1;
  position: absolute;
  right: 34px;
  text-shadow: none;
  top: 30px;
  transition: .16s ease;
  width: 42px;
}

.app-form-modal-header .app-modal-close:hover {
  background: #dc2626;
  box-shadow: 0 14px 28px rgba(185, 28, 28, .28);
}

.app-modal-panel {
  background: #fff;
  border: 1px solid rgba(203, 213, 225, .95);
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .32);
  max-width: calc(100vw - 32px);
  overflow: hidden;
  position: relative;
}

.export-range-modal {
  width: min(620px, calc(100vw - 32px));
}

.app-modal-hero {
  align-items: center;
  background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 45%, #0f172a 100%);
  color: #fff;
  display: flex;
  gap: 16px;
  padding: 26px 30px 24px;
}

.app-modal-hero h3 {
  font-size: 1.45rem;
  font-weight: 950;
  margin: 0 0 4px;
}

.app-modal-hero p {
  color: rgba(255, 255, 255, .86);
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
  max-width: 440px;
}

.app-modal-hero-icon {
  align-items: center;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 18px;
  display: inline-flex;
  flex: 0 0 52px;
  font-size: 1.35rem;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.app-modal-body {
  background:
    linear-gradient(135deg, rgba(239, 246, 255, .75), rgba(255, 255, 255, .98)),
    radial-gradient(circle at 14% 10%, rgba(59, 130, 246, .12), transparent 36%);
  padding: 24px 30px;
}

.app-modal-close.modal-close-danger {
  align-items: center;
  background: #ef4444;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 16px;
  color: #fff;
  display: inline-flex;
  font-size: 1.25rem;
  height: 42px;
  justify-content: center;
  position: absolute;
  right: 24px;
  top: 24px;
  transition: .16s ease;
  width: 42px;
  z-index: 2;
}

.app-modal-close.modal-close-danger:hover {
  background: #dc2626;
  box-shadow: 0 14px 28px rgba(185, 28, 28, .28);
}

.form-helper-box.info-neutral {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  color: #1e3a8a;
  font-weight: 850;
  padding: 14px 16px;
}

.app-form-modal .modal-body,
.app-form-modal .modal-clean-body {
  background:
    linear-gradient(135deg, rgba(239, 246, 255, .78), rgba(255, 255, 255, .96)),
    radial-gradient(circle at 15% 10%, rgba(59, 130, 246, .12), transparent 32%);
  padding: 22px 26px 18px;
}

.app-form-modal-strip {
  display: none;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.app-form-modal-strip div {
  align-items: center;
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(203, 213, 225, .84);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
  color: #334155;
  display: flex;
  font-weight: 900;
  gap: 10px;
  padding: 12px 14px;
}

.app-form-modal-strip i,
.app-form-grid .filter-label i {
  color: #2563eb;
}

.app-form-grid .form-control,
.app-form-modal .form-control {
  border-radius: 16px;
  min-height: 46px;
}

.app-form-grid .form-control:focus,
.app-form-modal .form-control:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.app-form-modal .modal-footer,
.app-form-modal .modal-clean-footer {
  background: rgba(248, 250, 252, .96);
  border-top: 1px solid rgba(203, 213, 225, .74);
  padding: 16px 26px;
}

body:has(.app-form-modal) .modal-backdrop.show {
  backdrop-filter: blur(3px);
  background: #020617;
  opacity: .66;
}

body:has(.users-user-modal) .modal-backdrop.show {
  backdrop-filter: blur(3px);
  background: #020617;
  opacity: .66;
}

@media (max-width: 767.98px) {
  .users-user-modal-strip {
    grid-template-columns: 1fr;
  }

  .users-user-modal-header {
    padding: 18px;
  }
}

.users-sites-picker {
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(191, 219, 254, .95);
  border-radius: 22px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 260px;
  overflow: auto;
  padding: 12px;
}

.users-site-option,
.users-active-toggle {
  align-items: center;
  background: rgba(248, 250, 252, .92);
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  cursor: pointer;
  display: flex;
  font-weight: 850;
  gap: 10px;
  margin: 0;
  padding: 12px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.users-site-option:hover {
  border-color: #93c5fd;
  box-shadow: 0 14px 26px rgba(37, 99, 235, .08);
  transform: translateY(-1px);
}

.users-site-option input[type="checkbox"] {
  accent-color: #2563eb;
}

.users-active-toggle {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  display: inline-flex;
  padding: 13px 16px;
}

.users-active-switch {
  display: inline-flex;
  margin: 0;
  user-select: none;
}

.users-active-switch input {
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.users-active-switch-track {
  align-items: center;
  background: linear-gradient(135deg, #fee2e2, #fff7ed);
  border: 1px solid #fecaca;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78), 0 14px 30px rgba(15, 23, 42, .08);
  color: #991b1b;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 48px;
  min-width: 214px;
  overflow: hidden;
  padding: 5px;
  position: relative;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.users-active-switch-knob {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 999px;
  box-shadow: 0 12px 22px rgba(220, 38, 38, .22);
  height: 36px;
  left: 6px;
  position: absolute;
  top: 5px;
  transform: translateX(104px);
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
  width: 98px;
  z-index: 1;
}

.users-active-switch-text {
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
  line-height: 1;
  position: relative;
  text-align: center;
  transition: color .2s ease, opacity .2s ease;
  z-index: 2;
}

.users-active-switch input:checked + .users-active-switch-track {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  border-color: #93c5fd;
  color: #1d4ed8;
}

.users-active-switch input:checked + .users-active-switch-track .users-active-switch-knob {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 12px 22px rgba(37, 99, 235, .24);
  transform: translateX(0);
}

.users-active-switch input:checked + .users-active-switch-track .is-on,
.users-active-switch input:not(:checked) + .users-active-switch-track .is-off {
  color: #fff;
}

.users-active-switch input:not(:checked) + .users-active-switch-track .is-on,
.users-active-switch input:checked + .users-active-switch-track .is-off {
  opacity: .58;
}

.users-active-switch.is-disabled {
  opacity: .62;
}

.users-active-switch.is-disabled .users-active-switch-track {
  cursor: not-allowed;
}

.users-site-impact-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.users-site-impact-grid span {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #475569;
  display: block;
  font-weight: 800;
  padding: 10px 12px;
}

.users-site-impact-grid strong {
  color: #0f172a;
  display: block;
  font-size: 1.1rem;
}

.users-management-shell {
  overflow: visible;
}

.users-toolbar-main {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding: 18px;
  gap: 14px;
  flex-wrap: wrap;
}

.users-filter-panel {
  padding: 18px;
}

.users-filters-grid-wide {
  grid-template-columns: minmax(260px, 1.8fr) repeat(3, minmax(180px, 1fr));
}

.users-filters-grid-centers {
  grid-template-columns: minmax(280px, 2fr) minmax(200px, .8fr);
}

.filter-clean-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.users-plan-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  justify-content: center;
  font-weight: 950;
  letter-spacing: .02em;
  min-width: 96px;
  padding: 7px 12px;
  text-align: center;
}

.users-table-modern .users-plan-badge {
  width: 96px;
}

.users-plan-badge.plan-basic {
  background: #dbeafe;
  color: #1d4ed8;
}

.users-plan-badge.plan-pro {
  background: #e0e7ff;
  color: #1e3a8a;
}

.users-plan-badge.plan-premium {
  background: #ede9fe;
  color: #7c3aed;
}

.users-plan-badge.plan-enterprise {
  background: #e2e8f0;
  color: #334155;
}

.users-plan-badge.plan-platform {
  background: #0f172a;
  color: #fff;
}

.users-site-chip small {
  color: #64748b;
  display: block;
  font-size: .72rem;
}

.notifications-wrap {
  position: relative;
}

.notifications-bell-btn {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  color: #334155;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  position: relative;
  transition: .18s ease;
  width: 42px;
}

.notifications-bell-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}

.notifications-count {
  align-items: center;
  background: #ef4444;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 950;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 5px;
  position: absolute;
  right: -7px;
  top: -7px;
}

.notifications-dropdown {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, .22);
  display: none;
  min-width: 410px;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 1300;
}

.notifications-dropdown.open {
  display: block;
}

.notifications-dropdown-head {
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 16px;
}

.notifications-dropdown-head strong {
  color: #0f172a;
  font-weight: 950;
}

.notifications-clear-btn {
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border: 1px solid rgba(37, 99, 235, .25);
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .2);
  color: #fff;
  display: inline-flex;
  font-size: .84rem;
  font-weight: 950;
  gap: 7px;
  justify-content: center;
  line-height: 1;
  min-height: 38px;
  padding: 10px 13px;
  text-transform: uppercase;
  transition: .18s ease;
}

.notifications-dropdown-clear-btn {
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
  font-size: .76rem;
  min-height: 34px;
  padding: 8px 10px;
  white-space: nowrap;
}

.notifications-clear-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #0284c7);
  box-shadow: 0 12px 24px rgba(37, 99, 235, .28);
  color: #fff;
  transform: translateY(-1px);
}

.notifications-clear-btn:disabled {
  cursor: not-allowed;
  opacity: .65;
  transform: none;
}

.notifications-list {
  max-height: 420px;
  overflow-y: auto;
}

.notification-item {
  background: #fff;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  color: #334155;
  cursor: pointer;
  display: block;
  padding: 13px 16px;
  text-align: left;
  width: 100%;
}

.notification-item:hover {
  background: #f8fafc;
}

.notification-item.is-unread {
  background: linear-gradient(90deg, rgba(219, 234, 254, .78), #fff);
}

.notification-item strong {
  color: #0f172a;
  display: block;
  font-weight: 950;
  margin: 4px 0;
}

.notification-item span:not(.notification-type) {
  display: block;
  font-size: .88rem;
  line-height: 1.35;
}

.notification-item small {
  color: #64748b;
  display: block;
  font-size: .78rem;
  margin-top: 6px;
}

.notification-type {
  background: #ede9fe;
  border-radius: 999px;
  color: #7c3aed;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 950;
  padding: 4px 8px;
}

.notifications-more-btn {
  background: #f8fafc;
  border: 0;
  border-top: 1px solid #e5e7eb;
  color: #2563eb;
  font-weight: 950;
  padding: 13px 16px;
  width: 100%;
}

.notifications-more-btn:hover {
  background: #eff6ff;
}

.notifications-empty {
  color: #64748b;
  padding: 24px 18px;
  text-align: center;
}

.notifications-history-modal {
  overflow: hidden;
}

.notifications-history-modal .app-form-modal-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.notifications-history-head-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.notifications-history-toolbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #dbe3ef;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 10px 22px 12px;
}

.notifications-alerts-counter {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: .86rem;
  font-weight: 950;
  gap: 8px;
  min-height: 38px;
  padding: 9px 13px;
  white-space: nowrap;
}

.notifications-alerts-counter i {
  color: #2563eb;
}

.notifications-alerts-counter.is-empty {
  opacity: .72;
}

.notifications-history-clear-btn {
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
  min-height: 38px;
}

.notification-row-unread {
  background: rgba(219, 234, 254, .38);
}

@media (max-width: 575.98px) {
  .notifications-dropdown {
    min-width: min(410px, calc(100vw - 24px));
    right: -58px;
  }

  .notifications-history-modal .app-form-modal-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .notifications-history-head-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .notifications-history-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 16px;
  }
}

.users-site-option.is-cross-company {
  border-color: #facc15;
  background: #fffbeb;
}

.users-site-option.is-selected {
  background: #eff6ff;
  border-color: #60a5fa;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .16);
}

.users-site-option.is-locked {
  cursor: not-allowed;
}

.users-site-option.is-locked em {
  color: #2563eb;
  display: block;
  font-size: .72rem;
  font-style: normal;
  font-weight: 900;
  margin-top: 2px;
}

.users-info-inline {
  color: #2563eb;
  font-weight: 900;
  text-decoration: none;
}

.users-confirm-box .confirm-dialog-text {
  color: #475569;
  line-height: 1.65;
  margin: 4px auto 0;
  max-width: 340px;
  text-align: center;
  white-space: pre-line;
}

.users-confirm-box {
  max-width: 460px;
}

.users-confirm-box .confirm-dialog-actions {
  justify-content: center;
  margin-top: 18px;
}

.users-confirm-box .form-control {
  border: 2px solid #bfdbfe;
  border-radius: 14px;
  color: #0f172a;
  letter-spacing: .08em;
  max-width: 220px;
  margin: 8px auto 0;
  font-weight: 950;
  text-transform: uppercase;
}

.column-picker-menu .column-picker-item.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 950;
}

.column-picker-menu button.column-picker-item {
  border: 0;
  width: 100%;
  text-align: left;
}

@media (max-width: 1200px) {
  .users-plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 768px) {
  .users-plan-grid,
  .users-filters-grid,
  .users-sites-picker {
    grid-template-columns: 1fr;
  }
}

.badge-cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

.subscription-page-section {
  display: block;
}

.subscription-summary-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.subscription-summary-card {
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(135deg, #2563eb, #0ea5e9 68%, #082f49);
  background-size: 24px 24px, 24px 24px, auto;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 18px;
  box-shadow: 0 22px 54px rgba(15, 23, 42, .16);
  min-height: 164px;
  padding: 18px;
  isolation: isolate;
}

.subscription-summary-card::before {
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.16) 42%, transparent 68%);
  content: "";
  inset: 0;
  opacity: .72;
  position: absolute;
  transform: translateX(-58%);
  transition: transform .5s ease;
  z-index: 0;
}

.subscription-summary-card:hover::before {
  transform: translateX(58%);
}

.subscription-summary-card--blue {
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(135deg, #2563eb, #0ea5e9 70%, #083344);
  background-size: 24px 24px, 24px 24px, auto;
}

.subscription-summary-card--basic {
  background:
    linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px),
    linear-gradient(135deg, #2563eb, #0ea5e9 72%, #075985);
  background-size: 24px 24px, 24px 24px, auto;
}

.subscription-summary-card--pro {
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(135deg, #1d4ed8, #1e40af 58%, #172554);
  background-size: 24px 24px, 24px 24px, auto;
}

.subscription-summary-card--premium {
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(135deg, #7c3aed, #4f46e5 62%, #1d4ed8);
  background-size: 24px 24px, 24px 24px, auto;
}

.subscription-summary-card--enterprise {
  background:
    linear-gradient(rgba(255,255,255,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.10) 1px, transparent 1px),
    linear-gradient(135deg, #111827, #1f2937 58%, #020617);
  background-size: 24px 24px, 24px 24px, auto;
}

.subscription-summary-card--navy {
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(135deg, #1d4ed8, #1e40af 52%, #0f172a);
  background-size: 24px 24px, 24px 24px, auto;
}

.subscription-summary-card--success {
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(135deg, #0f766e, #0284c7 60%, #0f172a);
  background-size: 24px 24px, 24px 24px, auto;
}

.subscription-summary-card--risk {
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(135deg, #b45309, #f59e0b 50%, #1f2937);
  background-size: 24px 24px, 24px 24px, auto;
}

.subscription-summary-card--purple {
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(135deg, #7c3aed, #4f46e5 62%, #172554);
  background-size: 24px 24px, 24px 24px, auto;
}

.subscription-summary-card--danger {
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(135deg, #be123c, #ef4444 54%, #1f2937);
  background-size: 24px 24px, 24px 24px, auto;
}

.subscription-summary-card .subscription-admin-kpi-head,
.subscription-summary-card > span,
.subscription-summary-card > strong,
.subscription-summary-card > small,
.subscription-summary-card .users-plan-meter {
  position: relative;
  z-index: 1;
}

.subscription-summary-card .subscription-admin-kpi-head {
  margin-bottom: 14px;
}

.subscription-summary-card .users-plan-card-icon {
  border-radius: 12px;
  margin-bottom: 0;
}

.subscription-summary-card strong {
  font-size: 1.78rem;
  margin-top: 10px;
}

.subscription-summary-card > small {
  margin-top: 2px;
  min-height: 20px;
}

.subscription-summary-card .users-plan-meter {
  bottom: auto;
  left: auto;
  margin-top: 12px;
  position: relative;
  right: auto;
}

.subscription-summary-card .users-plan-meter span {
  background: linear-gradient(90deg, rgba(255,255,255,.98), rgba(255,255,255,.72));
}

.subscription-summary-card--over-limit .users-plan-meter span {
  background: linear-gradient(90deg, #fee2e2, #f97316);
}

.subscription-overview-grid {
  align-items: stretch;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
}

.subscription-spotlight-card,
.subscription-status-card {
  overflow: hidden;
  position: relative;
}

.subscription-spotlight-card::before,
.subscription-status-card::before {
  background: linear-gradient(90deg, #2563eb, #1d4ed8, #0f172a);
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.subscription-spotlight-shell {
  border: 1px solid rgba(191, 219, 254, .9);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
  color: #fff;
  display: grid;
  gap: 20px;
  overflow: hidden;
  padding: 24px;
  position: relative;
}

.subscription-spotlight-shell::before {
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 28px 28px;
  content: "";
  inset: 0;
  opacity: .72;
  position: absolute;
}

.subscription-spotlight-shell > * {
  position: relative;
  z-index: 1;
}

.subscription-spotlight-shell--basic {
  background: linear-gradient(135deg, #2563eb, #0ea5e9 68%, #082f49);
}

.subscription-spotlight-shell--pro {
  background: linear-gradient(135deg, #1d4ed8, #2563eb 58%, #172554);
}

.subscription-spotlight-shell--premium {
  background: linear-gradient(135deg, #312e81, #7c3aed 52%, #1d4ed8);
}

.subscription-spotlight-shell--enterprise {
  background: linear-gradient(135deg, #0f172a, #1e293b 55%, #334155);
}

.subscription-spotlight-eyebrow {
  color: rgba(255,255,255,.82);
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.subscription-spotlight-top {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.subscription-spotlight-top h3 {
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  font-weight: 950;
  letter-spacing: 0;
  margin: 0 0 8px;
}

.subscription-spotlight-top p {
  color: rgba(255,255,255,.82);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.6;
  margin: 0;
}

.subscription-spotlight-price {
  align-items: end;
  display: flex;
  font-size: clamp(2.55rem, 4vw, 4rem);
  font-weight: 950;
  gap: 10px;
  letter-spacing: 0;
  line-height: .92;
}

.subscription-spotlight-price small {
  color: rgba(255,255,255,.78);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 9px;
}

.subscription-company-hero {
  display: inline-grid;
  gap: 2px;
  max-width: 100%;
  padding: 10px 13px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.subscription-company-hero span {
  color: rgba(255,255,255,.72);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.subscription-company-hero strong {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 950;
  line-height: 1.15;
}

.subscription-spotlight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subscription-meta-chip {
  align-items: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .88rem;
  font-weight: 800;
  gap: 8px;
  padding: 9px 13px;
}

.subscription-meta-chip i {
  opacity: .88;
}

.subscription-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.subscription-status-card .card-clean-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.subscription-account-state {
  border-radius: 22px;
  display: grid;
  gap: 12px;
  padding: 18px 18px 16px;
  position: relative;
}

.subscription-dismiss-pending-btn {
  align-items: center;
  background: rgba(154, 52, 18, .1);
  border: 1px solid rgba(194, 65, 12, .28);
  border-radius: 999px;
  color: #9a3412;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  left: 12px;
  line-height: 1;
  padding: 0;
  position: absolute;
  top: 12px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  width: 28px;
}

.subscription-dismiss-pending-btn:hover,
.subscription-dismiss-pending-btn:focus {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  outline: none;
}

.subscription-account-state--good {
  background: linear-gradient(135deg, rgba(220,252,231,.95), rgba(187,247,208,.88));
  border: 1px solid #86efac;
}

.subscription-account-state--warning {
  background: linear-gradient(135deg, rgba(255,247,237,.98), rgba(254,215,170,.92));
  border: 1px solid #fdba74;
}

.subscription-account-state--danger {
  background: linear-gradient(135deg, rgba(254,242,242,.98), rgba(254,202,202,.9));
  border: 1px solid #fca5a5;
}

.subscription-account-state--info,
.subscription-account-state--neutral {
  background: linear-gradient(135deg, rgba(239,246,255,.98), rgba(219,234,254,.92));
  border: 1px solid #bfdbfe;
}

.subscription-account-state-badge {
  display: flex;
}

.subscription-account-state-badge .subscription-state-pill {
  font-size: 1rem;
  padding: 9px 16px;
}

.subscription-account-state p {
  color: #334155;
  font-weight: 650;
  line-height: 1.58;
  margin: 0;
}

.subscription-status-list {
  display: grid;
  gap: 0;
}

.subscription-status-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.subscription-status-row:last-child {
  border-bottom: 0;
}

.subscription-status-row span {
  color: #64748b;
  font-weight: 800;
}

.subscription-status-row strong {
  text-align: right;
  color: #0f172a;
}

.subscription-state-pill {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 900;
  justify-content: center;
  min-height: 34px;
  padding: 7px 14px;
  text-align: center;
}

.subscription-state-pill--good {
  background: #dcfce7;
  color: #15803d;
}

.subscription-state-pill--info {
  background: #dbeafe;
  color: #1d4ed8;
}

.subscription-state-pill--warning {
  background: #ffedd5;
  color: #c2410c;
}

.subscription-state-pill--danger {
  background: #fee2e2;
  color: #b91c1c;
}

.subscription-state-pill--neutral {
  background: #e2e8f0;
  color: #334155;
}

.subscription-state-pill--stripe {
  background: #ede9fe;
  color: #6d28d9;
}

.subscription-state-pill--kalipso {
  background: #dbeafe;
  color: #1d4ed8;
}

.subscription-state-pill--soft {
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .14);
}

.subscription-source-pill {
  min-width: 112px;
  max-width: 112px;
  min-height: 34px;
  padding-left: 10px;
  padding-right: 10px;
  white-space: nowrap;
}

.subscription-admin-status-stack .subscription-state-pill {
  min-width: 118px;
  max-width: 118px;
}

.subscription-alert-stack {
  display: grid;
  gap: 12px;
}

.subscription-alert {
  border-radius: 16px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.subscription-alert strong {
  font-size: .95rem;
}

.subscription-alert-warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.subscription-alert-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.subscription-usage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.subscription-usage-card {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.98));
  border: 1px solid #dbeafe;
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .06);
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.subscription-usage-card::before {
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  content: "";
  height: 4px;
  left: 18px;
  position: absolute;
  right: 18px;
  top: 0;
}

.subscription-usage-card-top {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.subscription-usage-card-label {
  color: #64748b;
  display: block;
  font-size: .82rem;
  font-weight: 950;
  letter-spacing: .05em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.subscription-usage-card strong {
  color: #0f172a;
  font-size: 1.32rem;
  font-weight: 950;
}

.subscription-usage-card strong small {
  color: #64748b;
  display: inline-block;
  font-size: .92rem;
  font-weight: 800;
  margin-left: 4px;
}

.subscription-usage-card-percent {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: .82rem;
  font-weight: 950;
  justify-content: center;
  min-width: 66px;
  padding: 8px 12px;
}

.subscription-usage-progress {
  background: #dbeafe;
  border-radius: 999px;
  height: 11px;
  overflow: hidden;
}

.subscription-usage-progress span {
  background: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.subscription-usage-card p {
  color: #475569;
  color: #64748b;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.55;
  margin: 0;
}

.subscription-usage-card--warning {
  border-color: #fdba74;
  background: #fff7ed;
}

.subscription-usage-card--warning::before {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

.subscription-usage-card--warning .subscription-usage-card-percent {
  background: #ffedd5;
  color: #c2410c;
}

.subscription-usage-card--warning .subscription-usage-progress {
  background: #fed7aa;
}

.subscription-usage-card--warning .subscription-usage-progress span {
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
}

.subscription-usage-card--danger {
  border-color: #fca5a5;
  background: #fef2f2;
}

.subscription-usage-card--danger::before {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.subscription-usage-card--danger .subscription-usage-card-percent {
  background: #fee2e2;
  color: #b91c1c;
}

.subscription-usage-card--danger .subscription-usage-progress {
  background: #fecaca;
}

.subscription-usage-card--danger .subscription-usage-progress span {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.subscription-plans-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.subscription-plan-card {
  border: 1px solid rgba(191, 219, 254, .78);
  border-radius: 24px;
  box-shadow: 0 22px 54px rgba(15, 23, 42, .12);
  color: #fff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
  overflow: hidden;
  position: relative;
}

.subscription-plan-card::before {
  background:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 28px 28px;
  content: "";
  inset: 0;
  opacity: .72;
  position: absolute;
}

.subscription-plan-card > * {
  position: relative;
  z-index: 1;
}

.subscription-plan-card--basic {
  background: linear-gradient(135deg, #2563eb, #0ea5e9 70%, #082f49);
}

.subscription-plan-card--pro {
  background: linear-gradient(135deg, #1d4ed8, #1e40af 45%, #0f172a);
}

.subscription-plan-card--premium {
  background: linear-gradient(135deg, #4338ca, #7c3aed 48%, #2563eb);
}

.subscription-plan-card--enterprise {
  background: linear-gradient(135deg, #0f172a, #1e293b 55%, #334155);
}

.subscription-plan-card.is-current {
  border-color: rgba(255,255,255,.8);
  box-shadow: 0 26px 70px rgba(29, 78, 216, .22);
  transform: translateY(-3px);
}

.subscription-plan-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.subscription-plan-card-head h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: #fff;
  font-weight: 950;
}

.subscription-plan-card-head p {
  margin: 0;
  color: rgba(255,255,255,.84);
  font-size: .95rem;
  line-height: 1.55;
}

.subscription-current-pill {
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .75rem;
  font-weight: 900;
  white-space: nowrap;
}

.subscription-plan-card-price {
  font-size: 2.25rem;
  font-weight: 900;
  color: #fff;
}

.subscription-plan-card-price small {
  font-size: .96rem;
  color: rgba(255,255,255,.78);
  margin-left: 4px;
}

.subscription-plan-card-list {
  display: grid;
  gap: 10px;
}

.subscription-plan-feature {
  align-items: center;
  color: #fff;
  display: flex;
  font-weight: 850;
  gap: 10px;
}

.subscription-plan-feature i {
  align-items: center;
  background: rgba(255,255,255,.16);
  border-radius: 999px;
  display: inline-flex;
  font-size: .7rem;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.subscription-plan-card-actions {
  margin-top: auto;
}

.subscription-plan-card .btn-light,
.subscription-plan-card .btn-outline-light,
.subscription-enterprise-btn {
  border-radius: 14px;
  font-weight: 900;
  min-height: 42px;
}

.subscription-enterprise-btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.subscription-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.subscription-table-primary {
  display: grid;
  gap: 4px;
}

.subscription-table-primary strong {
  color: #0f172a;
  font-weight: 900;
}

.subscription-table-primary span {
  color: #64748b;
  font-size: .86rem;
  line-height: 1.45;
}

.subscription-table-primary--event span {
  max-width: 420px;
}

.subscription-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.subscription-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.subscription-admin-kpi-card {
  position: relative;
}

.subscription-admin-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.subscription-inline-info-btn {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 10px;
  background: rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .94);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  font-size: .98rem;
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
}

.subscription-inline-info-btn:hover {
  background: rgba(255, 255, 255, .24);
  border-color: rgba(255, 255, 255, .45);
  transform: translateY(-1px);
}

.subscription-admin-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
}

.subscription-catalog-migration {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 16px;
  background: #eff6ff;
}

.subscription-catalog-migration--warning {
  border-color: #f59e0b;
  background: #fff7ed;
}

.subscription-catalog-migration--ok {
  border-color: #86efac;
  background: #f0fdf4;
}

.subscription-catalog-migration--neutral {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.subscription-catalog-migration--running {
  opacity: .72;
  pointer-events: none;
}

.subscription-catalog-migration-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.subscription-catalog-migration-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
  flex: 0 0 auto;
}

.subscription-catalog-migration strong {
  display: block;
  color: #0f172a;
  font-weight: 900;
  margin-bottom: 3px;
}

.subscription-catalog-migration p {
  margin: 0;
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.35;
}

.subscription-catalog-migration small {
  display: block;
  color: #64748b;
  font-weight: 800;
  margin-top: 6px;
}

.subscription-admin-status-stack,
.subscription-admin-billing-stack {
  display: grid;
  gap: 8px;
}

.subscription-admin-table {
  table-layout: fixed;
}

.subscription-admin-table th:nth-child(1) { width: 18%; }
.subscription-admin-table th:nth-child(2) { width: 9%; }
.subscription-admin-table th:nth-child(3) { width: 10%; }
.subscription-admin-table th:nth-child(4) { width: 20%; }
.subscription-admin-table th:nth-child(5) { width: 17%; }
.subscription-admin-table th:nth-child(6) { width: 15%; }
.subscription-admin-table th:nth-child(7) { width: 11%; }

.subscription-admin-table tbody td {
  padding-bottom: 18px;
  padding-top: 18px;
}

.subscription-admin-table tbody tr {
  transition: background .15s ease;
}

.subscription-company-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.subscription-company-cell strong {
  color: #0f172a;
  line-height: 1.25;
}

.subscription-company-cell span {
  color: #64748b;
  font-size: .92rem;
  line-height: 1.35;
}

.subscription-company-cell--strong strong {
  font-size: 1rem;
}

.subscription-usage-stack {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.subscription-usage-line {
  display: grid;
  gap: 5px;
}

.subscription-usage-line-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: .84rem;
}

.subscription-usage-line-head span {
  color: #64748b;
  font-weight: 800;
}

.subscription-usage-line-head strong {
  color: #0f172a;
  font-size: .84rem;
  white-space: nowrap;
}

.subscription-inline-meter {
  height: 6px;
  border-radius: 999px;
  background: #dbeafe;
  overflow: hidden;
}

.subscription-admin-billing-card,
.subscription-admin-period-card {
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
}

.subscription-admin-muted {
  color: #64748b;
  display: block;
  font-size: .86rem;
  font-weight: 750;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-admin-money {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 950;
}

.subscription-admin-period-card strong {
  color: #0f172a;
  font-size: 1.02rem;
  font-weight: 950;
}

.subscription-admin-period-card span,
.subscription-admin-period-card small {
  color: #64748b;
  font-size: .86rem;
  font-weight: 750;
  line-height: 1.35;
}

.subscription-admin-actions {
  align-items: stretch;
  display: grid;
  gap: 8px;
  justify-content: end;
}

.subscription-admin-actions .btn {
  align-items: center;
  border-radius: 12px;
  display: inline-flex;
  font-weight: 850;
  gap: 8px;
  justify-content: center;
  min-height: 36px;
  min-width: 128px;
  padding: 8px 10px;
  white-space: nowrap;
}

.subscription-admin-actions .btn i {
  width: 16px;
}

.subscription-inline-meter--warning {
  background: #fed7aa;
}

.subscription-inline-meter--danger {
  background: #fecaca;
}

.subscription-inline-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #0ea5e9 100%);
}

.subscription-inline-meter--warning span {
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
}

.subscription-inline-meter--danger span {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.subscription-admin-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.subscription-admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.subscription-admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(2px);
}

.subscription-admin-modal-panel {
  position: relative;
  width: min(920px, calc(100vw - 32px));
  margin: 48px auto;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 24px;
  box-shadow:
    0 -18px 46px rgba(226, 232, 240, .28),
    0 34px 100px rgba(2, 6, 23, .42),
    0 0 0 6px rgba(191, 219, 254, .16);
  outline: 1px solid rgba(219, 234, 254, .72);
  overflow: hidden;
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.subscription-preview-panel {
  width: min(1380px, calc(100vw - 32px));
}

.subscription-history-panel {
  width: min(1360px, calc(100vw - 32px));
}

.subscription-admin-modal-head,
.subscription-admin-modal-footer {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.subscription-admin-modal-head {
  background:
    radial-gradient(circle at 42% 0%, rgba(96, 165, 250, .22), transparent 34%),
    linear-gradient(135deg, #2563eb 0%, #1e3a8a 46%, #0b1220 100%);
  border-bottom: 0;
  color: #fff;
  min-height: 104px;
  padding: 22px 28px;
  position: relative;
}

.subscription-admin-modal-title {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
  padding-right: 58px;
}

.subscription-admin-modal-icon {
  align-items: center;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(14, 165, 233, .22);
  display: inline-flex;
  flex: 0 0 54px;
  font-size: 1.25rem;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.subscription-admin-modal-head h3 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 1.34rem;
  font-weight: 950;
}

.subscription-admin-modal-head p {
  margin: 0;
  color: rgba(226, 232, 240, .9);
  font-weight: 750;
}

.subscription-admin-modal-close {
  align-items: center;
  background: #ef4444;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 16px;
  color: #fff;
  display: inline-flex;
  font-size: 1.2rem;
  height: 42px;
  justify-content: center;
  opacity: 1;
  position: absolute;
  right: 28px;
  top: 30px;
  transition: .16s ease;
  width: 42px;
}

.subscription-admin-modal-close:hover {
  background: #dc2626;
  box-shadow: 0 14px 28px rgba(185, 28, 28, .28);
  color: #fff;
}

.subscription-admin-modal-body {
  padding: 22px;
  overflow-y: auto;
}

.subscription-history-modal-body {
  background: #f8fbff;
  padding: 26px;
}

.subscription-history-choice {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

.subscription-history-choice-btn {
  align-items: center;
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
  color: #12315f;
  display: flex;
  gap: 14px;
  min-height: 76px;
  padding: 16px 18px;
  text-align: left;
  transition: .16s ease;
}

.subscription-history-choice-btn i {
  align-items: center;
  background: #eff6ff;
  border-radius: 16px;
  color: #2563eb;
  display: inline-flex;
  flex: 0 0 46px;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.subscription-history-choice-btn span {
  font-size: 1rem;
  font-weight: 950;
}

.subscription-history-choice-btn:hover,
.subscription-history-choice-btn.active {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border-color: transparent;
  color: #fff;
  transform: translateY(-1px);
}

.subscription-history-choice-btn:hover i,
.subscription-history-choice-btn.active i {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.subscription-history-content {
  min-height: 220px;
}

.subscription-history-pagination {
  border-top: 1px solid #e2e8f0;
}

.subscription-history-table-card {
  overflow: hidden;
}

.subscription-critical-confirm {
  display: grid;
  gap: 8px;
  text-align: left;
}

.subscription-critical-confirm p {
  margin: 0;
}

.subscription-critical-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  color: #9a3412;
  padding: 10px 12px;
}

.subscription-admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.subscription-admin-form-span {
  grid-column: 1 / -1;
}

.subscription-admin-modal-footer {
  border-top: 1px solid #e2e8f0;
}

.subscription-history-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.subscription-history-meta-item {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 16px;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.subscription-history-meta-item span {
  color: #64748b;
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.subscription-history-meta-item strong {
  color: #0f172a;
  font-size: 1rem;
}

.subscription-history-modal-body .subscription-history-grid {
  gap: 26px;
}

.subscription-history-modal-body .card-clean {
  box-shadow: 0 16px 38px rgba(15, 23, 42, .08);
}

.subscription-history-modal-body .table-clean thead th {
  background: #eef5ff;
}

.subscription-history-modal-body .table-clean tbody td {
  padding: 18px 20px;
}

.subscription-policy-note {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 18px;
  align-items: start;
}

.subscription-policy-note-main,
.subscription-policy-note-side {
  display: grid;
  gap: 8px;
}

.subscription-policy-note-main strong {
  color: #0f172a;
  font-size: 1rem;
}

.subscription-policy-note-main span,
.subscription-policy-note-side span {
  color: #475569;
  line-height: 1.5;
}

.subscription-downgrade-blocker-popup {
  text-align: left;
}

.subscription-downgrade-blocker-popup p {
  margin: 0 0 12px;
}

.subscription-downgrade-blocker-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.subscription-downgrade-blocker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 8px;
  background: rgba(254, 242, 242, 0.82);
}

.subscription-downgrade-blocker-row span {
  color: #475569;
  font-weight: 800;
}

.subscription-downgrade-blocker-row strong {
  color: #991b1b;
  font-weight: 900;
  white-space: nowrap;
}

.subscription-downgrade-blocker-note {
  color: #475569;
  font-size: 0.9rem;
}

@media (max-width: 1200px) {
  .subscription-summary-grid,
  .subscription-plans-grid,
  .subscription-usage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subscription-overview-grid,
  .subscription-history-grid,
  .subscription-preview-grid {
    grid-template-columns: 1fr;
  }

  .subscription-admin-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subscription-history-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subscription-policy-note {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .subscription-summary-grid,
  .subscription-plans-grid,
  .subscription-usage-grid,
  .subscription-admin-filters,
  .subscription-admin-form-grid,
  .subscription-history-choice {
    grid-template-columns: 1fr;
  }

  .subscription-spotlight-shell,
  .subscription-plan-card,
  .subscription-usage-card {
    padding: 16px;
  }

  .subscription-spotlight-top {
    flex-direction: column;
  }

  .subscription-spotlight-price {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .subscription-status-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .subscription-history-meta-grid {
    grid-template-columns: 1fr;
  }
}

/* Profile menu */
.profile-menu-wrap{position:relative;display:inline-flex;align-items:center;}
.profile-menu-btn{width:42px;height:42px;border:1px solid rgba(148,163,184,.35);border-radius:16px;background:linear-gradient(135deg,#eff6ff 0%,#fff 100%);color:#12315f;font-weight:900;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 12px 28px rgba(37,99,235,.12);overflow:hidden;transition:.18s ease;}
.profile-menu-btn:hover{transform:translateY(-1px);border-color:#60a5fa;box-shadow:0 16px 32px rgba(37,99,235,.18);}
.profile-menu-btn.has-avatar span{display:none;}
.profile-menu-avatar{width:100%;height:100%;object-fit:cover;}
.profile-dropdown{position:absolute;right:0;top:calc(100% + 12px);width:320px;background:#fff;border:1px solid rgba(203,213,225,.9);border-radius:18px;box-shadow:0 28px 70px rgba(15,23,42,.20);padding:10px;z-index:1080;opacity:0;visibility:hidden;transform:translateY(-8px);transition:.18s ease;}
.profile-dropdown.open{opacity:1;visibility:visible;transform:translateY(0);}
.profile-dropdown-head{display:flex;gap:12px;align-items:center;padding:12px;border-radius:14px;background:linear-gradient(135deg,#2563eb 0%,#0f2554 100%);color:#fff;margin-bottom:8px;}
.profile-dropdown-avatar{width:44px;height:44px;border-radius:14px;background:rgba(255,255,255,.16);display:flex;align-items:center;justify-content:center;font-weight:900;flex:0 0 44px;}
.profile-dropdown-avatar img{width:100%;height:100%;object-fit:cover;border-radius:14px;}
.profile-dropdown-head strong{display:block;font-size:1rem;line-height:1.1;}
.profile-dropdown-head span{display:block;font-size:.78rem;color:rgba(255,255,255,.78);margin-top:4px;}
.profile-dropdown-item{width:100%;border:0;background:transparent;text-align:left;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;color:#334155;font-size:.93rem;font-weight:650;text-decoration:none;transition:.15s ease;}
.profile-dropdown-item i{width:20px;color:#2563eb;text-align:center;}
.profile-dropdown-item:hover{background:#eff6ff;color:#0f3f91;text-decoration:none;}
.profile-dropdown-separator{height:1px;background:#e5edf6;margin:8px 6px;}
.profile-dropdown-logout{color:#be123c;}
.profile-dropdown-logout i{color:#e11d48;}
.profile-dropdown-logout:hover{background:#fff1f2;color:#be123c;}
.profile-switch{margin-left:auto;width:42px;height:24px;border-radius:999px;background:#dbe4ef;border:1px solid #cbd5e1;padding:2px;display:inline-flex;align-items:center;transition:.18s ease;}
.profile-switch span{width:18px;height:18px;border-radius:999px;background:#fff;box-shadow:0 2px 6px rgba(15,23,42,.22);transform:translateX(0);transition:.18s ease;}
.profile-switch.active{background:linear-gradient(135deg,#2563eb,#0ea5e9);border-color:#60a5fa;}
.profile-switch.active span{transform:translateX(18px);}
.profile-settings-modal{border-radius:22px;overflow:hidden;}
.profile-summary-card{display:flex;align-items:center;gap:16px;padding:16px;border:1px solid #dbeafe;border-radius:18px;background:linear-gradient(135deg,#eff6ff 0%,#fff 100%);margin-bottom:16px;}
.profile-summary-avatar,.profile-photo-preview{width:74px;height:74px;border-radius:22px;background:linear-gradient(135deg,#2563eb,#1fb6e9);color:#fff;font-size:1.35rem;font-weight:900;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 16px 36px rgba(37,99,235,.22);}
.profile-summary-avatar img,.profile-photo-preview img{width:100%;height:100%;object-fit:cover;}
.profile-summary-name{font-weight:950;font-size:1.2rem;color:#101827;}
.profile-summary-email{color:#64748b;font-weight:700;}
.profile-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px;}
.profile-info-grid div{border:1px solid #dbeafe;border-radius:14px;padding:12px;background:#f8fbff;}
.profile-info-grid span{display:block;color:#64748b;font-size:.75rem;font-weight:900;text-transform:uppercase;letter-spacing:.04em;margin-bottom:4px;}
.profile-info-grid strong{display:block;color:#111827;font-weight:900;}
.profile-sites-title{font-size:.78rem;font-weight:950;text-transform:uppercase;color:#64748b;letter-spacing:.04em;margin-bottom:8px;}
.profile-sites-list{display:flex;flex-wrap:wrap;gap:8px;}
.profile-site-chip{display:inline-flex;align-items:center;border-radius:999px;background:#eaf2ff;color:#1558d6;font-weight:900;padding:6px 10px;}
.profile-muted{color:#64748b;font-weight:700;}
.profile-photo-editor{display:flex;gap:18px;align-items:center;}
.profile-photo-copy{flex:1;}
.profile-photo-copy small{display:block;color:#64748b;font-weight:700;margin-top:8px;}
.profile-file-picker-btn{border:1px solid #bfdbfe;background:linear-gradient(135deg,#2563eb 0%,#0ea5e9 100%);color:#fff;border-radius:14px;padding:10px 14px;font-weight:900;box-shadow:0 12px 28px rgba(37,99,235,.18);transition:.15s ease;}
.profile-file-picker-btn:hover{transform:translateY(-1px);box-shadow:0 16px 34px rgba(37,99,235,.24);}
.profile-file-name{margin-top:10px;border:1px solid #dbeafe;background:#f8fbff;color:#334155;border-radius:12px;padding:9px 11px;font-size:.9rem;font-weight:800;line-height:1.25;word-break:break-word;}
.profile-form-grid{display:grid;grid-template-columns:1fr;gap:12px;}
.profile-alert{border:1px solid #fecaca;background:#fff1f2;color:#b91c1c;border-radius:12px;padding:10px 12px;font-weight:800;}
.profile-support-card{display:flex;gap:16px;align-items:flex-start;border:1px solid #dbeafe;border-radius:18px;background:#f8fbff;padding:16px;}
.profile-support-icon{width:48px;height:48px;border-radius:16px;background:#e0ecff;color:#2563eb;display:flex;align-items:center;justify-content:center;font-size:1.2rem;flex:0 0 48px;}
.profile-support-card p{color:#52627a;font-weight:700;margin:.35rem 0 1rem;}

body.theme-dark{background:#0f172a;color:#dbeafe;}
body.theme-dark .app-main{background:#0f172a;}
body.theme-dark .app-topbar{background:#111827;border-bottom-color:rgba(148,163,184,.22);}
body.theme-dark .app-topbar-title,body.theme-dark .page-title,body.theme-dark .card-clean-title{color:#f8fafc;}
body.theme-dark .app-topbar-subtitle,body.theme-dark .page-subtitle,body.theme-dark .filter-shell-subtitle{color:#94a3b8;}
body.theme-dark .app-sidebar{background:#081326;}
body.theme-dark .page-head{filter:saturate(.92) brightness(.9);}
body.theme-dark .card-clean,body.theme-dark .filter-shell,body.theme-dark .table-shell{background:#111827;border-color:rgba(148,163,184,.22);box-shadow:0 22px 50px rgba(0,0,0,.24);}
body.theme-dark .table-clean th{background:#172033;color:#cbd5e1;border-bottom-color:rgba(148,163,184,.22);}
body.theme-dark .table-clean td{color:#dbeafe;border-top-color:rgba(148,163,184,.16);}
body.theme-dark .table-title{color:#f8fafc;}
body.theme-dark .asset-table-subline{color:#94a3b8;}
body.theme-dark .profile-dropdown{background:#fff;border-color:rgba(203,213,225,.9);color:#172033;}

/* Dark mode is intentionally conservative: dark shell, readable work surfaces. */
body.theme-dark .app-content{background:#0f172a;}
body.theme-dark .page-head{filter:none;}
body.theme-dark .page-head .page-title{color:#fff;}
body.theme-dark .page-head .page-subtitle{color:rgba(255,255,255,.78);}
body.theme-dark .filter-shell,
body.theme-dark .card-clean,
body.theme-dark .table-shell,
body.theme-dark .modal-clean,
body.theme-dark .app-form-modal,
body.theme-dark .users-user-modal,
body.theme-dark .asset-tree-detail-panel,
body.theme-dark .asset-tree-card,
body.theme-dark .preventive-template-card,
body.theme-dark .subscription-table-card,
body.theme-dark .subscription-manager-panel{
  background:#182235;
  color:#e5edf8;
  border-color:#334155;
  box-shadow:0 20px 46px rgba(0,0,0,.28);
}
body.theme-dark .card-clean-header,
body.theme-dark .modal-clean-header,
body.theme-dark .table-clean thead th,
body.theme-dark .table-clean th{
  background:#22304a;
  color:#cbd5e1;
  border-color:#334155;
}
body.theme-dark .card-clean-title,
body.theme-dark .table-title,
body.theme-dark .modal-title,
body.theme-dark .asset-tree-detail-title,
body.theme-dark .detail-header-title,
body.theme-dark .preventive-template-title,
body.theme-dark .subscription-section-title{
  color:#f8fafc;
}
body.theme-dark .table-clean td,
body.theme-dark .table-clean tbody tr,
body.theme-dark .asset-table-subline,
body.theme-dark .filter-shell-subtitle,
body.theme-dark .card-clean-body,
body.theme-dark .modal-clean-body,
body.theme-dark .app-form-modal .modal-body{
  color:#dbeafe;
}
body.theme-dark .table-clean td{background:#182235;border-top-color:#334155;}
body.theme-dark .table-clean tbody tr:hover td{background:#202d44;}
body.theme-dark .form-control,
body.theme-dark input.form-control,
body.theme-dark select.form-control,
body.theme-dark textarea.form-control,
body.theme-dark .app-form-modal .form-control,
body.theme-dark .modal-clean .form-control{
  background:#101827;
  color:#f8fafc;
  border-color:#475569;
}
body.theme-dark .form-control:focus,
body.theme-dark input.form-control:focus,
body.theme-dark select.form-control:focus,
body.theme-dark textarea.form-control:focus{
  background:#111c2f;
  color:#fff;
  border-color:#60a5fa;
  box-shadow:0 0 0 3px rgba(96,165,250,.18);
}
body.theme-dark .confirm-dialog-box,
body.theme-dark .notifications-history-modal,
body.theme-dark .profile-settings-modal{
  background:#182235;
  color:#e5edf8;
  border:1px solid #334155;
}
body.theme-dark .confirm-dialog-title,
body.theme-dark .confirm-dialog-text,
body.theme-dark .profile-summary-name,
body.theme-dark .profile-info-grid strong{
  color:#f8fafc;
}
body.theme-dark .profile-summary-card,
body.theme-dark .profile-info-grid div,
body.theme-dark .profile-support-card,
body.theme-dark .profile-file-name{
  background:#202d44;
  color:#dbeafe;
  border-color:#334155;
}
body.theme-dark .profile-summary-email,
body.theme-dark .profile-info-grid span,
body.theme-dark .profile-photo-copy small,
body.theme-dark .profile-support-card p{color:#94a3b8;}
body.theme-dark .profile-dropdown-item{color:#334155;}
body.theme-dark .profile-dropdown-item:hover{background:#eff6ff;color:#0f3f91;}
body.theme-dark .asset-tree-group,
body.theme-dark .asset-tree-node,
body.theme-dark .asset-tree-detail-section,
body.theme-dark .info-row-modern,
body.theme-dark .subscription-usage-card,
body.theme-dark .subscription-status-card,
body.theme-dark .preventive-template-row,
body.theme-dark .preventive-generation-box{
  background:#202d44;
  border-color:#334155;
  color:#e5edf8;
}
body.theme-dark .asset-tree-group-header,
body.theme-dark .card-clean-subheader,
body.theme-dark .info-row-modern-label,
body.theme-dark .filter-label{
  color:#94a3b8;
}
body.theme-dark .asset-tree-node:hover,
body.theme-dark .asset-tree-node.selected{
  background:#263654;
}
body.theme-dark .calendar-action-menu{
  background:#182235;
  border-color:#334155;
  box-shadow:0 28px 80px rgba(0,0,0,.42);
}
body.theme-dark .calendar-action-title,
body.theme-dark .calendar-action-copy strong{
  color:#f8fafc;
}
body.theme-dark .calendar-action-meta,
body.theme-dark .calendar-action-copy small,
body.theme-dark .calendar-action-loading{
  color:#94a3b8;
}
body.theme-dark .calendar-action-item{
  background:#111827;
  border-color:#334155;
  color:#f8fafc;
}
body.theme-dark .calendar-action-item:hover:not(:disabled){
  background:#263654;
  border-color:#60a5fa;
}
body.theme-dark .calendar-action-warning{
  background:rgba(251,146,60,.12);
  border-color:rgba(251,146,60,.42);
  color:#fdba74;
}
body.theme-dark .badge-pill-custom,
body.theme-dark .asset-stat-chip,
body.theme-dark .users-role-pill,
body.theme-dark .users-site-chip,
body.theme-dark .code-pill{
  box-shadow:none;
}

.card-title-blue-icon{
  align-items:center;
  background:#eff6ff;
  border-radius:10px;
  color:#2563eb;
  display:inline-flex;
  height:26px;
  justify-content:center;
  margin-right:8px;
  width:26px;
}
.work-order-code-pill{
  align-items:center;
  background:#eef4ff;
  border:1px solid #dbeafe;
  border-radius:999px;
  color:#1d4ed8;
  display:inline-flex;
  font-weight:900;
  padding:5px 10px;
}
.manual-entry-form-label,
.manual-entry-strong{
  font-weight:900;
}
.checklist-execution-card{
  margin-top:0;
}
.checklist-progress-pill{
  background:#eff6ff;
  border:1px solid #bfdbfe;
  border-radius:999px;
  color:#1d4ed8;
  font-size:.78rem;
  font-weight:950;
  padding:5px 10px;
}
.checklist-task-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.checklist-task{
  align-items:flex-start;
  background:#f8fafc;
  border:1px solid #dbeafe;
  border-radius:10px;
  cursor:pointer;
  display:flex;
  gap:12px;
  margin:0;
  padding:14px 16px;
}
.checklist-task input{
  height:1px;
  opacity:0;
  position:absolute;
  width:1px;
}
.checklist-task-box{
  align-items:center;
  background:#fff;
  border:2px solid #93c5fd;
  border-radius:8px;
  color:#fff;
  display:inline-flex;
  flex:0 0 28px;
  font-size:.86rem;
  height:28px;
  justify-content:center;
  margin-top:2px;
  width:28px;
}
.checklist-task.is-complete .checklist-task-box{
  background:#16a34a;
  border-color:#16a34a;
}
.checklist-task-main{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.checklist-task-title{
  color:#0f172a;
  font-size:1rem;
  font-weight:900;
  line-height:1.25;
}
.checklist-task-meta{
  color:#64748b;
  font-size:.88rem;
  font-weight:800;
}
.summary-metric-row{
  background:#f8fbff;
  border:1px solid #dbeafe;
  border-radius:10px;
  margin:10px 0 0;
  padding:12px 14px;
}
.wo-tech-chip-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.wo-tech-chip:disabled{
  cursor:default;
  opacity:1;
}
.asset-detail-mini-link{
  align-items:center;
  border:1px solid #bfdbfe;
  border-radius:999px;
  color:#1d4ed8;
  display:inline-flex;
  font-size:.78rem;
  font-weight:850;
  gap:4px;
  line-height:1;
  margin-left:8px;
  padding:5px 9px;
  text-decoration:none;
  white-space:nowrap;
}
.asset-detail-mini-link:hover{
  background:#eff6ff;
  color:#1d4ed8;
  text-decoration:none;
}
.inline-tech-picker .smart-select-menu{
  max-height:260px;
  overflow:auto;
  position:static;
  width:100%;
}
.comment-card-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  margin-top:12px;
}
.evidence-grid-four{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.evidence-grid-four .evidence-file-card{
  display:flex;
  flex-direction:column;
}
.evidence-grid-four .evidence-file-preview{
  align-items:center;
  aspect-ratio:4/3;
  background:#f8fafc;
  border-bottom:1px solid #e2e8f0;
  display:grid !important;
  height:auto;
  justify-items:center;
  min-height:150px;
  overflow:hidden;
  place-items:center;
  width:100%;
}
.evidence-grid-four .evidence-file-preview img{
  display:block;
  height:100% !important;
  max-height:100%;
  max-width:100%;
  object-fit:contain !important;
  object-position:center center !important;
  width:100% !important;
}
.evidence-grid-four .evidence-file-fallback{
  align-items:center;
  color:#2563eb;
  display:grid;
  font-size:2.4rem;
  height:100%;
  justify-items:center;
  place-items:center;
  width:100%;
}
.evidence-file-fallback-pdf{color:#dc2626;}
.evidence-file-fallback-sheet{color:#16a34a;}
.evidence-file-fallback-excel{color:#16a34a;}
.evidence-file-fallback-word{color:#2563eb;}
.evidence-grid-four .evidence-file-fallback-pdf{color:#dc2626;}
.evidence-grid-four .evidence-file-fallback-sheet,
.evidence-grid-four .evidence-file-fallback-excel{color:#16a34a;}
.evidence-grid-four .evidence-file-fallback-word{color:#2563eb;}
.document-delete-btn{
  min-width:88px;
}
.comment-edit-dialog{
  max-width:560px;
  width:min(560px, calc(100vw - 32px));
}
.comment-edit-dialog .confirm-dialog-actions{
  margin-top:18px;
}
.wo-schedule-field .filter-label{
  align-items:flex-end;
  display:flex;
  line-height:1.25;
  min-height:34px;
}
.preventive-advance-disabled{
  opacity:.72;
}
.preventive-advance-disabled input:disabled{
  background:#eef2f7;
  cursor:not-allowed;
}
@media (max-width:575.98px){
  .asset-detail-mini-link{
    margin:8px 0 0;
    width:max-content;
  }
  .wo-schedule-field .filter-label{
    min-height:0;
  }
}
.history-limit-control{
  align-items:center;
  color:#475569;
  display:flex;
  font-size:.82rem;
  font-weight:900;
  gap:8px;
}
.history-limit-control select{
  border:1px solid #d7e2f0;
  border-radius:10px;
  color:#0f172a;
  font-weight:900;
  min-height:38px;
  padding:0 10px;
}
@media (max-width:1199.98px){
  .evidence-grid-four{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:767.98px){
  .evidence-grid-four{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:480px){
  .evidence-grid-four{grid-template-columns:1fr;}
}

@media (max-width: 575.98px){
  .profile-dropdown{right:-54px;width:min(320px,calc(100vw - 24px));}
  .profile-info-grid{grid-template-columns:1fr;}
  .profile-photo-editor{align-items:flex-start;flex-direction:column;}
}

.page-head-actions{
  align-items:center;
  display:flex;
  gap:16px;
  justify-content:space-between;
}
.support-admin-filters{
  display:grid;
  gap:14px;
  grid-template-columns:2fr repeat(4,minmax(150px,1fr));
}
.support-row-actions,.support-reply-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.support-modal{
  inset:0;
  position:fixed;
  z-index:2050;
}
.support-modal-backdrop{
  background:rgba(15,23,42,.46);
  inset:0;
  position:absolute;
}
.support-modal-panel{
  background:#fff;
  border-radius:14px;
  box-shadow:0 24px 70px rgba(15,23,42,.24);
  display:flex;
  flex-direction:column;
  left:50%;
  max-height:calc(100vh - 44px);
  max-width:920px;
  overflow:hidden;
  position:absolute;
  top:50%;
  transform:translate(-50%,-50%);
  width:calc(100vw - 32px);
}
.support-modal-panel-wide{max-width:1180px;}
.support-modal-head{
  align-items:flex-start;
  border-bottom:1px solid #e5edf6;
  display:flex;
  gap:16px;
  justify-content:space-between;
  padding:20px 22px;
}
.support-modal-head h3{
  color:#0f172a;
  font-size:1.2rem;
  font-weight:900;
  margin:0;
}
.support-modal-head p{
  color:#64748b;
  font-size:.9rem;
  margin:4px 0 0;
}
.support-modal-close{
  align-items:center;
  background:#f1f5f9;
  border:0;
  border-radius:10px;
  color:#334155;
  display:inline-flex;
  height:36px;
  justify-content:center;
  width:36px;
}
.support-modal-body{
  overflow:auto;
  padding:22px;
}
.support-form,.support-detail-grid,.support-admin-tools{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.support-form-span,.support-detail-span{
  grid-column:1/-1;
}
.support-form-actions{
  display:flex;
  gap:10px;
  grid-column:1/-1;
  justify-content:flex-end;
}
.support-detail-grid{
  background:#f8fafc;
  border:1px solid #e5edf6;
  border-radius:12px;
  padding:14px;
}
.support-detail-grid span{
  color:#64748b;
  display:block;
  font-size:.74rem;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.support-detail-grid strong{
  color:#0f172a;
  display:block;
  font-size:.92rem;
  margin-top:3px;
  overflow-wrap:anywhere;
}
.support-admin-tools{
  align-items:end;
  border-bottom:1px solid #e5edf6;
  border-top:1px solid #e5edf6;
  margin:18px 0;
  padding:16px 0;
}
.support-conversation h4,.support-events h4{
  color:#0f172a;
  font-size:1rem;
  font-weight:900;
  margin:0 0 12px;
}
.support-message{
  background:#f8fafc;
  border:1px solid #e5edf6;
  border-radius:12px;
  margin-bottom:10px;
  padding:12px 14px;
}
.support-message-system{
  background:#eef6ff;
  border-color:#bfdbfe;
}
.support-message-internal{
  background:#fff7ed;
  border-color:#fed7aa;
}
.support-message-head{
  align-items:center;
  display:flex;
  gap:10px;
  justify-content:space-between;
}
.support-message-head strong{
  color:#0f172a;
  font-size:.88rem;
  font-weight:900;
}
.support-message-head span{
  color:#64748b;
  font-size:.78rem;
}
.support-message-text{
  color:#334155;
  margin-top:8px;
  white-space:pre-wrap;
}
.support-reply-box{
  border-top:1px solid #e5edf6;
  margin-top:18px;
  padding-top:16px;
}
.support-reply-actions{
  justify-content:flex-end;
  margin-top:10px;
}
.support-badge{
  border-radius:999px;
  display:inline-flex;
  font-size:.76rem;
  font-weight:900;
  padding:5px 9px;
  white-space:nowrap;
}
.support-badge-warning{background:#fff7ed;color:#c2410c;}
.support-badge-info{background:#eff6ff;color:#1d4ed8;}
.support-badge-danger{background:#fef2f2;color:#b91c1c;}
.support-badge-neutral{background:#f1f5f9;color:#475569;}
.support-events{
  border-top:1px solid #e5edf6;
  margin-top:18px;
  padding-top:16px;
}
.support-event{
  align-items:center;
  border-bottom:1px solid #eef2f7;
  display:grid;
  gap:8px;
  grid-template-columns:160px 1fr 1fr;
  padding:8px 0;
}
.support-event span,.support-event small{
  color:#64748b;
  font-size:.82rem;
}
.support-event strong{
  color:#0f172a;
  font-size:.86rem;
}
@media (max-width:991.98px){
  .support-admin-filters{grid-template-columns:repeat(2,minmax(0,1fr));}
  .support-admin-tools{grid-template-columns:1fr;}
}
@media (max-width:767.98px){
  .page-head-actions{align-items:stretch;flex-direction:column;}
  .support-admin-filters,.support-form,.support-detail-grid{grid-template-columns:1fr;}
  .support-event{grid-template-columns:1fr;}
}

/* Support tickets */
.support-ticket-code-pill{
  font-size:.78rem;
  padding:7px 11px;
}
.badge-closed{
  background:#fee2e2;
  color:#b91c1c;
}
.support-admin-table{
  table-layout:fixed;
  min-width:1080px;
}
.support-admin-table th[data-support-column="ticket"]{width:138px;}
.support-admin-table th[data-support-column="company"]{width:170px;}
.support-admin-table th[data-support-column="user"]{width:180px;}
.support-admin-table th[data-support-column="category"]{width:160px;}
.support-admin-table th[data-support-column="impact"]{width:210px;}
.support-admin-table th[data-support-column="priority"]{width:116px;}
.support-admin-table th[data-support-column="status"]{width:128px;}
.support-admin-table th[data-support-column="subject"]{width:230px;}
.support-admin-table th[data-support-column="updated_at"]{width:160px;}
.support-table-subject,
.support-table-wrap{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.support-table-strong{
  color:#0f172a;
  font-weight:900;
}
.support-table-user{
  color:#0f172a;
  font-weight:800;
}
.support-table-user small{
  color:#64748b;
  display:block;
  font-size:.76rem;
  font-weight:700;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.support-modal-panel{
  max-width:1040px;
}
.support-modal-panel-wide{
  max-width:1240px;
}
.support-modal-head{
  background:linear-gradient(135deg,#f8fbff 0%,#fff 100%);
}
.support-modal-head h3{
  align-items:center;
  display:flex;
  gap:10px;
}
.support-detail-header{
  align-items:center;
  background:linear-gradient(135deg,#f8fbff 0%,#fff 100%);
  border:1px solid #dbeafe;
  border-radius:18px;
  box-shadow:0 18px 42px rgba(15,23,42,.08);
  display:flex;
  gap:18px;
  justify-content:space-between;
  margin-bottom:16px;
  padding:18px;
}
.support-detail-header .detail-header-main{
  min-width:0;
}
.support-detail-header .detail-header-title{
  align-items:center;
  color:#0f172a;
  display:flex;
  font-size:1.38rem;
  font-weight:950;
  gap:10px;
  line-height:1.15;
  margin-top:8px;
  overflow-wrap:anywhere;
}
.support-detail-header .detail-header-badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.support-detail-actions{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
.support-close-btn{
  background:#fff;
  border-color:#fecaca;
  color:#b91c1c;
  font-weight:900;
}
.support-close-btn:hover{
  background:#dc2626;
  border-color:#dc2626;
  color:#fff;
}
.support-admin-tools{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:16px;
  display:grid;
  gap:12px;
  grid-template-columns:1fr 1fr auto;
  margin:0 0 16px;
  padding:14px;
}
.support-tabs{
  align-items:center;
  display:flex;
  gap:8px;
  margin-bottom:14px;
  overflow-x:auto;
  padding-bottom:2px;
}
.support-tab{
  align-items:center;
  background:#fff;
  border:1px solid #dbeafe;
  border-radius:14px;
  color:#334155;
  display:inline-flex;
  font-weight:900;
  gap:8px;
  padding:11px 14px;
  white-space:nowrap;
}
.support-tab i{
  color:#2563eb;
}
.support-tab.active{
  background:linear-gradient(135deg,#2563eb,#0ea5e9);
  border-color:#2563eb;
  box-shadow:0 14px 28px rgba(37,99,235,.22);
  color:#fff;
}
.support-tab.active i{
  color:#fff;
}
.support-section{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:18px;
  box-shadow:0 14px 34px rgba(15,23,42,.06);
  margin-bottom:16px;
  padding:18px;
}
.support-section h4{
  color:#0f172a;
  font-size:1rem;
  font-weight:950;
  margin:0 0 14px;
}
.support-section-head{
  align-items:center;
  display:flex;
  gap:12px;
  justify-content:space-between;
  margin-bottom:14px;
}
.support-info-grid{
  display:grid;
  gap:12px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.support-info-item{
  background:#f8fbff;
  border:1px solid #dbeafe;
  border-radius:14px;
  padding:12px 14px;
}
.support-info-item span{
  color:#64748b;
  display:block;
  font-size:.74rem;
  font-weight:950;
  letter-spacing:.04em;
  margin-bottom:5px;
  text-transform:uppercase;
}
.support-info-item strong{
  color:#0f172a;
  display:block;
  font-size:.94rem;
  font-weight:900;
  overflow-wrap:anywhere;
}
.support-info-span{
  grid-column:1/-1;
}
.support-message{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:14px;
  margin-bottom:10px;
  padding:13px 15px;
}
.support-message-system{
  background:#eff6ff;
  border-color:#bfdbfe;
}
.support-message-internal{
  background:#fff7ed;
  border-color:#fed7aa;
}
.support-message-head{
  align-items:center;
  display:flex;
  gap:10px;
  justify-content:space-between;
}
.support-message-head strong{
  color:#0f172a;
  font-size:.9rem;
  font-weight:950;
}
.support-message-head span{
  color:#64748b;
  font-size:.78rem;
  font-weight:800;
}
.support-message-text{
  color:#334155;
  font-weight:650;
  margin-top:8px;
  white-space:pre-wrap;
}
.support-reply-box{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:16px;
  margin-top:16px;
  padding:14px;
}
.support-reply-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
  margin-top:10px;
}
.support-create-form{
  display:grid;
  gap:14px;
}
.support-form-card{
  background:#f8fbff;
  border:1px solid #dbeafe;
  border-radius:18px;
  padding:16px;
}
.support-form-grid{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.support-form-span{
  grid-column:1/-1;
}
.support-form-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
}
.support-evidence-grid{
  margin-top:4px;
}
.support-timeline .timeline-dot{
  background:linear-gradient(135deg,#2563eb,#0ea5e9);
}
@media (max-width:991.98px){
  .support-detail-header{
    align-items:stretch;
    flex-direction:column;
  }
  .support-detail-actions{
    justify-content:flex-start;
  }
  .support-admin-tools{
    grid-template-columns:1fr;
  }
}
@media (max-width:767.98px){
  .support-info-grid,
  .support-form-grid{
    grid-template-columns:1fr;
  }
  .support-section-head,
  .support-form-actions{
    align-items:stretch;
    flex-direction:column;
  }
}

.support-create-mode .support-modal-panel{
  max-width:760px;
}
.support-detail-mode .support-modal-panel{
  max-width:1120px;
}
.support-modal-head{
  background:linear-gradient(135deg,#2563eb 0%,#0f2554 100%);
  border-bottom:0;
  color:#fff;
  min-height:88px;
}
.support-modal-head h3{
  align-items:center;
  color:#fff;
  display:flex;
  font-size:1.18rem;
  gap:12px;
  text-transform:uppercase;
}
.support-modal-head p{
  color:rgba(255,255,255,.82);
  font-weight:750;
}
.support-modal-close{
  background:#ef4444;
  color:#fff;
  font-weight:900;
}
.support-modal-close:hover{
  background:#dc2626;
  color:#fff;
}
.support-modal-title-icon,
.support-detail-icon{
  align-items:center;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.22);
  border-radius:14px;
  display:inline-flex;
  flex:0 0 38px;
  height:38px;
  justify-content:center;
  width:38px;
}
.support-detail-title-row{
  align-items:center;
  display:flex;
  gap:14px;
}
.support-detail-icon{
  background:linear-gradient(135deg,#2563eb,#0ea5e9);
  border-color:#bfdbfe;
  color:#fff;
  box-shadow:0 12px 26px rgba(37,99,235,.20);
}
.support-detail-title-row .detail-header-title{
  margin-top:6px;
}
.support-detail-title-row .detail-header-code{
  line-height:1;
}
.support-create-form .support-form-card{
  background:linear-gradient(135deg,#f8fbff 0%,#fff 100%);
  border-color:#bfdbfe;
  border-radius:18px;
}
.support-create-form .form-control{
  border-color:#d7e5f7;
  border-radius:13px;
  color:#0f172a;
  font-weight:850;
  min-height:44px;
}
.support-create-form .modern-textarea{
  min-height:112px;
}
.support-label-row{
  align-items:center;
  display:flex;
  justify-content:space-between;
  margin-bottom:6px;
}
.support-char-counter{
  background:#eff6ff;
  border:1px solid #dbeafe;
  border-radius:999px;
  color:#2563eb;
  font-size:.72rem;
  font-weight:950;
  padding:4px 8px;
}
.support-char-counter.is-over{
  background:#fef2f2;
  border-color:#fecaca;
  color:#b91c1c;
}
.is-invalid-soft{
  border-color:#ef4444 !important;
  box-shadow:0 0 0 3px rgba(239,68,68,.12) !important;
}
.support-file-picker-btn{
  align-items:center;
  background:linear-gradient(135deg,#2563eb,#0ea5e9);
  border:0;
  border-radius:13px;
  box-shadow:0 12px 26px rgba(37,99,235,.20);
  color:#fff;
  display:inline-flex;
  font-weight:950;
  min-height:42px;
  padding:10px 14px;
}
.support-file-picker-btn:hover{
  box-shadow:0 18px 34px rgba(37,99,235,.27);
  color:#fff;
  transform:translateY(-1px);
}
.support-pending-files{
  display:grid;
  gap:10px;
  margin-top:12px;
}
.support-pending-files-three{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.support-pending-file{
  align-items:center;
  background:#fff;
  border:1px solid #dbeafe;
  border-radius:14px;
  display:grid;
  gap:6px;
  grid-template-columns:auto 1fr auto;
  min-width:0;
  padding:10px;
}
.support-pending-file i{
  color:#2563eb;
}
.support-pending-file .fa-file-pdf{
  color:#dc2626;
}
.support-pending-file span{
  color:#0f172a;
  font-size:.82rem;
  font-weight:900;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.support-pending-file small{
  color:#64748b;
  font-size:.74rem;
  font-weight:800;
  grid-column:2/3;
}
.support-pending-file-remove{
  align-items:center;
  background:#fff1f2;
  border:1px solid #fecdd3;
  border-radius:999px;
  color:#be123c;
  display:inline-flex;
  height:26px;
  justify-content:center;
  width:26px;
}
.support-files-empty{
  background:#f8fafc;
  border:1px dashed #bfdbfe;
  border-radius:14px;
  color:#64748b;
  font-weight:850;
  grid-column:1/-1;
  padding:12px;
}
.support-table-company{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.support-table-company strong{
  color:#0f172a;
  font-weight:950;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.support-table-company .users-plan-badge{
  width:max-content;
}
.support-detail-header .detail-header-side.support-detail-actions{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap;
  gap:8px;
}
.support-detail-header .btn-action-header{
  width:auto;
}
.support-evidence-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.support-popup-box{
  max-width:420px;
}
@media (max-width:767.98px){
  .support-pending-files-three,
  .support-evidence-grid{
    grid-template-columns:1fr;
  }
}

/* Support final polish overrides */
.support-admin-table{
  table-layout:auto;
  min-width:100%;
  width:100%;
}
.support-admin-table th[data-support-column="ticket"]{min-width:130px;width:auto;}
.support-admin-table th[data-support-column="company"]{min-width:170px;width:auto;}
.support-admin-table th[data-support-column="user"]{min-width:180px;width:auto;}
.support-admin-table th[data-support-column="category"]{min-width:150px;width:auto;}
.support-admin-table th[data-support-column="impact"]{min-width:200px;width:auto;}
.support-admin-table th[data-support-column="priority"]{min-width:110px;width:auto;}
.support-admin-table th[data-support-column="status"]{min-width:120px;width:auto;}
.support-admin-table th[data-support-column="subject"]{min-width:220px;width:auto;}
.support-admin-table th[data-support-column="updated_at"]{min-width:160px;width:auto;}
.support-modal-close{
  background:#ef4444;
  border-radius:13px;
  color:#fff;
  height:34px;
  width:34px;
}
.support-detail-icon{
  display:none;
}
.support-ticket-code-pill-lg{
  font-size:.92rem;
  padding:10px 15px;
}
.support-detail-title-row{
  gap:0;
}

.companies-overview-table{min-width:1180px;}
.company-chip-stack{display:flex;flex-wrap:wrap;gap:5px;max-width:260px;}
.company-usage-chip{display:inline-flex;gap:4px;align-items:center;padding:4px 7px;border-radius:999px;background:#eef6ff;color:#1e3a8a;font-size:.72rem;font-weight:700;}
.company-usage-chip.is-risk{background:#fff1f2;color:#be123c;}
.company-metrics-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
.company-metric-card{padding:16px;border:1px solid #e2e8f0;border-radius:16px;background:#f8fafc;display:flex;flex-direction:column;gap:3px;}
.company-metric-card span{font-size:.72rem;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#64748b;}
.company-metric-card strong{font-size:1.2rem;color:#0f172a;}
.company-metric-card small{color:#64748b;font-weight:600;}
@media (max-width:991.98px){.company-metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:575.98px){.company-metrics-grid{grid-template-columns:1fr;}}
