/* ============================================================================
   PushReal SaaS - Atlassian Design System (Jira & Confluence Design Language)
   Refined, well-dimensioned, enterprise-grade typography, layout & components.
   ============================================================================ */

:root {
  /* Atlassian Core Neutral Palette (N-series) */
  --ds-background-canvas: #F7F8F9;      /* N10: Soft cool background canvas */
  --ds-surface: #FFFFFF;                /* Surface: Crisp white card/panel */
  --ds-background-surface: rgba(255, 255, 255, 0.65);
  /*--ds-background-surface: #FFFFFF;*/     /* Compatibility alias for ds-surface */
  --ds-surface-overlay: #FFFFFF;
  --ds-surface-hovered: #F1F2F4;        /* N20: Row/item hover */
  --ds-surface-pressed: #E9EBEE;        /* N30: Active state */
  
  --ds-border: #DCDFE4;                 /* N40: Default component border */
  --ds-border-subtle: #EBECF0;          /* N30: Subtle cell dividers */
  --ds-border-bold: #8590A2;            /* N200: Prominent border */
  --ds-border-focused: #0C66E4;         /* B400: Focus ring color */
  
  --ds-text: #172B4D;                   /* N800: High-contrast primary text */
  --ds-text-subtle: #44546F;            /* N500: Secondary text */
  --ds-text-subtlest: #626F86;          /* N400: Tertiary / muted / labels */
  --ds-text-disabled: #8993A4;          /* N300: Disabled state */
  --ds-text-inverse: #FFFFFF;
  
  /* Atlassian Primary Brand (B-series Blue) */
  --ds-brand-primary: #0C66E4;          /* B400: Primary Atlassian blue */
  --ds-brand-hover: #0055CC;            /* B500: Hover */
  --ds-brand-pressed: #09326C;          /* B600: Active / pressed */
  --ds-brand-subtle: #E9F2FF;           /* B50: Subtle tint background */
  --ds-brand-border: #85B8FF;           /* B100: Border tint */
  
  /* Atlassian Semantic Status (Success / Warning / Danger / Info) */
  --ds-success-text: #216E4E;           /* G500 */
  --ds-success-bg: #DCFFF1;             /* G50 */
  --ds-success-border: #BAF3DB;         /* G100 */
  
  --ds-warning-text: #7F5F01;           /* Y500 */
  --ds-warning-bg: #FFF7D6;             /* Y50 */
  --ds-warning-border: #F5CD47;         /* Y100 */
  
  --ds-danger-text: #AE2A19;            /* R500 */
  --ds-danger-bg: #FFEDEB;              /* R50 */
  --ds-danger-border: #FFD5D2;          /* R100 */
  
  --ds-info-text: #0055CC;              /* B500 */
  --ds-info-bg: #E9F2FF;                /* B50 */
  --ds-info-border: #85B8FF;            /* B100 */

  /* Legacy variable fallbacks for backward compatibility */
  --bg-canvas: var(--ds-background-canvas);
  --bg-card: var(--ds-surface);
  --border-subtle: var(--ds-border);
  --text-main: var(--ds-text);
  --text-muted: var(--ds-text-subtle);
  --color-primary: var(--ds-brand-primary);
  --color-success: var(--ds-success-text);
  --bg-success: var(--ds-success-bg);
  --border-success: var(--ds-success-border);
  --color-warning: var(--ds-warning-text);
  --bg-warning: var(--ds-warning-bg);
  --border-warning: var(--ds-warning-border);
  --color-danger: var(--ds-danger-text);
  --bg-danger: var(--ds-danger-bg);
  --border-danger: var(--ds-danger-border);

  /* Atlassian Typography Stack */
  --ds-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, "Fira Sans", "Helvetica Neue", sans-serif;
  --ds-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  
  /* Atlassian Elevation & Radius */
  --ds-radius-xs: 3px;
  --ds-radius-sm: 4px;
  --ds-radius-md: 4px;
  --ds-radius-lg: 8px;
  --ds-shadow-card: 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px rgba(9, 30, 66, 0.3);
  --ds-shadow-raised: 0 3px 5px -1px rgba(9, 30, 66, 0.2), 0 0 1px rgba(9, 30, 66, 0.3);
  --ds-shadow-overlay: 0 8px 16px -4px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31);

  /* Glassmorphism UI Design Tokens (008-glassmorphism-ui-layout) */
  --glass-bg-gradient: linear-gradient(135deg, rgba(224, 195, 252, 0.35) 0%, rgba(142, 197, 252, 0.35) 50%, rgba(251, 194, 235, 0.35) 100%);
  --glass-nav-bg: rgba(255, 255, 255, 0.85);
  --glass-nav-blur: blur(12px);
  --glass-nav-border: 1px solid rgba(255, 255, 255, 0.3);
  --glass-card-bg: rgba(255, 255, 255, 0.65);
  --glass-card-blur: blur(16px);
  --glass-card-radius: 20px;
  --glass-card-border: 1px solid rgba(255, 255, 255, 0.5);
  --glass-card-shadow: var(--ds-shadow-overlay, 0 8px 32px 0 rgba(31, 38, 135, 0.1));
}

/* Base Reset & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--ds-font-family);
  background-color: #F8FAFC;
  background-image: linear-gradient(135deg, rgba(224, 195, 252, 0.35) 0%, rgba(142, 197, 252, 0.35) 50%, rgba(251, 194, 235, 0.35) 100%);
  background-attachment: fixed;
  color: var(--ds-text, #333333);
  font-size: 16.5px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--ds-brand-primary);
  text-decoration: none;
  transition: color 0.1s ease;
}

a:hover {
  color: var(--ds-brand-hover);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ds-text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: 26px; line-height: 34px; }
h2 { font-size: 19px; line-height: 26px; }
h3 { font-size: 17px; line-height: 24px; }

.tabular-nums {
  font-variant-numeric: tabular-nums;
  font-family: var(--ds-font-mono);
}

/* ============================================================================
   Atlassian Header Navigation Bar (56px Jira/Confluence Standard)
   ============================================================================ */

