@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=DM+Mono:ital,wght@0,300..500;1,300..500&display=swap");

:root {
  /* Design Tokens from CMMSFSC tokens.css */
  --gray-25:  #FCFCFD;
  --gray-50:  #F9FAFB;
  --gray-100: #F2F4F7;
  --gray-200: #E4E7EC;
  --gray-300: #D0D5DD;
  --gray-400: #98A2B3;
  --gray-500: #667085;
  --gray-600: #475467;
  --gray-700: #344054;
  --gray-800: #1D2939;
  --gray-900: #101828;

  --color-brand:        #3478D8;
  --color-brand-dark:   #245EA8;
  --color-brand-light:  #EAF3FE;
  
  --color-bg-app:       #EEF4F8;
  --color-bg-2:          #F9FCFD;
  --color-bg-3:          #E4EEF2;
  --color-bg-4:          #D7E5EA;

  --color-tx:            #052425;
  --color-tx-2:          #274348;
  --color-tx-3:          #58767D;
  --color-tx-4:          #8AA2A8;

  --color-ok:            #079455;
  --color-ok-bg:         #ECFDF3;
  --color-warn:          #DC6803;
  --color-warn-bg:       #FFFAEB;
  --color-danger:        #D92D20;
  --color-danger-bg:     #FEF3F2;
  --color-info:          #3478D8;
  --color-info-bg:       #EAF3FE;
  --color-border:        #D3E2E8;

  --color-executive-black:        #052425;

  /* Semantic status colors from tokens.css */
  --color-work-preventive:        #1E5EF3;
  --color-work-preventive-bg:     #EEF3FF;
  --color-work-preventive-border: #C5D4FB;
  --color-work-corrective:        #DC6803;
  --color-work-corrective-bg:     #FFFAEB;
  --color-work-corrective-border: #FEDF89;
  --color-work-projection:        #7A5AF8;
  --color-work-projection-bg:     #F4F0FF;
  --color-work-projection-border: #D9D0FC;
  --color-work-completed:         #079455;
  --color-work-completed-bg:      #ECFDF3;
  --color-work-completed-border:  #ABEFC6;
  --color-work-overdue:           #D92D20;
  --color-work-overdue-bg:        #FEF3F2;
  --color-work-overdue-border:    #FECDCA;

  --color-status-open:            #DC6803;
  --color-status-open-bg:         #FFFAEB;
  --color-status-open-border:     #FEDF89;
  --color-status-assigned:        #1E5EF3;
  --color-status-assigned-bg:     #EEF3FF;
  --color-status-assigned-border: #C5D4FB;
  --color-status-progress:        #7A5AF8;
  --color-status-progress-bg:     #F4F0FF;
  --color-status-progress-border: #D9D0FC;
  --color-status-hold:            #667085;
  --color-status-hold-bg:         #F2F4F7;
  --color-status-hold-border:     #E4E7EC;
  --color-status-completed:       #079455;
  --color-status-completed-bg:    #ECFDF3;
  --color-status-completed-border:#ABEFC6;
  --color-status-cancelled:       #98A2B3;
  --color-status-cancelled-bg:    #F9FAFB;
  --color-status-cancelled-border:#E4E7EC;

  --font-sans: "DM Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "DM Mono", "SF Mono", "JetBrains Mono", monospace;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-2xl: 14px;
  --radius-3xl: 20px;
  --radius-4xl: 28px;
  --radius-5xl: 32px;

  --chrome-radius:  var(--radius-3xl);
  --card-radius:    var(--radius-3xl);
  --overlay-radius: var(--radius-4xl);
  --border-radius: var(--radius-xl);

  --card-shadow:       0 1px 3px rgba(15,60,80,0.08), 0 1px 2px rgba(15,60,80,0.05);
  --floating-shadow:   0 12px 16px -4px rgba(16,24,40,0.08), 0 4px 6px -2px rgba(16,24,40,0.04);
}

/* Reset and Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--color-tx-2);
  background: var(--color-bg-app);
  height: 100vh;
  overflow: hidden;
  display: flex;
}

/* Main Application Shell */
.app-sidebar {
  width: 240px;
  background: var(--color-bg-2);
  border-right: 1px solid var(--color-border);
  height: 100vh;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-logo {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--color-border);
}

.logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--color-tx);
  letter-spacing: -0.02em;
}

.sidebar-nav {
  padding: 16px 12px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-tx-3);
  text-decoration: none;
  transition: all 150ms ease;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--gray-100);
  color: var(--color-tx);
}

.nav-item.active {
  background: var(--color-brand-light);
  color: var(--color-brand);
}

.nav-item svg {
  width: 16px;
  height: 16px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-brand-dark);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-tx);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10px;
  color: var(--color-tx-4);
}

/* Main Container Area */
.main-area {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Top Navbar */
.app-navbar {
  height: 48px;
  background: var(--color-bg-2);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-link {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-tx-4);
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  transition: color 150ms ease;
}

.breadcrumb-link:hover {
  color: var(--color-brand);
}

.breadcrumb-link.active {
  color: var(--color-brand);
}

.breadcrumb-sep {
  color: var(--color-tx-4);
  opacity: 0.5;
  font-size: 10px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-action-btn {
  background: none;
  border: none;
  color: var(--color-tx-3);
  cursor: pointer;
  transition: color 150ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-action-btn:hover {
  color: var(--color-tx);
}

.nav-action-btn svg {
  width: 18px;
  height: 18px;
}

/* Main Content Workspace */
.workspace-content {
  flex-grow: 1;
  padding: 24px;
  overflow-y: auto;
  background: var(--color-bg-app);
}

/* ------------------------------------------------------------- */
/* Expediente del Nodo Card                                       */
/* ------------------------------------------------------------- */
.expediente-card {
  max-width: 1100px;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--chrome-radius);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Card Header */
.expediente-header {
  background: rgba(249, 252, 253, 0.88);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 24px;
  position: relative;
}

.expediente-header-bg-icon {
  position: absolute;
  top: 0;
  right: 0;
  padding: 16px;
  opacity: 0.03;
  pointer-events: none;
}

.expediente-header-bg-icon svg {
  width: 100px;
  height: 100px;
}

.expediente-title-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.title-section {
  display: flex;
  flex-direction: column;
}

.title-sub {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-tx-4);
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}

.title-main-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.title-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xl);
  background: var(--color-brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(52, 120, 216, 0.2);
  border: 1px solid rgba(36, 94, 168, 0.1);
  flex-shrink: 0;
}

.title-icon svg {
  width: 18px;
  height: 18px;
}

.title-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--color-tx);
  letter-spacing: -0.02em;
}

/* Stats rollups next to title */
.header-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 1px solid var(--color-border);
  padding-left: 16px;
}

.header-stat-box {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.stat-val.brand {
  color: var(--color-brand);
}

.stat-val.tx {
  color: var(--color-tx);
}

.stat-lbl {
  font-size: 7px;
  font-weight: 800;
  color: var(--color-tx-4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* Badge list */
.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gray-900);
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-md);
  font-size: 9px;
  font-weight: 700;
}

.tag-lbl {
  opacity: 0.6;
  letter-spacing: 0.05em;
}

.tag-val {
  font-family: var(--font-mono);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-md);
  font-size: 9px;
  font-weight: 700;
}

.badge.dot::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
}

.badge-danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid #FECDCA;
}

.badge-ok {
  background: var(--color-ok-bg);
  color: var(--color-ok);
  border: 1px solid #ABEFC6;
}

.badge-info {
  background: var(--color-brand-light);
  color: var(--color-brand);
  border: 1px solid #C5D4FB;
}

.badge-neutral {
  background: var(--gray-100);
  color: var(--color-tx-2);
  border: 1px solid var(--color-border);
}

/* Config button */
.config-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0 14px;
  height: 36px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-tx-2);
  cursor: pointer;
  transition: all 150ms ease;
}

.config-btn:hover {
  background: var(--gray-50);
  border-color: var(--color-tx-4);
}

.config-btn svg {
  width: 14px;
  height: 14px;
}

