/* ==========================================================================
   AGROKOOL CAMPO PWA — UI/UX PRO MAX DESIGN SYSTEM
   Corporate Palette:
     - Deep Forest / Dark Olive: #2c4001
     - Plant Lime Green:         #a1c62e
     - Harvest Gold / Ochre:     #a87d13
   ========================================================================== */

:root {
  /* Brand Tokens */
  --brand-primary: #2c4001;
  --brand-primary-dark: #1e2d01;
  --brand-primary-light: #3d5705;
  --brand-primary-soft: #edf4e4;
  --brand-primary-border: rgba(44, 64, 1, 0.12);

  --brand-lime: #a1c62e;
  --brand-lime-hover: #b4db33;
  --brand-lime-soft: rgba(161, 198, 46, 0.16);
  --brand-lime-glow: rgba(161, 198, 46, 0.35);

  --brand-gold: #a87d13;
  --brand-gold-hover: #be8e18;
  --brand-gold-soft: rgba(168, 125, 19, 0.14);
  --brand-gold-border: rgba(168, 125, 19, 0.35);

  /* Neutrals & Surfaces */
  --bg-page: #f8faf5;
  --bg-subtle: #f1f5ec;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --border-light: rgba(44, 64, 1, 0.09);
  --border-strong: rgba(44, 64, 1, 0.18);

  /* Typography */
  --text-primary: #192602;
  --text-secondary: #536647;
  --text-muted: #798d6c;
  --text-inverse: #ffffff;

  /* Status Colors */
  --status-green-bg: #eaf5d8;
  --status-green-text: #2c5908;
  --status-amber-bg: #fdf5de;
  --status-amber-text: #8a650d;
  --status-red-bg: #fde8e5;
  --status-red-text: #9e2a1b;
  --status-blue-bg: #e6f0fa;
  --status-blue-text: #1d5588;

  /* Elevation Shadows */
  --shadow-xs: 0 1px 2px rgba(44, 64, 1, 0.05);
  --shadow-sm: 0 2px 6px -1px rgba(44, 64, 1, 0.08), 0 1px 3px rgba(44, 64, 1, 0.04);
  --shadow-md: 0 6px 16px -2px rgba(44, 64, 1, 0.10), 0 2px 6px -1px rgba(44, 64, 1, 0.05);
  --shadow-lg: 0 16px 36px -6px rgba(44, 64, 1, 0.14), 0 4px 12px -2px rgba(44, 64, 1, 0.06);
  --shadow-gold: 0 8px 24px -4px rgba(168, 125, 19, 0.22);
  --shadow-modal: 0 25px 60px -12px rgba(30, 45, 1, 0.35);

  /* Transitions */
  --transition-fast: 0.16s ease;
  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Admin CRUD dashboard */
.admin-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:18px 0}.admin-stat,.admin-panel{background:#fff;border:1px solid #dbe4ee;border-radius:16px;box-shadow:0 3px 10px #17324d0d}.admin-stat{padding:20px}.admin-stat small{display:block;color:#47627d;font-weight:700;font-size:11px;letter-spacing:.06em}.admin-stat strong{display:block;font-size:30px;margin:8px 0 2px}.admin-stat span{color:#60758c;font-size:12px}.admin-panel{padding:20px}.admin-form{display:grid;grid-template-columns:1.5fr 1fr auto;gap:14px;align-items:end}.admin-form label{display:block;color:#34536e;font-size:12px;font-weight:700;margin-bottom:6px}.admin-form select,.admin-form input,.admin-toolbar input,.admin-toolbar select{width:100%;min-height:42px;border:1px solid #cbd9e5;border-radius:9px;padding:0 12px;background:#fff}.admin-toolbar{display:grid;grid-template-columns:1fr 220px;gap:12px;border:1px solid #e1e9f0;border-radius:12px;padding:14px;margin:18px 0}.admin-table{overflow:auto;border:1px solid #dbe4ee;border-radius:14px}.admin-row{display:grid;grid-template-columns:1fr 1.5fr 1fr 1.5fr .8fr 1.5fr;gap:12px;align-items:center;padding:14px 12px;border-bottom:1px solid #edf2f6;font-size:13px}.admin-row:last-child{border-bottom:0}.admin-head{background:#f6f9fc;color:#47627d;font-size:11px;font-weight:800;letter-spacing:.04em}.admin-row small{display:block;color:#6e8295}.admin-badge{display:inline-block;border-radius:999px;padding:5px 10px;font-style:normal;font-size:11px;font-weight:700}.admin-badge.ok{background:#d9f8e8;color:#087a4c}.admin-badge.off{background:#edf0f3;color:#687887}.mono{font-family:ui-monospace,SFMono-Regular,monospace;font-size:11px;color:#526a80}.admin-panel .danger{color:#b42318;border-color:#f4b6b0}@media(max-width:900px){.admin-stats{grid-template-columns:repeat(2,1fr)}.admin-form{grid-template-columns:1fr}.admin-row{min-width:880px}.admin-toolbar{grid-template-columns:1fr}}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

h1, h2, h3, h4, p {
  margin-top: 0;
}

h1 {
  font-size: clamp(26px, 2.5vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 750;
  color: var(--brand-primary);
  margin-bottom: 8px;
}

h2 {
  font-size: clamp(20px, 1.8vw, 24px);
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 6px;
}

h3 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--brand-primary);
}

p {
  margin-bottom: 14px;
}