.navbar,
.top-nav {
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(31, 38, 135, 0.06);
}

.navbar-inner {
  max-width: 1360px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  font-size: 15px;
  font-weight: 400;
  color: var(--ds-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--ds-radius-sm);
}

.brand-logo:hover {
  text-decoration: none;
  background: var(--ds-surface-hovered);
}

.brand-name {
  font-size: 25px;
  font-weight: 400;
  color: var(--ds-text);
  letter-spacing: -0.01em;
}

.brand-name strong {
  font-weight: 800;
  color: var(--ds-text);
}

.brand-icon,
.brand-icon-geom {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #0C66E4 0%, #0055CC 100%);
  color: #FFFFFF;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(12, 102, 228, 0.3);
  flex-shrink: 0;
}

.brand-badge {
  font-size: 11.5px;
  font-weight: 700;
  background: var(--ds-brand-subtle);
  color: var(--ds-brand-primary);
  border: 1px solid var(--ds-brand-border);
  padding: 1px 6px;
  border-radius: var(--ds-radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
}

.nav-link {
  text-decoration: none;
  color: var(--ds-text-subtle);
  font-size: 16px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--ds-radius-sm);
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.nav-link:hover {
  text-decoration: none;
  background-color: var(--ds-surface-hovered);
  color: var(--ds-text);
}

.nav-link.active {
  color: var(--ds-brand-primary);
  background-color: var(--ds-brand-subtle);
  font-weight: 600;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--ds-surface-hovered);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--ds-text);
}

.user-avatar-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ds-brand-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

/* ============================================================================
   Layout Containers & Grid
   ============================================================================ */

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--ds-text);
  margin-bottom: 4px;
}

.page-header p {
  color: var(--ds-text-subtlest);
  font-size: 15px;
  line-height: 22px;
}

/* ============================================================================
   Atlassian Card / Surface Panels (Glassmorphism Modern Style)
   ============================================================================ */

.card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--ds-shadow-overlay, 0 8px 32px 0 rgba(31, 38, 135, 0.1));
  padding: 14px 16px;
  margin-bottom: 12px;
}

.glass-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--ds-shadow-overlay, 0 8px 32px 0 rgba(31, 38, 135, 0.1));
  padding: 14px 16px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 18.5px;
  font-weight: 700;
  color: var(--ds-text);
  margin-bottom: 3px;
  font-family: var(--ds-font-family);
}

.card-subtitle {
  font-size: 15px;
  color: var(--ds-text-subtlest);
  margin-bottom: 10px;
  font-family: var(--ds-font-family);
}

/* Atlassian Jira-Style Metric Gadgets (KPI Cards) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.kpi-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--ds-shadow-overlay, 0 8px 32px 0 rgba(31, 38, 135, 0.1));
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 3px solid var(--ds-brand-primary);
}

.kpi-card.success-border {
  border-left-color: var(--ds-success-text);
}

.kpi-card.warning-border {
  border-left-color: var(--ds-warning-text);
}

.kpi-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ds-text-subtlest);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
  font-family: var(--ds-font-family);
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--ds-text);
  font-family: var(--ds-font-family);
  line-height: 28px;
}

.kpi-desc {
  font-size: 13px;
  color: var(--ds-text-subtlest);
  margin-top: 3px;
  font-family: var(--ds-font-family);
}

/* ============================================================================
   Atlassian Data Table (Jira Issue Navigator Styling + Glassmorphism)
   ============================================================================ */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.35);
}

.data-table th {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ds-text-subtlest);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  border-bottom: 2px solid rgba(220, 223, 228, 0.7);
  white-space: nowrap;
  user-select: none;
}

.data-table th[data-sort] {
  cursor: pointer;
  transition: background 0.12s ease;
}

.data-table th[data-sort]:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ds-text);
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(235, 236, 240, 0.75);
  vertical-align: middle;
  color: var(--ds-text);
  font-size: 15px;
}

.data-table tbody tr {
  transition: background-color 0.1s ease-out;
}

.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.75);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Key Column (Issue/Auction Identifier) */
.item-key {
  font-weight: 600;
  color: var(--ds-brand-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 15.5px;
}

.item-key:hover {
  text-decoration: underline;
}

.item-meta {
  font-size: 14px;
  color: var(--ds-text-subtlest);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.external-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ds-brand-primary);
  background: var(--ds-brand-subtle);
  padding: 2px 7px;
  border-radius: var(--ds-radius-xs);
  text-decoration: none !important;
  border: 1px solid var(--ds-brand-border);
  transition: background 0.12s;
}

.external-link-pill:hover {
  background: #D8E7FF;
}

/* ============================================================================
   Atlassian Lozenges & Badges
   ============================================================================ */

.lozenge, .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  font-family: var(--ds-font-family);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--ds-radius-sm, 4px);
  border: 1px solid transparent;
  white-space: nowrap;
  box-sizing: border-box;
}

.badge-neutral {
  background: #F1F2F4;
  color: var(--ds-text-subtle);
  border-color: #DCDFE4;
}

.badge-success, .badge-emerald {
  background: var(--ds-success-bg);
  color: var(--ds-success-text);
  border-color: var(--ds-success-border);
}

.badge-warning, .badge-amber {
  background: var(--ds-warning-bg);
  color: var(--ds-warning-text);
  border-color: var(--ds-warning-border);
}

.badge-danger, .badge-rose {
  background: var(--ds-danger-bg);
  color: var(--ds-danger-text);
  border-color: var(--ds-danger-border);
}