/* Navigation Tabs */
.tabs-bar {
  background: white;
  border-bottom: 1px solid var(--color-border);
  padding: 0 24px;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-tx-4);
  letter-spacing: 0.15em;
  position: relative;
  cursor: pointer;
  transition: color 150ms ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--color-tx-2);
}

.tab-btn.active {
  color: var(--color-brand);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-brand);
}

.tab-btn svg {
  width: 14px;
  height: 14px;
}

/* Tab Panel Contents */
.tab-content {
  padding: 24px;
  overflow-y: auto;
  max-height: 600px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: slideUp 200ms ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------------------------------------- */
/* Pestaña: Información                                           */
/* ------------------------------------------------------------- */
.info-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}

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

/* Anchos angostos (mockup móvil de la landing): que los KPIs del header
   no queden cortados — bajan debajo del título en vez de salirse de la tarjeta. */
@media (max-width: 560px) {
  .expediente-title-container {
    flex-wrap: wrap;
  }
  .header-stats {
    border-left: 0;
    padding-left: 0;
    width: 100%;
  }
  .title-text {
    font-size: 18px;
  }
}

/* QR Code Card */
.qr-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.qr-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-tx-4);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.qr-code-text {
  font-size: 12px;
  font-weight: 800;
  color: var(--color-tx);
  margin-bottom: 12px;
}

.qr-code-wrapper {
  background: var(--gray-50);
  padding: 16px;
  border-radius: var(--radius-xl);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border: 1px solid var(--color-border);
  width: 100%;
}

.qr-code-wrapper svg {
  width: 140px;
  height: 140px;
}

.qr-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.qr-btn {
  background: var(--gray-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-tx-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 150ms ease;
}

.qr-btn:hover {
  background: var(--color-brand-light);
  color: var(--color-brand);
  border-color: var(--color-brand);
}

.qr-btn svg {
  width: 12px;
  height: 12px;
}

/* Master Data Summary Box */
.summary-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
}

.summary-title-row {
  margin-bottom: 16px;
}

.summary-title {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--color-tx-4);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-desc {
  font-size: 11px;
  color: var(--color-tx-3);
  margin-top: 4px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.summary-item {
  background: var(--color-bg-app);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.summary-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.summary-item-icon {
  color: var(--color-tx-4);
  display: flex;
  align-items: center;
}

.summary-item-icon svg {
  width: 13px;
  height: 13px;
}

.summary-item-lbl {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-tx-4);
  letter-spacing: 0.05em;
}

.summary-item-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-tx);
  letter-spacing: -0.01em;
}

/* Technical Specs Sheet Box */
.specs-section {
  margin-top: 20px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
}

.specs-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.specs-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-tx-2);
  cursor: pointer;
  transition: all 150ms ease;
}

.specs-btn:hover {
  background: var(--gray-50);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.specs-item {
  background: var(--color-bg-app);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.specs-lbl {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-tx-4);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.specs-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-tx);
}

/* Description block */
.desc-section {
  margin-top: 20px;
  background: var(--color-bg-app);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: 16px 20px;
}

.desc-title {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--color-tx-4);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.desc-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-tx-2);
  font-weight: 500;
}

/* ------------------------------------------------------------- */
/* Pestaña: Adjuntos                                             */
/* ------------------------------------------------------------- */
.attachments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--color-bg-app);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: 20px;
  margin-bottom: 20px;
}

.attachments-meta {
  display: flex;
  flex-direction: column;
}

.attachments-meta-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-tx);
}

.attachments-meta-desc {
  font-size: 11px;
  color: var(--color-tx-3);
  margin-top: 2px;
}

.attach-btn {
  background: var(--color-brand);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  padding: 0 16px;
  height: 36px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 150ms ease;
  box-shadow: 0 4px 10px rgba(52, 120, 216, 0.15);
}

.attach-btn:hover {
  background: var(--color-brand-dark);
}

.attach-btn svg {
  width: 14px;
  height: 14px;
}

.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: 12px;
  transition: border-color 150ms ease;
}

.attachment-item:hover {
  border-color: rgba(52, 120, 216, 0.3);
}