.muted {
  color: var(--text-secondary);
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin: 0 0 8px;
  display: inline-block;
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--brand-primary);
  border-radius: 9px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  min-height: 42px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
  user-select: none;
}

.btn:hover {
  background: var(--bg-subtle);
  border-color: var(--brand-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn.primary {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--text-inverse);
  box-shadow: 0 3px 10px rgba(44, 64, 1, 0.25);
}

.btn.primary:hover {
  background: var(--brand-primary-light);
  border-color: var(--brand-primary-light);
  box-shadow: 0 5px 15px rgba(44, 64, 1, 0.32);
}

.btn.primary:active {
  background: var(--brand-primary-dark);
}

.btn.small {
  padding: 7px 13px;
  font-size: 12px;
  min-height: 34px;
  border-radius: 7px;
}

.btn.full {
  width: 100%;
  justify-content: space-between;
}

.btn.danger {
  background: var(--status-red-bg);
  border-color: rgba(184, 58, 40, 0.3);
  color: var(--status-red-text);
}

.btn.danger:hover {
  background: #fbd6d0;
  border-color: var(--status-red-text);
}

.icon-btn {
  background: none;
  border: 0;
  padding: 8px;
  font-size: 20px;
  line-height: 1;
  color: var(--text-secondary);
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  color: var(--brand-primary);
  background: var(--bg-subtle);
}

/* ==========================================================================
   Form Controls
   ========================================================================== */

form label, label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--brand-primary);
  margin: 16px 0 6px;
}

input, select, textarea {
  border: 1px solid rgba(44, 64, 1, 0.18);
  background: var(--surface);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  min-height: 42px;
  width: 100%;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:hover, select:hover, textarea:hover {
  border-color: var(--brand-primary-light);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3.5px var(--brand-gold-soft);
}

input[readonly] {
  background: #f1f4ed;
  color: var(--text-secondary);
  border-color: rgba(44, 64, 1, 0.12);
  cursor: default;
}

textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.error {
  font-size: 13px;
  color: var(--status-red-text);
  background: var(--status-red-bg);
  border: 1px solid rgba(184, 58, 40, 0.25);
  border-radius: 7px;
  padding: 9px 13px;
  margin: 12px 0;
  font-weight: 550;
}

.error:empty {
  display: none;
}

/* ==========================================================================
   Login Screen (UI/UX PRO MAX)
   ========================================================================== */

.login-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 100vh;
  background: var(--bg-page);
}

.login-brand {
  background: radial-gradient(circle at 15% 20%, #3a5303 0%, var(--brand-primary) 50%, var(--brand-primary-dark) 100%);
  color: var(--text-inverse);
  padding: 60px 65px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(161, 198, 46, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.login-brand::after {
  content: "";
  position: absolute;
  bottom: -15%;
  left: 10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(168, 125, 19, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.login-brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.brand-badge-text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  font-family: Georgia, serif;
}

.system-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 5px 11px;
  background: rgba(161, 198, 46, 0.2);
  color: var(--brand-lime);
  border: 1px solid rgba(161, 198, 46, 0.4);
  border-radius: 20px;
}

.login-brand-body {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 40px 0;
}

.login-brand-body .eyebrow {
  color: var(--brand-lime);
  font-size: 12px;
  margin-bottom: 14px;
}

.login-brand-body h1 {
  color: #ffffff;
  font-size: clamp(34px, 3.8vw, 54px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-accent {
  color: var(--brand-lime);
  font-style: normal;
}

.hero-desc {
  font-size: 17px;
  line-height: 1.6;
  color: #cdddc5;
  margin-bottom: 30px;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  color: #f1f8ed;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-lime);
  box-shadow: 0 0 8px var(--brand-lime);
}

.login-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #92ab87;
  position: relative;
  z-index: 1;
}

.foot-sep {
  color: var(--brand-gold);
}

.login-form-wrap {
  display: grid;
  place-items: center;
  padding: 45px 35px;
  background: var(--surface);
}

.auth-card {
  max-width: 400px;
  width: 100%;
}

.auth-card-head {
  margin-bottom: 25px;
}

.auth-logo-mobile {
  display: none;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
}

.auth-card-head h2 {
  font-size: 26px;
  color: var(--brand-primary);
  margin: 6px 0 8px;
}

.auth-card-head .muted {
  font-size: 14px;
  margin-bottom: 0;
}

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

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrap input {
  padding-left: 42px;
}

.login-btn {
  margin-top: 20px;
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  font-size: 15px;
  padding: 13px 20px;
}

.login-btn:hover {
  background: var(--brand-primary-light);
  box-shadow: 0 6px 20px rgba(44, 64, 1, 0.28);
}

.arrow-icon {
  font-size: 17px;
  transition: transform var(--transition-fast);
}

.login-btn:hover .arrow-icon {
  transform: translateX(3px);
}

.login-note-box {
  margin-top: 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 9px;
  padding: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.note-icon {
  color: var(--brand-gold);
  font-size: 16px;
  line-height: 1.4;
}

.login-note {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   App Shell & Modern Sidebar
   ========================================================================== */

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: radial-gradient(circle at 10% 10%, #304702 0%, var(--brand-primary) 60%, var(--brand-primary-dark) 100%);
  color: #dbe7d5;
  padding: 24px 18px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 16px rgba(20, 30, 0, 0.15);
  z-index: 10;
}

.sidebar-brand-block {
  margin-bottom: 20px;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: #ffffff;
  line-height: 1.1;
}

.brand-app {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.14em;
  color: var(--brand-lime);
  margin-top: 2px;
}

.workspace {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  margin-bottom: 24px;
}

.workspace-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(161, 198, 46, 0.18);
  border: 1px solid rgba(161, 198, 46, 0.35);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.workspace-mark-tiny {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.workspace-info strong {
  display: block;
  font-size: 13px;
  color: #ffffff;
  font-weight: 650;
}

.workspace-info small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-lime);
  font-size: 11px;
  font-weight: 500;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-lime);
  box-shadow: 0 0 6px var(--brand-lime);
}

.nav-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #92ab87;
  margin: 0 10px 10px;
}

.nav-item {
  border: 0;
  background: none;
  color: #cfdec9;
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border-radius: 8px;
  margin-bottom: 5px;
  text-align: left;
  font-size: 14px;
  font-weight: 550;
  transition: all var(--transition-fast);
}

.nav-item .nav-icon, .nav-item > span:first-child {
  width: 18px;
  font-size: 17px;
  line-height: 1;
  color: #a4be9a;
}

.nav-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-item.active {
  background: var(--brand-lime);
  color: var(--brand-primary-dark);
  font-weight: 750;
  box-shadow: 0 3px 12px rgba(161, 198, 46, 0.35);
}

.nav-item.active .nav-icon, .nav-item.active > span:first-child {
  color: var(--brand-primary-dark);
}

.nav-count {
  margin-left: auto;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 20px;
}

.offline-card {
  border: 1px solid rgba(168, 125, 19, 0.3);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 18px;
  background: rgba(30, 45, 1, 0.6);
  backdrop-filter: blur(6px);
}

.offline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.offline-symbol {
  color: var(--brand-lime);
  font-size: 18px;
}

.offline-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(161, 198, 46, 0.2);
  color: var(--brand-lime);
  border: 1px solid rgba(161, 198, 46, 0.3);
}

.offline-card strong {
  display: block;
  font-size: 13px;
  color: #ffffff;
  font-weight: 650;
}

.offline-card p {
  font-size: 12px;
  color: #b0c7a8;
  margin: 5px 0 0;
  line-height: 1.45;
}

.sidebar-install {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  margin-bottom: 12px;
}

.sidebar-install:hover {
  background: rgba(255, 255, 255, 0.18);
}

.profile {
  display: flex;
  gap: 11px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 0 0;
}

.avatar {
  display: grid;
  place-items: center;
  background: var(--brand-gold);
  color: #ffffff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-weight: 750;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(168, 125, 19, 0.4);
}

.profile-info strong {
  display: block;
  font-size: 13px;
  color: #ffffff;
  font-weight: 650;
}

.profile-info small {
  display: block;
  font-size: 11px;
  color: #9cb593;
}

.logout-btn {
  margin-left: auto;
  color: #a4be9a;
}

.logout-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Main Shell & Topbar
   ========================================================================== */

.main-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding: 0 36px;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 9;
  box-shadow: 0 2px 10px rgba(44, 64, 1, 0.03);
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-secondary);
}