.badge-info, .badge-blue {
  background: var(--ds-info-bg);
  color: var(--ds-info-text);
  border-color: var(--ds-info-border);
}

/* Score Pills (Jira Story Point / Score Style) */
.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 3px 9px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--ds-font-mono);
  border-radius: var(--ds-radius-xs);
  border: 1px solid transparent;
}

.score-high {
  background: var(--ds-success-bg);
  color: var(--ds-success-text);
  border-color: var(--ds-success-border);
}

.score-med {
  background: var(--ds-info-bg);
  color: var(--ds-info-text);
  border-color: var(--ds-info-border);
}

.score-low {
  background: #F1F2F4;
  color: var(--ds-text-subtle);
  border-color: var(--ds-border);
}

/* ============================================================================
   Atlassian Buttons
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 16px;
  font-family: var(--ds-font-family);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  border-radius: var(--ds-radius-sm, 4px);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-decoration: none !important;
  white-space: nowrap;
  user-select: none;
  text-align: center;
}

.btn-primary {
  background: var(--ds-brand-primary, #0C66E4);
  color: #FFFFFF !important;
  border-color: var(--ds-brand-primary, #0C66E4);
}

.btn-primary:hover {
  background: var(--ds-brand-hover, #0055CC);
  border-color: var(--ds-brand-hover, #0055CC);
  color: #FFFFFF !important;
}

.btn-primary:active {
  background: var(--ds-brand-pressed, #09326C);
  border-color: var(--ds-brand-pressed, #09326C);
}

.btn-outline, .btn-subtle {
  background: var(--ds-surface-hovered, #F1F2F4);
  border-color: var(--ds-border, #DCDFE4);
  color: var(--ds-text, #172B4D);
}

.btn-outline:hover, .btn-subtle:hover {
  background: var(--ds-surface-sunken, #EBECF0);
  border-color: var(--ds-border-bold, #8590A2);
  color: var(--ds-text, #172B4D);
}

.btn-sm {
  min-height: 32px;
  padding: 5px 12px;
  font-size: 14px;
  font-weight: 600;
}

.btn-tracked {
  background: #FFF7D6;
  border-color: #F5CD47;
  color: #7F5F01;
  font-weight: 600;
}

.btn-tracked:hover {
  background: #FEEFAD;
}

/* ============================================================================
   Form Inputs & Interactive Filters
   ============================================================================ */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--ds-text);
  margin-bottom: 4px;
}

.form-label-desc {
  font-size: 14px;
  color: var(--ds-text-subtlest);
  margin-bottom: 6px;
}

.form-control, .form-select {
  height: 38px;
  padding: 6px 12px;
  font-family: var(--ds-font-family);
  font-size: 15px;
  color: var(--ds-text);
  background: #FAFBFC;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-xs);
  transition: all 0.12s ease;
  outline: none;
}

.form-control:hover, .form-select:hover {
  background: #F4F5F7;
}

.form-control:focus, .form-select:focus {
  background: #FFFFFF;
  border-color: var(--ds-brand-primary);
  box-shadow: 0 0 0 2px rgba(12, 102, 228, 0.2);
}

/* Sliders & Range Controls */
.range-slider {
  width: 100%;
  height: 6px;
  background: var(--ds-border);
  border-radius: 3px;
  outline: none;
  accent-color: var(--ds-brand-primary);
}

.bubble-value {
  font-weight: 700;
  font-size: 16px;
  color: var(--ds-brand-primary);
}

/* Segmented Buttons (Atlassian Segmented Control) */
.segmented-control {
  display: flex;
  background: #EBECF0;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-sm);
  padding: 2px;
  gap: 2px;
}

.segmented-option {
  flex: 1;
  text-align: center;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ds-text-subtle);
  border-radius: var(--ds-radius-xs);
  cursor: pointer;
  user-select: none;
  transition: all 0.12s;
}

.segmented-option:hover {
  color: var(--ds-text);
}

.segmented-option.selected {
  background: #FFFFFF;
  color: var(--ds-brand-primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(9, 30, 66, 0.12);
}

/* Filter Toolbar Card */
.filter-toolbar {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--ds-shadow-overlay, 0 8px 32px 0 rgba(31, 38, 135, 0.1));
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================================================
   Pagination Bar
   ============================================================================ */

.pagination-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 14px;
}

.pagination-btn {
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  font-size: 14.5px;
  font-weight: 500;
  border-radius: var(--ds-radius-xs);
  border: 1px solid var(--ds-border);
  background: var(--ds-surface);
  color: var(--ds-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.pagination-btn:hover {
  background: var(--ds-surface-hovered);
}

.pagination-btn.active {
  background: var(--ds-brand-primary);
  border-color: var(--ds-brand-primary);
  color: #FFFFFF;
  font-weight: 600;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================================
   Atlassian Toast Notifications (Flag Messages)
   ============================================================================ */

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #172B4D;
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: var(--ds-radius-sm);
  box-shadow: var(--ds-shadow-raised);
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s ease-out;
  min-width: 260px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================================
   Atlassian Column Header Tooltips (Explanatory Calculation Popovers)
   ============================================================================ */

.th-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.th-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #DFE1E6;
  color: #44546F;
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
  cursor: help;
  transition: all 0.12s ease;
}

.th-tooltip:hover .th-tooltip-icon {
  background: var(--ds-brand-primary);
  color: #FFFFFF;
}

.th-tooltip-box {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 290px;
  background: #172B4D;
  color: #FFFFFF;
  padding: 10px 12px;
  border-radius: var(--ds-radius-sm);
  box-shadow: var(--ds-shadow-overlay);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  text-align: left;
  z-index: 300;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: translateY(-4px);
}

.th-tooltip-box.align-right {
  left: auto;
  right: 0;
}

.th-tooltip-box strong {
  display: block;
  color: #85B8FF;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.th-tooltip:hover .th-tooltip-box {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================================
   Atlassian Tabs for Multi-Lot Auctions & Structured Key-Value Groups
   ============================================================================ */

.lote-tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid var(--ds-border);
  margin-bottom: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.lote-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 6px 12px;
  font-family: var(--ds-font-family);
  font-size: 15px;
  font-weight: 600;
  color: var(--ds-text-subtle);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s ease;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 320px;
}

.lote-tab-btn span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lote-tab-btn:hover {
  color: var(--ds-brand-primary);
  background: var(--ds-surface-hovered);
  border-radius: var(--ds-radius-xs) var(--ds-radius-xs) 0 0;
}

.lote-tab-btn.active {
  color: var(--ds-brand-primary);
  border-bottom-color: var(--ds-brand-primary);
  background: var(--ds-brand-subtle);
  border-radius: var(--ds-radius-xs) var(--ds-radius-xs) 0 0;
}

.lote-panel {
  display: none;
}

.lote-panel.active {
  display: block;
}

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

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--ds-border-subtle);
  font-size: 15px;
  font-family: var(--ds-font-family);
}