.attachment-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xl);
  background: var(--gray-50);
  color: var(--color-tx-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.attachment-icon svg {
  width: 18px;
  height: 18px;
}

.attachment-info {
  flex-grow: 1;
  min-width: 0;
}

.attachment-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.attachment-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-tx);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-name:hover {
  color: var(--color-brand);
}

.attachment-tag {
  background: var(--gray-100);
  color: var(--color-tx-3);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.attachment-meta-text {
  font-size: 10px;
  color: var(--color-tx-4);
}

.attachment-desc {
  font-size: 11px;
  color: var(--color-tx-3);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.attachment-action-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--color-tx-4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 150ms ease;
}

.attachment-action-btn:hover {
  background: var(--color-brand-light);
  color: var(--color-brand);
}

.attachment-action-btn.delete:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.attachment-action-btn svg {
  width: 15px;
  height: 15px;
}

/* Upload zone simulator */
.upload-zone {
  border: 1px dashed var(--color-border);
  background: var(--gray-25);
  border-radius: var(--radius-2xl);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 150ms ease;
  margin-top: 16px;
}

.upload-zone:hover {
  border-color: var(--color-brand);
  background: var(--color-brand-light);
}

.upload-zone svg {
  width: 28px;
  height: 28px;
  color: var(--color-tx-4);
  margin-bottom: 8px;
}

.upload-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-tx);
}

.upload-sub {
  font-size: 10px;
  color: var(--color-tx-4);
  margin-top: 4px;
}

/* ------------------------------------------------------------- */
/* Pestaña: Familia y Fallas (Taxonomy Tree)                      */
/* ------------------------------------------------------------- */
.taxonomy-intro-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: 20px;
  margin-bottom: 20px;
}

.taxonomy-intro-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.taxonomy-intro-info {
  display: flex;
  flex-direction: column;
}

.taxonomy-tree-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Tree Grid Layout Elements mapping TreeEditableRow */
.tree-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--color-border);
  padding: 10px 14px;
}

.tree-row:first-child {
  border-top: none;
}

.tree-row.muted {
  opacity: 0.6;
}

.tree-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tree-row-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}

.tree-row-dot.family { background: var(--color-brand); }
.tree-row-dot.component { background: var(--gray-400); }
.tree-row-dot.cause { background: var(--color-ok); }

.tree-row-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tree-row-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-tx);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-row-sub {
  font-size: 10px;
  color: var(--color-tx-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.tree-row-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.tree-children-container {
  border-left: 1px solid var(--color-border);
  margin-left: 20px;
}

.tree-causes-container {
  border-left: 2px solid var(--color-brand-light);
  margin-left: 36px;
}

/* Static group block */
.static-group {
  border-top: 1px solid var(--color-border);
}

.static-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--gray-50);
  padding: 8px 12px;
}

.static-group-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.static-group-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-brand);
}

.static-group-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--color-tx);
}

.static-group-list {
  border-left: 1px solid var(--color-brand-light);
  margin-left: 20px;
}

/* ------------------------------------------------------------- */
/* Pestaña: Medidores (Manual Inspections - "No en Vivo")        */
/* ------------------------------------------------------------- */
.telemetry-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .telemetry-row {
    grid-template-columns: 1fr;
  }
}

.metric-panel {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
}

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

.metric-meta {
  display: flex;
  flex-direction: column;
}

.metric-title {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--color-tx-4);
  letter-spacing: 0.1em;
}

.metric-desc {
  font-size: 11px;
  color: var(--color-tx-3);
  margin-top: 2px;
}

.metric-value-box {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--color-tx);
}

.metric-unit {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-tx-4);
}

.metric-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-ok);
}

.chart-wrapper {
  background: var(--gray-25);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  height: 180px;
  width: 100%;
  padding: 8px;
  position: relative;
  display: flex;
  align-items: flex-end;
  margin-top: 10px;
}

.chart-svg {
  width: 100%;
  height: 100%;
}

.chart-line {
  fill: none;
  stroke: var(--color-brand);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: url(#chartGrad);
}

.chart-grid-line {
  stroke: var(--color-border);
  stroke-width: 1;
  stroke-dasharray: 4, 4;
}

/* Inspection status legend */
.inspection-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gray-100);
  color: var(--color-tx-3);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
  width: fit-content;
  border: 1px solid var(--color-border);
}