.breadcrumb-sep {
  margin: 0 8px;
  color: var(--text-muted);
}

.breadcrumb strong {
  font-weight: 650;
  color: var(--brand-primary);
}

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

.connection {
  font-size: 12px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 20px;
  background: var(--status-green-bg);
  color: var(--status-green-text);
  border: 1px solid rgba(44, 89, 8, 0.2);
}

.connection::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-lime);
  box-shadow: 0 0 6px var(--brand-lime);
}

.connection.offline {
  background: var(--status-amber-bg);
  color: var(--status-amber-text);
  border-color: rgba(138, 101, 13, 0.25);
}

.connection.offline::before {
  background: var(--brand-gold);
  box-shadow: 0 0 6px var(--brand-gold);
}

.sync-btn {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--brand-primary);
}

.sync-btn:hover {
  background: var(--brand-primary-soft);
  border-color: var(--brand-primary);
}

.banner {
  padding: 12px 36px;
  font-size: 13px;
  font-weight: 550;
  background: var(--status-amber-bg);
  color: var(--status-amber-text);
  border-bottom: 1px solid rgba(138, 101, 13, 0.2);
  display: flex;
  align-items: center;
}

.banner.error {
  background: var(--status-red-bg);
  color: var(--status-red-text);
  border-bottom-color: rgba(184, 58, 40, 0.25);
}

.banner button {
  background: none;
  border: 0;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  margin-left: 10px;
  cursor: pointer;
}

main {
  padding: 32px 36px;
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.page-heading h1 {
  margin-bottom: 4px;
}

.page-heading p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.date-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ==========================================================================
   Stats Banner
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 30px;
  padding: 24px 0;
  box-shadow: var(--shadow-sm);
}

.stat {
  padding: 0 32px;
  border-right: 1px solid var(--border-light);
}

.stat:last-child {
  border-right: none;
}

.stat-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat strong {
  font-size: 34px;
  line-height: 1.1;
  display: inline-block;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--brand-primary);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.stat small {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
  font-weight: 500;
}

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

/* ==========================================================================
   Project Grid & Cards
   ========================================================================== */

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading h2 {
  font-size: 18px;
  margin: 0;
  font-weight: 700;
}