.kv-row:last-child {
  border-bottom: none;
}

.kv-label {
  color: var(--ds-text-subtle);
  font-weight: 500;
  min-width: 120px;
  flex-shrink: 0;
  font-size: 15px;
  font-family: var(--ds-font-family);
}

.kv-value {
  color: var(--ds-text);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
  font-size: 15px;
  font-family: var(--ds-font-family);
}

.kv-block {
  padding: 8px 10px;
  background: var(--ds-background-canvas);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-xs);
  margin-top: 4px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ds-text);
  font-family: var(--ds-font-family);
}

/* Collapsible Long Text Blocks (Descripción, Información adicional, Inscripción registral) */
.kv-collapsible {
  width: 100%;
  margin-top: 4px;
}

.kv-collapsible-body {
  position: relative;
  padding: 8px 10px;
  background: var(--ds-background-canvas);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-xs);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ds-text);
  max-height: 54px;
  overflow: hidden;
  transition: max-height 0.25s ease;
  font-family: var(--ds-font-family);
}

.kv-collapsible-body::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 22px;
  background: linear-gradient(transparent, var(--ds-background-canvas));
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.kv-collapsible.is-expanded .kv-collapsible-body {
  max-height: 1200px;
}

.kv-collapsible.is-expanded .kv-collapsible-body::after {
  opacity: 0;
}

.kv-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  padding: 4px 10px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--ds-font-family);
  color: var(--ds-brand-primary);
  background: var(--ds-brand-subtle);
  border: 1px solid var(--ds-brand-border);
  border-radius: var(--ds-radius-xs);
  cursor: pointer;
  transition: background 0.12s ease;
}

.kv-expand-btn:hover {
  background: #D8E7FF;
}