.inspection-dot {
  width: 5px;
  height: 5px;
  background: var(--color-tx-3);
  border-radius: 50%;
  display: inline-block;
}

.inspection-warning-note {
  margin-top: 16px;
  padding: 10px 12px;
  background: var(--color-warn-bg);
  border: 1px solid #FEDF89;
  border-radius: var(--radius-lg);
  font-size: 11px;
  color: var(--color-warn);
  line-height: 1.4;
  font-weight: 700;
}

/* ------------------------------------------------------------- */
/* Pestaña: Mantenimiento (2-Column Layout matching react code)   */
/* ------------------------------------------------------------- */
.maint-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

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

.maint-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.maint-section-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--chrome-radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
}

.maint-section-title {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--color-tx-4);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.maint-section-title svg {
  width: 16px;
  height: 16px;
  color: var(--color-brand);
}

.maint-section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.maint-section-title-row .maint-section-title {
  margin-bottom: 0;
}

/* Open Work Orders list */
.wo-mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wo-mini-item {
  background: var(--gray-25);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-3xl);
  padding: 14px;
  cursor: pointer;
  transition: all 150ms ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wo-mini-item.assigned {
  background: var(--color-status-assigned-bg);
  border: 1px solid var(--color-status-assigned-border);
}

.wo-mini-item.assigned:hover {
  border-color: var(--color-status-assigned);
  background: white;
  transform: translateX(4px);
}

.wo-mini-item.open {
  background: var(--color-status-open-bg);
  border: 1px solid var(--color-status-open-border);
}

.wo-mini-item.open:hover {
  border-color: var(--color-status-open);
  background: white;
  transform: translateX(4px);
}

.wo-mini-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wo-mini-num {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  color: var(--color-brand);
  background: var(--color-brand-light);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(52, 120, 216, 0.1);
}

.wo-mini-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-tx);
}

/* Strategy groups PM */
.pm-strategy-card {
  background: var(--gray-25);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-3xl);
  padding: 16px;
  margin-bottom: 12px;
}

.pm-strategy-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.pm-strategy-header svg {
  width: 13px;
  height: 13px;
  color: var(--color-brand);
}

.pm-strategy-name {
  font-size: 11px;
  font-weight: 900;
  color: var(--color-tx);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pm-pkg-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pm-pkg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-xl);
  transition: all 150ms ease;
}

.pm-pkg-row.released {
  background: white;
  border: 1px solid var(--gray-100);
}

.pm-pkg-row.planned {
  background: rgba(249, 250, 251, 0.6);
  border: 1px dashed var(--color-border);
}

.pm-pkg-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pm-pkg-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.pm-pkg-name {
  font-size: 11px;
  font-weight: 700;
  truncate: truncate;
}

.pm-pkg-name.released { color: var(--color-tx-2); }
.pm-pkg-name.planned { color: var(--color-tx-3); }

.pm-pkg-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.pm-pkg-action-btn {
  font-size: 9px;
  font-weight: 800;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
  text-transform: uppercase;
  transition: color 150ms ease;
}

.pm-pkg-action-btn.view-ot {
  color: var(--color-brand);
}

.pm-pkg-action-btn.view-ot:hover {
  color: var(--color-brand-dark);
}

.pm-pkg-action-btn.release {
  color: #7A5AF8;
}

.pm-pkg-action-btn.release:hover {
  color: #5b3ce0;
}

.pm-pkg-due-text {
  font-size: 9px;
  font-weight: 800;
  color: var(--color-tx-4);
  text-transform: uppercase;
}

/* Predictive Analysis Callout Header */
.predictive-banner {
  background: var(--color-executive-black);
  border-radius: 20px;
  padding: 16px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: var(--floating-shadow);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.predictive-banner::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(52, 120, 216, 0.1) 0%, rgba(52, 120, 216, 0) 70%);
  transform: rotate(12deg);
}

.predictive-banner-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.predictive-banner-header svg {
  width: 15px;
  height: 15px;
  color: var(--color-brand);
}

.predictive-banner-title {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-brand);
}