.section-heading span {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.project-card {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  text-align: left;
  color: inherit;
  position: relative;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.project-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.project-card.selected {
  border: 2px solid var(--brand-gold);
  background: linear-gradient(to bottom, #ffffff, #fdfbf7);
  box-shadow: var(--shadow-gold);
}

.project-card.selected::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-lime));
  border-radius: 12px 12px 0 0;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.project-code {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  padding: 4px 8px;
  border-radius: 6px;
}

.chip {
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 9px;
  background: var(--status-green-bg);
  color: var(--status-green-text);
  white-space: nowrap;
}

.project-card h3 {
  font-size: 19px;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--brand-primary);
}

.project-card .subline {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.progress-label strong {
  color: var(--brand-primary);
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

progress {
  appearance: none;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  display: block;
  background: #e6ede0;
}

progress::-webkit-progress-bar {
  background: #e6ede0;
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--brand-gold) 0%, var(--brand-lime) 100%);
  border-radius: 20px;
}

progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--brand-gold) 0%, var(--brand-lime) 100%);
  border-radius: 20px;
}

.project-foot {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.project-foot .selected-label {
  color: var(--brand-gold);
  font-weight: 700;
}

/* ==========================================================================
   Task Panel & Tables
   ========================================================================== */

.task-panel {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.task-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border-light);
  gap: 16px;
  background: #fdfefc;
}

.task-panel-head h2 {
  font-size: 18px;
  margin: 0 0 3px;
}

.task-panel-head p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.filters {
  display: flex;
  gap: 10px;
}

.filters input, .filters select {
  font-size: 13px;
  padding: 8px 12px;
  min-height: 38px;
  max-width: 200px;
}

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

table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}

thead {
  background: var(--bg-subtle);
}

th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 700;
  padding: 13px 26px;
  white-space: nowrap;
}

td {
  padding: 18px 26px;
  border-top: 1px solid var(--border-light);
  font-size: 14px;
  vertical-align: middle;
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: #fbfdf9;
}

.task-name {
  min-width: 250px;
}

.task-name strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: var(--brand-primary);
}

.task-name small {
  font-size: 12px;
  color: var(--text-secondary);
  display: block;
  margin-top: 4px;
}

.task-name .task-code {
  color: var(--brand-gold);
  font-weight: 650;
  margin-right: 6px;
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 13px;
}

.person-circle {
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  font-size: 11px;
  font-weight: 750;
  border: 1px solid rgba(44, 64, 1, 0.12);
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-chip {
  font-size: 11px;
  font-weight: 650;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.role-chip.role-operator {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.role-chip.role-technician {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.role-chip.role-assistant {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.action-btn-group {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.task-progress {
  min-width: 90px;
}

.task-progress span {
  font-size: 12px;
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
}

.status {
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
  background: #edf1ea;
  color: var(--text-secondary);
}

.status.green {
  background: var(--status-green-bg);
  color: var(--status-green-text);
  border: 1px solid rgba(44, 89, 8, 0.2);
}

.status.amber {
  background: var(--status-amber-bg);
  color: var(--status-amber-text);
  border: 1px solid rgba(138, 101, 13, 0.25);
}

.status.red {
  background: var(--status-red-bg);
  color: var(--status-red-text);
  border: 1px solid rgba(184, 58, 40, 0.25);
}

.status.blue {
  background: var(--status-blue-bg);
  color: var(--status-blue-text);
  border: 1px solid rgba(29, 85, 136, 0.25);
}

.task-action {
  text-align: right;
  white-space: nowrap;
}

.task-action .btn {
  font-size: 12px;
  min-height: 33px;
  padding: 7px 12px;
  border-radius: 7px;
}

.table-caption {
  padding: 14px 26px;
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.empty {
  text-align: center;
  padding: 50px 25px;
  color: var(--text-secondary);
}

.empty h3 {
  color: var(--brand-primary);
  margin-bottom: 8px;
}

.empty p {
  font-size: 14px;
  margin: 0;
}

/* ==========================================================================
   Reports View
   ========================================================================== */

.report-list {
  display: grid;
  gap: 16px;
}

.report-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.report-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-primary);
}

.report-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.report-card h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.report-card p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.6;
}

.report-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.report-error {
  margin-top: 12px;
  color: var(--status-red-text);
  font-size: 13px;
  background: var(--status-red-bg);
  padding: 8px 12px;
  border-radius: 6px;
}

.report-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* ==========================================================================
   Employees Grid
   ========================================================================== */

.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

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

.danger {
  color: var(--status-red-text);
}

.employee-roles {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  margin: 20px 0;
  padding: 14px;
  background: var(--bg-subtle);
}

.employee-roles legend {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-primary);
  padding: 0 6px;
}

.employee-roles label {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
  font-size: 14px;
  cursor: pointer;
}

.employee-roles input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--brand-primary);
}

/* ==========================================================================
   Telegram & Settings Views
   ========================================================================== */

.telegram-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 480px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.topic-list {
  border-right: 1px solid var(--border-light);
  padding: 22px 14px;
  background: #fbfdf9;
}

.topic-list h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin: 0 8px 18px;
}

.topic-btn {
  background: none;
  border: 0;
  padding: 12px 14px;
  border-radius: 8px;
  width: 100%;
  text-align: left;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 550;
  transition: all var(--transition-fast);
}

.topic-btn:hover {
  background: var(--bg-subtle);
  color: var(--brand-primary);
}

.topic-btn.active {
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  font-weight: 700;
  border-left: 3px solid var(--brand-primary);
}

.topic-btn small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 3px;
  color: var(--text-muted);
}