/* Región Destacada de Dictamen Crítico y Objetivo (Debajo del Apartado 1) */
.critical-analysis-region {
  background: linear-gradient(135deg, #EEF4FF 0%, #F5F7FB 100%);
  border: 1px solid #C5D8FF;
  border-left: 5px solid var(--ds-brand-primary);
  border-radius: var(--ds-radius-md);
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(9, 30, 66, 0.06);
  font-family: var(--ds-font-family);
}

/* Prevenir desborde en etiquetas de dictamen crítico en modo responsive */
.critical-analysis-region .lozenge,
.detail-critical-header .lozenge,
.demo-critical-header .lozenge,
.detail-critical-badge,
.demo-critical-badge {
  white-space: normal !important;
  word-break: break-word !important;
  line-height: 1.35 !important;
  max-width: 100% !important;
  text-align: center;
  box-sizing: border-box !important;
}

.critical-analysis-region.level-high {
  background: linear-gradient(135deg, #ECFDF3 0%, #F4F9F6 100%);
  border-color: #ABEFC6;
  border-left-color: #1F845A;
}

.critical-analysis-region.level-medium {
  background: linear-gradient(135deg, #FFFAEB 0%, #F9F7F1 100%);
  border-color: #FEDF89;
  border-left-color: #B54708;
}

.critical-analysis-region.level-low {
  background: linear-gradient(135deg, #FEF3F2 0%, #FAF5F5 100%);
  border-color: #FECDCA;
  border-left-color: #C9372C;
}

/* Distribución en Rejilla de las Secciones de la Ficha (Boceto de 6 Secciones) */
.detail-row-2-3 {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.detail-row-4-5-6 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Homogeneización tipográfica y compactación de espacio en Ficha y Ficha Demo */
.detail-dossier-wrapper,
.detail-dossier-wrapper *,
.demo-dossier-wrapper,
.demo-dossier-wrapper * {
  font-family: var(--ds-font-family) !important;
}

.detail-row-2-3 > .card,
.detail-row-4-5-6 > .card {
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden;
}

@media (max-width: 1080px) {
  .detail-row-2-3,
  .detail-row-4-5-6 {
    grid-template-columns: minmax(0, 1fr);
  }
}

#filterOpportunityLabel:hover {
  filter: brightness(0.96);
}

/* ============================================================================
   Modal Dialogs & Overlays (Atlassian Design System)
   ============================================================================ */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(9, 30, 66, 0.6) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999 !important;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.active,
.modal-backdrop[style*="display: flex"] {
  display: flex !important;
}

.modal-dialog {
  background: rgba(255, 255, 255, 0.96) !important;
  background-color: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--ds-text, #172B4D) !important;
  border-radius: 4px;
  padding: 24px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 12px 32px -4px rgba(9, 30, 66, 0.35), 0 0 1px rgba(9, 30, 66, 0.31);
  border: 1px solid rgba(255, 255, 255, 0.7);
  position: relative;
  z-index: 1001;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ds-border-subtle, #EBECF0);
}

.modal-title {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  color: var(--ds-text, #172B4D);
  line-height: 26px;
}

.modal-subtitle {
  margin: 2px 0 0 0;
  font-size: 14.5px;
  color: var(--ds-text-subtle, #44546F);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--ds-text-subtle, #44546F);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--ds-radius-xs, 3px);
  transition: all 0.1s ease;
}

.modal-close-btn:hover {
  background: var(--ds-surface-hovered, #F1F2F4);
  color: var(--ds-text, #172B4D);
}

.modal-body {
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--ds-border-subtle, #EBECF0);
}

/* ============================================================================
   Public Preview Protection (Doble Barrera Anti-DevTools)
   ============================================================================ */
.blur-protect {
  filter: blur(4.5px);
  -webkit-filter: blur(4.5px);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
  cursor: not-allowed;
  display: inline-block;
  letter-spacing: 1.5px;
  opacity: 0.85;
  transition: filter 0.2s ease;
}

.blur-container {
  position: relative;
  display: inline-block;
}

.lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--ds-brand-subtle, #E9F2FF);
  color: var(--ds-brand-primary, #0C66E4);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--ds-radius-xs, 3px);
  border: 1px solid var(--ds-brand-border, #85B8FF);
}

/* ============================================================================
   Escala Cromática de Verdes para Índice IAR
   - < 30: Color gris claro neutral
   - 30 a 39.9: Verde más claro / suave (Tier 1)
   - 40 a 49.9: Verde suave intermedio (Tier 2)
   - 50 a 59.9: Verde intermedio intenso (Tier 3)
   - >= 60: Verde más fuerte con texto blanco de alto contraste (Tier 4)
   ============================================================================ */

.badge-iar-neutral {
  background-color: #F1F2F4 !important;
  color: #44546F !important;
  border: 1px solid #DCDFE4 !important;
}

.badge-iar-tier1 {
  background-color: #E3FCEF !important;
  color: #006644 !important;
  border: 1px solid #ABF5D1 !important;
}

.badge-iar-tier2 {
  background-color: #BAF3DB !important;
  color: #144A28 !important;
  border: 1px solid #7EE2B8 !important;
}

.badge-iar-tier3 {
  background-color: #4BCE97 !important;
  color: #052614 !important;
  border: 1px solid #2ABB7F !important;
  font-weight: 700 !important;
}

.badge-iar-tier4 {
  background-color: #1F845A !important;
  color: #FFFFFF !important;
  border: 1px solid #144A28 !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 2px rgba(20, 74, 40, 0.25);
}

/* Etiqueta / Badge gris para Tipología */
.badge-tipologia {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--ds-radius-xs, 3px);
  font-size: 12px !important;
  font-weight: 600;
  background-color: #F1F2F4;
  color: #44546F;
  border: 1px solid #DCDFE4;
  white-space: nowrap;
  font-family: var(--ds-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif);
}

/* Tipografía homogénea (12px, misma fuente) en toda la tabla de oportunidades */
.table-opportunities th,
.table-opportunities td,
.table-opportunities td * {
  font-family: var(--ds-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif);
  font-size: 12px;
}

.table-opportunities th[data-sort] {
  cursor: pointer !important;
  user-select: none !important;
  transition: color 0.15s ease;
}

.table-opportunities th[data-sort]:hover {
  color: var(--ds-brand-primary, #0052cc) !important;
}

.sort-icon {
  font-size: 9px;
  margin-left: 2px;
  opacity: 0.6;
  display: inline-block;
}

.sort-icon.active {
  opacity: 1;
  color: var(--ds-brand-primary, #0052cc);
  font-weight: bold;
}

/* ============================================================================
   Responsive Mobile Optimization (Phones & Tablets)
   ============================================================================ */

/* ============================================================================
   Mobile Navigation Drawer & Responsive Helpers (User Story 5)
   ============================================================================ */

.btn-mobile-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 14px;
  font-family: var(--ds-font-family);
  font-size: 13px;
  font-weight: 600;
  color: var(--ds-text, #172B4D);
  background: var(--ds-surface-hovered, #F1F2F4);
  border: 1px solid var(--ds-border, #DCDFE4);
  border-radius: var(--ds-radius-sm, 4px);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-mobile-menu:hover {
  background: var(--ds-surface-sunken, #EBECF0);
  border-color: var(--ds-border-bold, #8590A2);
  color: var(--ds-brand-primary, #0C66E4);
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid var(--ds-border, #DCDFE4);
  box-shadow: -4px 0 24px rgba(31, 38, 135, 0.18);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), visibility 0.25s ease;
  overflow-y: auto;
}

.mobile-nav-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ds-border, #DCDFE4);
}

.mobile-drawer-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ds-text, #172B4D);
}

.btn-close-drawer {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  background: none;
  border: 1px solid var(--ds-border, #DCDFE4);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ds-text-subtle, #44546F);
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  gap: 6px;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ds-text, #172B4D);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.mobile-drawer-link:hover, .mobile-drawer-link.active {
  background: var(--ds-brand-subtle, #E9F2FF);
  color: var(--ds-brand-primary, #0C66E4);
}

.mobile-drawer-link.mobile-drawer-cta {
  background: var(--ds-brand-primary, #0C66E4);
  color: #FFFFFF !important;
  margin-top: 10px;
  justify-content: center;
}

.mobile-drawer-divider {
  height: 1px;
  background: var(--ds-border, #DCDFE4);
  margin: 8px 0;
}

.mobile-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(9, 30, 66, 0.45);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-drawer-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ============================================================================
   Cabeceras responsivas y Filtro en escritorio
   ============================================================================ */
.desktop-header-label {
  display: inline;
}
.mobile-header-label {
  display: none;
}

@media (min-width: 769px) {
  .opportunities-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 20px;
    align-items: flex-end;
  }
  .opportunities-filter-container .filter-main-grid {
    display: flex;
    gap: 16px;
    align-items: flex-end;
  }
  .opportunities-filter-container .filter-group-province {
    min-width: 220px;
  }
  .opportunities-filter-container .filter-group-tipologia {
    min-width: 180px;
  }
  .opportunities-filter-container .filter-row-bottom {
    display: contents;
  }
  .opportunities-filter-container .filter-action-csv {
    margin-left: auto;
    align-self: flex-end;
  }
  .opportunities-filter-container .btn-export-csv {
    height: 36px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: var(--ds-radius-sm, 4px);
  }
}

@media (max-width: 768px) {
  html, body {
    min-width: 320px;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .btn-mobile-menu {
    display: inline-flex;
    min-height: 44px;
    min-width: 44px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
  }

  .desktop-only,
  .nav-links {
    display: none !important;
  }

  /* Altura táctil mínima accesible conforme a WCAG 2.1 (>= 44px) */
  .btn,
  .btn-primary,
  .btn-outline,
  .btn-subtle,
  button:not(.slider-captcha-thumb),
  .form-control,
  .form-input-landing,
  .form-select-landing {
    min-height: 44px;
    box-sizing: border-box;
  }

  /* Navigation Bar Adaptations */
  .navbar {
    height: auto;
    min-height: 56px;
    padding: 6px 0;
  }

  .navbar-inner {
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 12px;
  }

  .brand-logo {
    font-size: 14px;
    padding: 4px 6px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 6px 0;
    gap: 4px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    font-size: 13px;
    padding: 5px 10px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .user-pill {
    padding: 3px 6px;
    font-size: 12px;
  }

  /* Container & Spacing */
  .container {
    padding: 14px 10px 36px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
  }

  .page-header h1 {
    font-size: 19px;
    line-height: 24px;
  }

  .page-header p {
    font-size: 12px;
  }

  /* Card and Panels */
  .card {
    padding: 12px 10px;
    margin-bottom: 12px;
  }

  /* Filter Bar Responsiveness */
  .card:not(.detail-section-card):not(.table-card):not(.opportunities-filter-card) > div[style*="display: flex"]:not(.detail-section-head):not(.detail-dates-badges) {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .opportunities-filter-card {
    padding: 10px 10px !important;
    margin-bottom: 12px !important;
    border-radius: var(--ds-radius-sm, 4px) !important;
  }

  .opportunities-filter-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .filter-main-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .filter-main-grid .filter-group {
    min-width: 0 !important;
    width: 100% !important;
  }

  .filter-group label {
    display: block !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: var(--ds-text-subtlest) !important;
    text-transform: uppercase !important;
    margin-bottom: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .filter-group select {
    width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
    font-size: 12px !important;
    padding: 3px 6px !important;
    border-radius: 4px !important;
  }

  .filter-group-categories {
    width: 100% !important;
  }

  .filter-group-categories label.category-label-title {
    display: block !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: var(--ds-text-subtlest) !important;
    text-transform: uppercase !important;
    margin-bottom: 3px !important;
  }

  .categories-radio-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px 12px !important;
    align-items: center !important;
    height: auto !important;
    min-height: unset !important;
  }

  .categories-radio-wrap label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 12px !important;
    margin: 0 !important;
    cursor: pointer !important;
    min-height: unset !important;
  }

  /* Fila de Categorías y Descarga CSV Integrada */
  .filter-row-bottom {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
  }

  .filter-action-csv {
    margin-left: auto !important;
    align-self: flex-end !important;
  }

  .filter-action-csv .btn-export-csv {
    font-size: 11px !important;
    font-weight: 600 !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    border-radius: 4px !important;
    margin-bottom: 1px !important;
  }

  /* Table and Horizontal Scroll */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--ds-radius-xs);
    margin: 0 -4px;
  }

  /* Tabla de oportunidades: eliminar scroll horizontal y ocultar columnas secundarias */
  .table-container:has(.table-opportunities) {
    overflow-x: hidden !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .table-opportunities {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }

  .table-opportunities .col-mobile-hide,
  .table-opportunities th:nth-child(3),
  .table-opportunities td:nth-child(3),
  .table-opportunities th:nth-child(7),
  .table-opportunities td:nth-child(7),
  .table-opportunities th:nth-child(8),
  .table-opportunities td:nth-child(8),
  .table-opportunities th:nth-child(9),
  .table-opportunities td:nth-child(9),
  .table-opportunities th:nth-child(6),
  .table-opportunities td:nth-child(6),
  .table-opportunities th:nth-child(11),
  .table-opportunities td:nth-child(11) {
    display: none !important;
  }

  /* Etiquetas reducidas para evitar solapamiento en header */
  .desktop-header-label {
    display: none !important;
  }
  .mobile-header-label {
    display: inline !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    white-space: nowrap !important;
  }

  .table-opportunities th {
    padding: 12px 4px !important;
    font-size: 12px !important;
    letter-spacing: 0.02em !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .table-opportunities td {
    padding: 10px 4px !important;
    font-size: 12px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    vertical-align: middle !important;
  }

  .table-opportunities tbody tr {
    border-bottom: 1px solid var(--ds-border, #ebecf0) !important;
  }

  .table-opportunities th.col-iar,
  .table-opportunities td.col-iar {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    text-align: center !important;
    padding-left: 1px !important;
    padding-right: 1px !important;
  }

  .table-opportunities th.col-expediente,
  .table-opportunities td.col-expediente {
    width: 28% !important;
    text-align: left !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .table-opportunities th.col-ubicacion,
  .table-opportunities td.col-ubicacion {
    width: 25% !important;
    text-align: left !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .table-opportunities th.col-valor,
  .table-opportunities td.col-valor {
    width: 25% !important;
    text-align: right !important;
    white-space: nowrap !important;
    font-size: 12px !important;
  }

  .table-opportunities th.col-vencimiento,
  .table-opportunities td.col-vencimiento {
    width: 22% !important;
    text-align: center !important;
    white-space: nowrap !important;
    font-size: 12px !important;
  }
  .table-opportunities .col-vencimiento span {
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  .table-opportunities th.col-margen,
  .table-opportunities td.col-margen {
    width: 20% !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  .table th,
  .table td {
    padding: 8px 8px !important;
    font-size: 12px !important;
  }

  /* Table Pagination */
  #paginationControls {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    gap: 6px;
  }

  /* Ficha de Subasta Proporcional en Móvil */
  .container:has(.detail-dossier-wrapper),
  .container:has(.demo-dossier-wrapper) {
    padding-left: 8px !important;
    padding-right: 8px !important;
    padding-top: 8px !important;
    padding-bottom: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .detail-dossier-wrapper,
  .demo-dossier-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .detail-page-header,
  .demo-page-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  .detail-header-actions,
  .demo-header-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
    margin-top: 4px !important;
  }

  .detail-header-actions .btn,
  .demo-header-actions .btn {
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    border-radius: 6px !important;
  }

  .detail-kpi-grid,
  .demo-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .detail-kpi-grid .kpi-card,
  .demo-kpi-grid .kpi-card {
    padding: 9px 10px !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .detail-kpi-grid .kpi-title,
  .demo-kpi-grid .kpi-title {
    font-size: 11.5px !important;
    line-height: 1.2 !important;
    margin-bottom: 2px !important;
    white-space: normal !important;
  }

  .detail-kpi-grid .kpi-value,
  .demo-kpi-grid .kpi-value {
    font-size: 18px !important;
    line-height: 1.2 !important;
    margin-bottom: 2px !important;
  }

  .detail-kpi-grid .kpi-desc,
  .demo-kpi-grid .kpi-desc {
    font-size: 11.5px !important;
    line-height: 1.25 !important;
  }

  /* Action Buttons in Grid */
  .btn-sm {
    padding: 3px 6px !important;
    font-size: 11px !important;
  }

  /* Modals */
  .modal-backdrop {
    padding: 10px;
  }

  .modal-dialog {
    max-width: 95vw !important;
    margin: 10px auto !important;
    padding: 16px 14px !important;
  }

  .modal-title {
    font-size: 16px;
    line-height: 20px;
  }

  /* KPI Grid & Cards */
  .kpi-card:not(.detail-kpi-grid .kpi-card):not(.demo-kpi-grid .kpi-card) {
    padding: 12px !important;
  }

  .kpi-value:not(.detail-kpi-grid .kpi-value):not(.demo-kpi-grid .kpi-value) {
    font-size: 22px !important;
    line-height: 26px !important;
  }
}

@media (max-width: 480px) {
  .nav-link span {
    font-size: 12px;
  }

  .btn {
    font-size: 12px;
  }

  .modal-dialog {
    padding: 14px 10px !important;
  }
}

/* ============================================================================
   Slider Captcha (Control de barra con deslizamiento antibot)
   ============================================================================ */

.slider-captcha-wrap {
  margin: 12px 0 16px;
  width: 100%;
  box-sizing: border-box;
}

.slider-captcha-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ds-text, #172B4D);
  margin-bottom: 6px;
}

.slider-captcha-track {
  position: relative;
  width: 100%;
  height: 42px;
  background: var(--ds-surface-hovered, #F1F2F4);
  border: 1px solid var(--ds-border, #DCDFE4);
  border-radius: 24px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.slider-captcha-track.is-verified {
  background: #E3FCEF !important;
  border-color: #36B37E !important;
}

.slider-captcha-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: #DEEBFF;
  border-radius: 24px;
  pointer-events: none;
  transition: width 0.05s ease;
}

.slider-captcha-track.is-verified .slider-captcha-fill {
  background: #E3FCEF;
  width: 100% !important;
}

.slider-captcha-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ds-text-subtle, #44546F);
  pointer-events: none;
  z-index: 1;
  transition: color 0.2s ease;
  letter-spacing: -0.01em;
}

.slider-captcha-track.is-verified .slider-captcha-text {
  color: #006644 !important;
  font-weight: 700;
}

.slider-captcha-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ds-brand-primary, #0C66E4);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: grab;
  box-shadow: 0 1px 3px rgba(9, 30, 66, 0.25);
  z-index: 2;
  touch-action: none;
  user-select: none;
  transition: background 0.2s ease, transform 0.05s ease;
}

.slider-captcha-thumb:active {
  cursor: grabbing;
}

.slider-captcha-track.is-verified .slider-captcha-thumb {
  background: #00875A !important;
  cursor: default !important;
}

/* ============================================================================
   Reversibilidad Instantánea a Tema Clásico Atlassian (body.theme-classic)
   Permite volver al diseño sólido anterior cambiando class="theme-classic" en <body>
   ============================================================================ */

body.theme-classic {
  background: var(--ds-background-canvas, #F7F8F9) !important;
  background-attachment: scroll !important;
  color: var(--ds-text, #172B4D);
}

body.theme-classic .navbar,
body.theme-classic .top-nav {
  background: var(--ds-surface, #FFFFFF) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid var(--ds-border, #DCDFE4) !important;
  box-shadow: 0 1px 2px rgba(9, 30, 66, 0.08) !important;
}

body.theme-classic .mobile-nav-drawer {
  background: var(--ds-surface, #FFFFFF) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-left: none !important;
  box-shadow: -4px 0 24px rgba(9, 30, 66, 0.2) !important;
}

body.theme-classic .card,
body.theme-classic .glass-card,
body.theme-classic .filter-toolbar {
  background: var(--ds-surface, #FFFFFF) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: var(--ds-radius-sm, 4px) !important;
  border: 1px solid var(--ds-border, #DCDFE4) !important;
  box-shadow: var(--ds-shadow-card) !important;
}

body.theme-classic .kpi-card {
  background: var(--ds-surface, #FFFFFF) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: var(--ds-radius-sm, 4px) !important;
  border: 1px solid var(--ds-border, #DCDFE4) !important;
  border-left: 3px solid var(--ds-brand-primary) !important;
  box-shadow: var(--ds-shadow-card) !important;
}

body.theme-classic .data-table {
  background: var(--ds-surface, #FFFFFF) !important;
}

body.theme-classic .data-table th {
  background: #FAFBFC !important;
  border-bottom: 2px solid var(--ds-border, #DCDFE4) !important;
}

body.theme-classic .data-table tbody tr:hover {
  background-color: var(--ds-surface-hovered, #F1F2F4) !important;
}

/* ==========================================================================
   BOTONES PASIVOS DE FECHAS (FICHA REAL Y DEMO) Y PULSACIÓN NARANJA
   ========================================================================== */
.btn-date-static {
  cursor: default !important;
  pointer-events: none !important;
  user-select: none !important;
  font-family: var(--ds-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  background-color: #FAFBFC;
  color: var(--ds-text, #172B4D);
  border: 1px solid var(--ds-border, #DCDFE4);
  border-radius: var(--ds-radius-sm, 6px) !important;
  padding: 0 10px !important;
  height: 38px !important;
  min-height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease;
}

@keyframes pulseExpiringField {
  0%, 100% {
    background-color: rgba(226, 136, 0, 0.12);
    color: #9E4900;
    border-color: #FEC57B;
    box-shadow: 0 0 0 1px rgba(226, 136, 0, 0.25);
  }
  50% {
    background-color: rgba(226, 136, 0, 0.32);
    color: #702E00;
    border-color: #F18D13;
    box-shadow: 0 0 8px rgba(226, 136, 0, 0.50);
  }
}

.btn-date-static.field-expiring-soon,
.field-expiring-soon {
  animation: pulseExpiringField 1.3s infinite ease-in-out !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

.btn-date-static.btn-date-finalizada {
  background-color: #F1F2F4 !important;
  color: #626F86 !important;
  border-color: #DCDFE4 !important;
  animation: none !important;
  box-shadow: none !important;
}

/* ============================================================================
   Geospatial Viewers (Catastro WMS + Google Maps)
   ============================================================================ */

.geospatial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  margin-top: 12px;
}

.geospatial-map-card {
  border: 1px solid var(--ds-border, #DCDFE4);
  border-radius: 8px;
  overflow: hidden;
  height: 380px;
  min-height: 340px;
  position: relative;
  background-color: var(--ds-surface-subtle, #F7F8F9);
}

.geospatial-single-card {
  border: 1px solid var(--ds-border, #DCDFE4);
  border-radius: 8px;
  overflow: hidden;
  height: 420px;
  min-height: 350px;
  position: relative;
  width: 100%;
  background-color: var(--ds-surface-subtle, #F7F8F9);
}

.geospatial-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
}

.geospatial-empty-card {
  padding: 32px 20px;
  text-align: center;
  background-color: var(--ds-surface-subtle, #F7F8F9);
  border: 1px dashed var(--ds-border, #DCDFE4);
  border-radius: 8px;
  color: var(--ds-text-subtle, #44546F);
}

.geospatial-badge-notice {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  border: 1px solid var(--ds-border, #DCDFE4);
  color: var(--ds-warning-text, #7F5F01);
  display: none;
}

@media (max-width: 768px) {
  .geospatial-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .geospatial-map-card,
  .geospatial-single-card {
    height: 320px !important;
    min-height: 300px !important;
  }
}

/* ==========================================================================
   SPEC-AGENT-PREMIUM-REPORT: ESTILOS DE INFORME PREMIUM Y BADGES
   ========================================================================== */
.badge-premium-report {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.badge-premium-report:hover {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.18);
  transform: translateY(-1px);
}

.badge-premium-report svg {
  width: 12px;
  height: 12px;
}

.icon-premium-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--ds-radius-xs, 3px);
  background: rgba(16, 185, 129, 0.15);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.35);
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.15s ease;
  vertical-align: middle;
}

.icon-premium-report:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
}

.icon-premium-report svg {
  width: 11px;
  height: 11px;
}

.btn-premium-cta {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-premium-cta:hover {
  transform: translateY(-1px);
}

@media print {
  .badge-premium-report {
    border: 1px solid #888;
    background: #f0f0f0 !important;
    color: #000 !important;
  }
}

/* Flecha de retorno al catálogo de subastas en fichas de detalle y demo */
.back-link-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ds-text, #1e293b);
  background: var(--ds-surface, #ffffff);
  border: 1px solid var(--ds-border, #dcdfe4);
  transition: all 0.15s ease;
  margin-right: 4px;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.back-link-arrow:hover {
  color: var(--ds-brand-primary, #0052cc);
  background: var(--ds-surface-hovered, #f4f5f7);
  border-color: var(--ds-brand-primary, #0052cc);
  transform: translateX(-3px);
  box-shadow: 0 2px 6px rgba(0, 82, 204, 0.15);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-animation {
  animation: spin 0.85s linear infinite;
}