.predictive-banner-desc {
  font-size: 11px;
  color: var(--gray-300);
  line-height: 1.4;
  font-weight: 500;
}

/* Projections cards list */
.projections-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

.projections-list::-webkit-scrollbar {
  width: 4px;
}

.projections-list::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.projection-group {
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}

.projection-group:first-child {
  border-top: none;
  padding-top: 0;
}

.projection-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-status-assigned);
  padding: 12px 14px;
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  margin-bottom: 12px;
}

.projection-group-name {
  font-size: 10px;
  font-weight: 950;
  color: var(--color-tx);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.projection-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 10px 12px;
  margin-bottom: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.projection-card.released-hito {
  border: 1px solid var(--color-border) !important;
  border-top: 4px solid var(--color-status-open) !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 14px;
}

.projection-card.projected-hito {
  border: 1.5px dashed var(--color-status-progress-border) !important; /* dashed purple border */
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 14px;
}

.projection-card-header-label {
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
  color: var(--color-status-progress); /* purple */
  display: flex;
  align-items: center;
  gap: 4px;
}

.projection-card-header-label svg {
  width: 10px;
  height: 10px;
}

.projection-card-due-window {
  font-size: 9px;
  font-weight: 800;
  color: var(--color-status-progress); /* purple */
  text-transform: uppercase;
  margin-top: 2px;
}

.projection-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.projection-card-icon {
  color: var(--color-brand);
  display: flex;
  align-items: center;
}

.projection-card-icon svg {
  width: 14px;
  height: 14px;
}

.projection-card-info {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.projection-card-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-tx-2);
}

.projection-card-meta {
  font-size: 9px;
  color: var(--color-tx-4);
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.projection-card-badge {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.projection-card-badge.released {
  background: var(--color-brand-light);
  color: var(--color-brand);
}

.projection-card-badge.planned {
  background: var(--gray-100);
  color: var(--color-tx-3);
}

/* Custom code tags inside cards */
.wo-mini-num.assigned {
  color: var(--color-status-assigned);
  background: var(--color-status-assigned-bg);
  border: 1px solid var(--color-status-assigned-border);
}

.wo-mini-num.open {
  color: var(--color-status-open);
  background: var(--color-status-open-bg);
  border: 1px solid var(--color-status-open-border);
}


/* ------------------------------------------------------------- */
/* Document Mock Preview Modals (PDF & DWG Drawings)             */
/* ------------------------------------------------------------- */
.preview-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 36, 37, 0.42);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 200ms ease-out;
}

.preview-container {
  width: 90%;
  max-width: 850px;
  height: 85vh;
  background: white;
  border-radius: var(--overlay-radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--floating-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleUp 200ms ease-out;
}

.preview-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-title-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-title-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-title-icon.pdf {
  background: #FEF3F2;
  color: var(--color-danger);
}

.preview-title-icon.dwg {
  background: var(--color-brand-light);
  color: var(--color-brand);
}

.preview-title-icon svg {
  width: 16px;
  height: 16px;
}

.preview-filename {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-tx);
}

.preview-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-close-btn {
  background: none;
  border: none;
  color: var(--color-tx-4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--radius-md);
  transition: all 150ms ease;
}

.preview-close-btn:hover {
  background: var(--gray-100);
  color: var(--color-tx);
}

.preview-close-btn svg {
  width: 16px;
  height: 16px;
}

.preview-body {
  flex-grow: 1;
  overflow: auto;
  background: #525659;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Inside Mock PDF Document */
.mock-pdf-page {
  background: white;
  width: 100%;
  max-width: 600px;
  height: 100%;
  min-height: 650px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  padding: 48px;
  display: flex;
  flex-direction: column;
}

.pdf-header {
  border-bottom: 2px solid var(--color-brand);
  padding-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pdf-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  color: var(--color-brand-dark);
}

.pdf-doc-type {
  font-size: 10px;
  font-weight: 800;
  color: var(--color-tx-4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pdf-body {
  margin-top: 32px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.pdf-doc-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--color-tx);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.pdf-meta-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 11px;
}

.pdf-meta-table td {
  padding: 6px 8px;
  border: 1px solid var(--color-border);
}

.pdf-meta-table td.label {
  background: var(--gray-50);
  font-weight: 800;
  width: 30%;
  color: var(--color-tx-3);
  text-transform: uppercase;
}

.pdf-meta-table td.value {
  font-weight: 600;
  color: var(--color-tx-2);
}

.pdf-content-p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-tx-2);
  margin-bottom: 12px;
}