.messages {
  background: #f4f7f1;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.message-bubble {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px 12px 12px 2px;
  padding: 20px;
  max-width: 540px;
  box-shadow: var(--shadow-xs);
}

.message-bubble strong {
  color: var(--brand-primary);
  font-size: 13px;
}

.message-bubble pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.65;
  margin: 12px 0;
}

.message-bubble small {
  color: var(--text-muted);
  font-size: 11px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.setting-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 26px;
  box-shadow: var(--shadow-xs);
}

.setting-card h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

.setting-card p, .setting-card li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.setting-card code {
  font-size: 12px;
  background: var(--bg-subtle);
  padding: 3px 6px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.setting-card .status {
  margin-bottom: 15px;
}

.setting-card ul {
  padding-left: 20px;
}

.setting-card label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  cursor: pointer;
}

.setting-card input[type=checkbox] {
  width: 19px;
  height: 19px;
  min-height: 0;
  accent-color: var(--brand-primary);
}

.setting-card.wide {
  grid-column: 1 / -1;
}

.settings-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
}

.settings-table small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
}

.settings-table strong {
  font-size: 14px;
  color: var(--brand-primary);
}

/* ==========================================================================
   Dialogs & Modals (UI/UX PRO MAX — Registered Report Redesign)
   ========================================================================== */

dialog {
  border: 0;
  border-radius: 20px;
  padding: 24px;
  width: min(580px, calc(100% - 24px));
  max-height: 92vh;
  box-shadow: 0 25px 60px -10px rgba(15, 23, 42, 0.35);
  color: var(--text-primary);
  background: #ffffff;
  overflow-y: auto;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}

/* Modal Bottom-Sheet Style for Mobile & Desktop */
#report-dialog.modern-sheet-dialog {
  width: min(480px, calc(100% - 24px));
  border-radius: 28px;
  padding: 16px 22px 24px 22px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 24px 64px -12px rgba(15, 23, 42, 0.28);
}

.sheet-handle {
  width: 44px;
  height: 4.5px;
  background: #cbd5e1;
  border-radius: 9999px;
  margin: 0 auto 14px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dialog-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1e392a;
  text-transform: uppercase;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.eyebrow-icon {
  font-size: 13px;
}

#report-heading {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

.close-dialog-btn {
  font-size: 18px;
  font-weight: 600;
  color: #94a3b8;
  padding: 4px;
  margin-top: 2px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.close-dialog-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.report-task-badge {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  color: #475569;
  margin-bottom: 14px;
}

.report-task-badge:empty {
  display: none;
}

.report-task-badge strong {
  color: #0f172a;
  font-weight: 700;
  display: block;
}

.report-task-badge small {
  color: #64748b;
  font-size: 11px;
  display: block;
  margin-top: 2px;
}

/* --- Card: Estatus Operativo (Paro) --- */
.stoppage-banner-card {
  background: #fefbf2;
  border: 1px solid #fae8b4;
  border-radius: 16px;
  padding: 13px 16px;
  margin-bottom: 16px;
}

.stoppage-banner-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stoppage-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fef3c7;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.stoppage-cloud-icon {
  font-size: 20px;
  color: #d97706;
  line-height: 1;
}

.stoppage-text-block {
  flex: 1;
  min-width: 0;
}

.stoppage-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #b45309;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.stoppage-title {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: #1e293b;
}

/* iOS Style Switch */
.ios-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.ios-slider {
  position: absolute;
  inset: 0;
  background-color: #cbd5e1;
  border-radius: 34px;
  transition: background-color 0.2s ease;
}

.ios-slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.ios-switch input:checked + .ios-slider {
  background-color: #e08a00;
}

.ios-switch input:checked + .ios-slider::before {
  transform: translateX(20px);
}

#stop-reasons {
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: 12px;
  background: #fffdf5;
  padding: 14px;
  margin: 14px 0 0;
}

#stop-reasons legend {
  font-size: 11.5px;
  font-weight: 750;
  color: #b45309;
  padding: 0 6px;
}

.stop-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stop-options label {
  margin: 0;
  position: relative;
}

.stop-options input {
  position: absolute;
  opacity: 0;
  width: 1px;
  min-height: 1px;
  height: 1px;
}

.stop-options span {
  display: block;
  text-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 9px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.stop-options span:hover {
  border-color: #d97706;
  background: #fffcf0;
}

.stop-options input:checked + span {
  color: #ffffff;
  background: #d97706;
  border-color: #d97706;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
}

/* --- Card: Evidencias Fotográficas --- */
.evidence-box-card {
  background: #ffffff;
  border: 1px solid #e8ecf2;
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.box-section-title {
  font-size: 15px;
  font-weight: 750;
  color: #0f172a;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-camera-icon {
  font-size: 16px;
}

.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  padding: 22px 16px;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  user-select: none;
}

.upload-dropzone:hover {
  border-color: #1e392a;
  background: #fbfdf9;
}

.dropzone-camera-badge {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #e8f7ee;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.camera-svg {
  font-size: 22px;
}

.dropzone-label {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: block;
  letter-spacing: -0.01em;
}

.dropzone-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  display: block;
  font-weight: 450;
}

.evidence-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 0 4px;
}

.disclaimer-info-icon {
  font-size: 14px;
  color: #64748b;
  line-height: 1.4;
  flex-shrink: 0;
}

.disclaimer-text {
  font-size: 11.5px;
  line-height: 1.45;
  color: #64748b;
  margin: 0;
}

.disclaimer-text strong {
  color: #1e293b;
  font-weight: 650;
}

/* ==========================================================================
   Modern Photo Preview Gallery
   ========================================================================== */

#photo-status {
  margin: 12px 0 6px;
}

.photo-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px;
}

.photo-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #1e392a;
  background: #e8f7ee;
  border: 1px solid #bcf0cd;
  border-radius: 14px;
  padding: 2px 10px;
}

.photo-status-chip svg {
  color: #16a34a;
}

.photo-status-hint {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
}

#photo-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.photo-preview-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  aspect-ratio: 1 / 1;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  animation: photoIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes photoIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.photo-preview-item:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.09);
}

.photo-preview-thumb {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: zoom-in;
}

.photo-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.22s ease;
}

.photo-preview-item:hover .photo-preview-thumb img {
  transform: scale(1.06);
}

.photo-zoom-hint {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.photo-preview-item:hover .photo-zoom-hint {
  opacity: 1;
}

.photo-index-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 6px;
  padding: 1px 6px;
  pointer-events: none;
  line-height: 1.4;
  z-index: 1;
}

.photo-delete-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  z-index: 2;
}

.photo-delete-badge:hover {
  background: #ef4444;
  border-color: #ef4444;
  transform: scale(1.12);
}

/* --- Form Fields & Pairs --- */
.form-grid-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

.field-wrap {
  margin-bottom: 12px;
}

.field-wrap label, label[for="notes"] {
  font-size: 13px;
  font-weight: 650;
  color: #1e293b;
  margin: 0 0 6px;
  display: block;
}

.input-date-wrap input,
.input-percent-wrap input,
.field-wrap input,
.custom-select-wrap select,
textarea#notes {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  height: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  width: 100%;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-date-wrap input:focus,
.input-percent-wrap input:focus,
.field-wrap input:focus,
.custom-select-wrap select:focus,
textarea#notes:focus {
  border-color: #1e392a;
  box-shadow: 0 0 0 3px rgba(30, 57, 42, 0.12);
}

.input-percent-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-percent-wrap input {
  text-align: right;
  padding-right: 34px;
  font-weight: 700;
  font-size: 15px;
}

.percent-suffix {
  position: absolute;
  right: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  pointer-events: none;
}

.label-with-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.label-with-tag label {
  margin: 0;
}

.badge-erp-status {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #15803d;
  background: #e8f7ed;
  border: 1px solid #bcf0cd;
  border-radius: 6px;
  padding: 2.5px 7px;
  text-transform: uppercase;
}

.input-person-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.person-icon-prefix {
  position: absolute;
  left: 12px;
  font-size: 15px;
  color: #94a3b8;
  pointer-events: none;
}

.input-person-wrap input {
  padding-left: 36px;
  background: #f8fafc;
  font-weight: 650;
  color: #1e293b;
  border-color: #e2e8f0;
  cursor: default;
}

.custom-select-wrap {
  position: relative;
}

.custom-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center / 12px;
  padding-right: 32px;
  font-weight: 550;
}

.footnote-asterisk {
  font-size: 11.5px;
  font-style: italic;
  color: #64748b;
  margin: -4px 0 14px;
  line-height: 1.4;
}

textarea#notes {
  height: auto;
  padding: 12px;
  min-height: 80px;
  line-height: 1.5;
  resize: vertical;
}

/* --- Sticky / Bottom Modal Footer Actions --- */
.modal-footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  position: sticky;
  bottom: -2px;
  background: #ffffff;
  z-index: 5;
}

.btn-action-discard {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  padding: 12px 20px;
  min-width: 105px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-discard:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-action-save {
  flex: 1;
  background: #1c382b;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 750;
  padding: 12px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(28, 56, 43, 0.28);
  transition: all 0.15s ease;
}

.btn-action-save:hover {
  background: #254938;
  box-shadow: 0 6px 18px rgba(28, 56, 43, 0.35);
  transform: translateY(-1px);
}

.btn-action-save:active {
  transform: translateY(0);
}

.check-icon {
  font-size: 14px;
  font-weight: 800;
}

.photo-open {
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  display: block;
  width: 100%;
}

#photo-dialog {
  width: min(1000px, calc(100% - 32px));
}

#full-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-top: 14px;
}

.capture-note {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 10px 0 16px;
}

#author-hint {
  font-weight: 500;
  font-size: 11px;
  color: var(--brand-gold);
  margin-left: 6px;
}

/* ==========================================================================
   Droplist Check (Multi-Select Checkbox Dropdown for Cuadrilla)
   ========================================================================== */

#crew-picker {
  margin: 22px 0;
}

.crew-section-header {
  margin-bottom: 12px;
}

.crew-section-header .section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.crew-count-chip {
  font-size: 11px;
  font-weight: 700;
  color: #1e392a;
  background: #e8f7ee;
  border: 1px solid #bcf0cd;
  border-radius: 20px;
  padding: 2px 10px;
}

.crew-droplist-container {
  position: relative;
  width: 100%;
}

/* Droplist Input Trigger */
.crew-droplist-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
  font-family: inherit;
  box-sizing: border-box;
}

.crew-droplist-trigger:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.crew-droplist-trigger.active,
.crew-droplist-trigger:focus-visible {
  border-color: #1e392a;
  box-shadow: 0 0 0 3px rgba(30, 57, 42, 0.12);
  outline: none;
}