.pdf-bullets {
  margin-left: 20px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-tx-2);
  margin-bottom: 16px;
}

.pdf-footer {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--color-tx-4);
  font-weight: 700;
}

/* Inside Mock CAD DWG Drawing */
.mock-cad-viewport {
  background: #0f141d;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cad-crosshair-h, .cad-crosshair-v {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.cad-crosshair-h {
  width: 100%;
  height: 1px;
  top: 50%;
  left: 0;
}

.cad-crosshair-v {
  height: 100%;
  width: 1px;
  left: 50%;
  top: 0;
}

.cad-svg-draw {
  width: 90%;
  height: 90%;
}

.cad-line-entity {
  stroke: #00ff00;
  stroke-width: 1.5;
  fill: none;
}

.cad-dimension-entity {
  stroke: #00ffff;
  stroke-width: 1;
  fill: none;
  font-size: 8px;
}

.cad-text-entity {
  fill: #ffffff;
  font-family: var(--font-mono);
  font-size: 9px;
}

.cad-annotation-entity {
  fill: #ff00ff;
  font-family: var(--font-mono);
  font-size: 7px;
}

.cad-status-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #1e2430;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 4px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #8fa0c0;
}

.cad-status-coords {
  font-weight: bold;
}

/* Lightbox Modal (For Visual Assets Preview)                     */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 36, 37, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 200ms ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: scaleUp 200ms ease-out;
}

@keyframes scaleUp {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: white;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-display);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 28px;
  cursor: pointer;
  transition: color 150ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  color: white;
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--gray-900);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--floating-shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 200ms ease-out;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Status Badges */
.badge-status-open {
  background: var(--color-status-open-bg);
  color: var(--color-status-open);
  border: 1px solid var(--color-status-open-border);
}
.badge-status-assigned {
  background: var(--color-status-assigned-bg);
  color: var(--color-status-assigned);
  border: 1px solid var(--color-status-assigned-border);
}
.badge-status-progress {
  background: var(--color-status-progress-bg);
  color: var(--color-status-progress);
  border: 1px solid var(--color-status-progress-border);
}
.badge-status-completed {
  background: var(--color-status-completed-bg);
  color: var(--color-status-completed);
  border: 1px solid var(--color-status-completed-border);
}
.badge-status-hold {
  background: var(--color-status-hold-bg);
  color: var(--color-status-hold);
  border: 1px solid var(--color-status-hold-border);
}
.badge-status-cancelled {
  background: var(--color-status-cancelled-bg);
  color: var(--color-status-cancelled);
  border: 1px solid var(--color-status-cancelled-border);
}

/* Work/PM Cadence Badges */
.badge-work-preventive {
  background: var(--color-work-preventive-bg);
  color: var(--color-work-preventive);
  border: 1px solid var(--color-work-preventive-border);
}
.badge-work-corrective {
  background: var(--color-work-corrective-bg);
  color: var(--color-work-corrective);
  border: 1px solid var(--color-work-corrective-border);
}
.badge-work-completed {
  background: var(--color-work-completed-bg);
  color: var(--color-work-completed);
  border: 1px solid var(--color-work-completed-border);
}
.badge-work-overdue {
  background: var(--color-work-overdue-bg);
  color: var(--color-work-overdue);
  border: 1px solid var(--color-work-overdue-border);
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
    overflow-y: auto;
    height: auto;
  }
  .app-sidebar {
    display: none;
  }
  .main-area {
    height: auto;
    overflow: visible;
  }
  .workspace-content {
    padding: 12px;
    overflow: visible;
  }
  .tab-content {
    max-height: none;
    padding: 16px 12px;
  }
  .expediente-card {
    border-radius: var(--radius-xl);
  }
}