.crew-droplist-trigger-content {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.crew-droplist-trigger-icon {
  color: #64748b;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.crew-droplist-trigger-text {
  font-size: 13.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crew-droplist-trigger-text.has-selection {
  color: #0f172a;
  font-weight: 650;
}

.crew-droplist-trigger-chevron {
  color: #64748b;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.crew-droplist-trigger.active .crew-droplist-trigger-chevron {
  transform: rotate(180deg);
}

/* Droplist Popover Menu */
.crew-droplist-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.16), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: dropAppear 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropAppear {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.crew-droplist-header {
  padding: 10px 12px 8px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crew-droplist-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.crew-droplist-search-icon {
  position: absolute;
  left: 10px;
  color: #94a3b8;
  display: flex;
  pointer-events: none;
}

#crew-droplist-search-input {
  width: 100%;
  height: 35px !important;
  font-size: 13px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 7px !important;
  padding: 0 10px 0 32px !important;
  background: #ffffff !important;
  color: #0f172a !important;
}

#crew-droplist-search-input:focus {
  border-color: #1e392a !important;
  box-shadow: 0 0 0 2px rgba(30, 57, 42, 0.1) !important;
}

.crew-droplist-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.crew-filter-tab {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 550;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
}

.crew-filter-tab:hover {
  background: #f1f5f9;
}

.crew-filter-tab.active {
  background: #1e392a;
  border-color: #1e392a;
  color: #ffffff;
}

/* Droplist Items */
.crew-droplist-list {
  max-height: 250px;
  overflow-y: auto;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.crew-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  transition: background 0.12s;
}

.crew-check-item:hover {
  background: #f1f5f9;
}

.crew-check-item.is-selected {
  background: #edf7f0;
}

.crew-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
  user-select: none;
  min-width: 0;
  margin: 0 !important;
}

.crew-check-input {
  width: 17px !important;
  height: 17px !important;
  min-height: 17px !important;
  accent-color: #1e392a;
  cursor: pointer;
  margin: 0 !important;
  flex-shrink: 0;
}

.crew-item-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.crew-check-item.is-selected .crew-item-avatar {
  background: #bbf0cc;
  color: #14532d;
}

.crew-item-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.crew-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crew-item-sub {
  font-size: 11px;
  color: #64748b;
}

.crew-item-badge {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 2px 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.crew-item-badge.role-operator {
  background: #e0f2fe;
  color: #0369a1;
}

.crew-item-badge.role-technician {
  background: #fef3c7;
  color: #b45309;
}

.crew-item-badge.role-assistant {
  background: #f1f5f9;
  color: #475569;
}

.crew-droplist-empty {
  padding: 18px 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 12.5px;
}

/* Droplist Footer */
.crew-droplist-footer {
  padding: 8px 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.crew-droplist-footer-summary {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.crew-droplist-footer-btns {
  display: flex;
  gap: 8px;
}

/* Selected Pills Tray */
.crew-selected-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.crew-selected-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 3px 8px 3px 4px;
  font-size: 12px;
  font-weight: 550;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  animation: pillAppear 0.15s ease-out;
}

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

.crew-pill-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-size: 9.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.crew-pill-name {
  font-weight: 600;
}

.crew-pill-role {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: 0.03em;
}

.crew-pill-role.role-operator {
  background: #e0f2fe;
  color: #0369a1;
}

.crew-pill-role.role-technician {
  background: #fef3c7;
  color: #b45309;
}

.crew-pill-role.role-assistant {
  background: #f1f5f9;
  color: #475569;
}

.crew-pill-remove {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transition: all 0.12s;
  margin-left: 2px;
}

.crew-pill-remove:hover {
  background: #fee2e2;
  color: #ef4444;
}

.crew-summary {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 15px;
  color: var(--text-secondary);
}

/* Machinery Section */
.machine-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.machine-row .icon-btn {
  margin-bottom: 6px;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-primary);
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(20, 35, 1, 0.35);
  border: 1px solid rgba(161, 198, 46, 0.3);
  font-size: 14px;
  font-weight: 600;
  z-index: 100;
  max-width: calc(100vw - 32px);
}

/* Footer & Tools */
footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 36px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  background: var(--surface);
}

.storage-info {
  font-size: 12px;
  color: var(--text-secondary);
}

.text-link {
  color: var(--brand-gold);
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  padding: 0;
  cursor: pointer;
}

.view-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.view-tools select {
  font-size: 13px;
}

.view-tools .muted {
  font-size: 13px;
  margin-left: auto;
}

.loading {
  padding: 70px;
  text-align: center;
  color: var(--text-secondary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (min-width: 1500px) {
  main {
    padding-top: 40px;
  }
  .task-panel-head {
    padding: 24px 30px;
  }
  .project-card {
    padding: 26px;
  }
}

@media (max-width: 1150px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .sidebar {
    padding: 20px 14px 16px;
  }
  main {
    padding: 28px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .task-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
  td, th {
    padding-left: 18px;
    padding-right: 18px;
  }
  .task-name {
    min-width: 200px;
  }
  .person-column {
    display: none;
  }
  .login-brand {
    padding: 45px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 16px 18px 0;
    display: block;
  }
  .sidebar .brand {
    font-size: 22px;
  }
  .brand-mark-img {
    height: 30px;
    width: 30px;
  }
  .workspace, .nav-label, .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    margin-top: 14px;
    gap: 6px;
  }
  .nav-item {
    font-size: 13px;
    white-space: nowrap;
    width: auto;
    flex-shrink: 0;
    padding: 9px 14px;
    border-radius: 8px 8px 0 0;
    margin: 0;
  }
  .nav-item > span:first-child {
    font-size: 16px;
    width: auto;
  }
  .nav-count {
    display: none;
  }
  .topbar {
    height: 62px;
    padding: 0 18px;
  }
  .breadcrumb {
    font-size: 12px;
  }
  .breadcrumb-sep {
    margin: 0 6px;
  }
  .topbar-actions {
    gap: 10px;
  }
  .connection {
    font-size: 11px;
    padding: 4px 8px;
  }
  .btn.small {
    font-size: 11px;
  }
  .topbar #sync {
    padding: 6px 10px;
  }
  main {
    padding: 24px 18px;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 20px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading p {
    font-size: 13px;
  }
  .date-label {
    display: none;
  }
  .stats {
    padding: 16px 0;
    margin-bottom: 22px;
  }
  .stat {
    padding: 0 14px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat strong {
    font-size: 24px;
  }
  .stat small {
    display: none;
  }
  .project-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 22px;
  }
  .project-card {
    padding: 18px;
  }
  .project-card h3 {
    font-size: 17px;
  }
  .project-meta {
    margin-bottom: 12px;
  }
  .project-card .subline {
    margin-bottom: 16px;
  }
  .project-foot {
    margin-top: 14px;
  }
  .task-panel-head {
    padding: 18px;
  }
  .filters {
    width: 100%;
  }
  .filters input {
    min-width: 0;
    flex: 1;
    max-width: none;
  }
  .filters select {
    max-width: 130px;
  }
  .task-name {
    min-width: 180px;
  }
  .status-column {
    display: none;
  }
  .task-progress {
    min-width: 65px;
  }
  td, th {
    padding: 14px 14px;
  }
  .task-action .btn {
    font-size: 11px;
  }
  .table-caption {
    padding: 12px 14px;
    font-size: 11px;
  }
  .banner {
    padding: 12px 18px;
    font-size: 12px;
  }
  footer {
    padding: 18px;
    font-size: 9px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .setting-card {
    padding: 20px;
  }
  .settings-table {
    grid-template-columns: 1fr;
  }
  .telegram-layout {
    grid-template-columns: 1fr;
  }
  .topic-list {
    border-right: 0;
    border-bottom: 1px solid var(--border-light);
    padding: 16px;
    display: flex;
    overflow-x: auto;
    gap: 8px;
  }
  .topic-list h3 {
    display: none;
  }
  .topic-btn {
    min-width: 160px;
    font-size: 12px;
    margin: 0;
  }
  .messages {
    padding: 18px;
  }
  .message-bubble {
    max-width: 100%;
  }

  /* Mobile Login */
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-brand {
    padding: 30px 24px;
    min-height: auto;
  }
  .login-brand-body {
    margin: 24px 0;
  }
  .login-brand-body h1 {
    font-size: 28px;
    margin-bottom: 12px;
  }
  .hero-desc {
    font-size: 14px;
    margin-bottom: 20px;
  }
  .login-foot {
    display: none;
  }
  .login-form-wrap {
    padding: 32px 20px;
  }
  .auth-logo-mobile {
    display: block;
  }
  .auth-card-head h2 {
    font-size: 24px;
  }
  .report-card {
    padding: 18px;
  }
  .report-meta {
    gap: 10px;
    font-size: 11px;
  }
  .view-tools {
    flex-wrap: wrap;
  }
  .view-tools .muted {
    margin-left: 0;
  }
  .form-grid {
    gap: 10px;
  }
  dialog {
    padding: 22px;
  }
  .crew-grid {
    grid-template-columns: 1fr;
  }
  .employee-grid {
    grid-template-columns: 1fr;
  }
  .machine-row {
    grid-template-columns: 1fr 1fr auto;
  }
  .machine-row > div:first-child {
    grid-column: 1 / -1;
  }
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .photo-grid img {
    height: 110px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .project-card, .nav-item, .chip {
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
  }
  .toast {
    animation: toastAppear 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes toastAppear {
    from {
      opacity: 0;
      transform: translate(-50%, 15px);
    }
    to {
      opacity: 1;
      transform: translate(-50%, 0);
    }
  }
}

/* Monitoreo de integraciones */
.monitor-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin:18px 0}
.monitor-stat{background:var(--surface);border:1px solid var(--border-light);border-radius:14px;padding:18px;border-left:4px solid var(--brand-lime)}
.monitor-stat.warn{border-left-color:var(--brand-gold)}
.monitor-stat.bad{border-left-color:#b83a28}
.monitor-stat small{display:block;color:var(--text-secondary);font-size:11px;font-weight:800;letter-spacing:.06em}
.monitor-stat strong{display:block;font-size:28px;color:var(--brand-primary);margin:6px 0 2px}
.monitor-stat span{color:var(--text-muted);font-size:12px}
.monitor-tools{align-items:center;gap:10px;flex-wrap:wrap}
.monitor-row{display:grid;grid-template-columns:.9fr .8fr 1.4fr .7fr 1fr 1.8fr .8fr;gap:12px;align-items:center;padding:13px 12px;border-bottom:1px solid var(--border-light);font-size:13px;background:var(--surface)}
.monitor-row:last-child{border-bottom:0}
.monitor-row small{display:block;color:var(--text-muted)}
.monitor-row .mono{word-break:break-word}
@media(max-width:900px){.monitor-stats{grid-template-columns:repeat(2,1fr)}.monitor-row{min-width:900px}}
