:root {
  --azul: #1e2945;
  --verde: #587e72;
  --cafe: #9b684f;
  --gris: #dadada;
  --fondo: #f4f6f9;
  --blanco: #ffffff;
  --texto: #1f2937;
  --muted: #6b7280;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--fondo);
  color: var(--texto);
}

.app {
  display: flex;
  min-height: 100vh;
}

/* =========================
SIDEBAR V3
========================= */

.sidebar {

    width: 250px;

    min-height: 100vh;

    background:
        linear-gradient(
            180deg,
            #1e293b 0%,
        #0f172a 100%
        );

    color: white;

    padding: 24px 18px;

    display: flex;

    flex-direction: column;

    box-shadow:
        4px 0 24px rgba(0,0,0,.18);

}


.sidebar-logo {

    text-align: center;

    margin-bottom: 35px;

}


.sidebar-logo h1 {

    font-size: 26px;

    margin: 0;

    font-weight: 800;

    letter-spacing: .5px;

}


.sidebar-logo p {

    margin-top: 6px;

    font-size: 13px;

    opacity: .75;

}


.sidebar ul {

    list-style: none;

    padding: 0;

    margin: 0;

    display: flex;

    flex-direction: column;

    gap: 10px;

}


.sidebar li {

    padding: 14px 16px;

    border-radius: 14px;

    cursor: pointer;

    transition: all .2s ease;

    font-size: 15px;

    font-weight: 600;

    display: flex;

    align-items: center;

    gap: 10px;

}


.sidebar li:hover {

    background:
        rgba(255,255,255,.08);

    transform:
        translateX(3px);

}


.sidebar li.active {

    background:
        rgba(59,130,246,.22)

}


.sidebar-footer {

    margin-top: auto;

    padding-top: 24px;

    font-size: 12px;

    opacity: .7;

    text-align: center;

}

/* TOPBAR */
.topbar {
  background: white;
  border: 1px solid rgba(30, 41, 69, .08);
  border-radius: 18px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(30, 41, 69, .08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topbar label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: bold;
}

#companySelector {
  width: 240px;
  margin: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    position: relative;
}

.alert-pill,
.user-pill {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: bold;
}

.alert-pill {
  background: #fff7ed;
  color: var(--cafe);
}

.user-pill {
  background: #eef2ff;
  color: var(--azul);
}

/* SECCIONES */
.section,
.view,
.config-tab {
  display: none;
}

.section.active,
.view.active,
.config-tab.active {
  display: block;
}

/* CARDS GENERALES */
.card {
  background: var(--blanco);
  border: 1px solid rgba(30, 41, 69, .08);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 0 10px 30px rgba(30, 41, 69, .08);
  overflow: visible !important;
}

/* STATS */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.stat-card {
  background: var(--blanco);
  padding: 22px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(30, 41, 69, .08);
  border: 1px solid rgba(30, 41, 69, .08);
}

.stat-card p {
  font-size: 30px;
  font-weight: bold;
  color: var(--azul);
  margin: 10px 0 0;
}

/* FORMULARIOS GENERALES */
input,
select {
  margin: 6px;
  padding: 12px 14px;
  width: 210px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  outline: none;
  font-size: 14px;
  background: white;
}

input:focus,
select:focus {
  border-color: var(--verde);
  box-shadow: 0 0 0 3px rgba(88, 126, 114, .15);
}

button {
  background: var(--azul);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all .2s ease;
}

button:hover {
  background: var(--cafe);
  transform: translateY(-1px);
}

/* TABLAS GENERALES */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 14px;
  overflow: hidden;
}

th {
  background: var(--azul);
  color: white;
  padding: 14px;
  text-align: left;
  font-size: 14px;
}

td {
  padding: 14px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

tbody tr:nth-child(even) {
  background: #f8fafc;
}

tbody tr:hover {
  background: rgba(88, 126, 114, .12);
}

/* TABLA COMPACTA */
.compact-table th,
.compact-table td {
  padding: 8px 10px;
  font-size: 13px;
}

.compact-table th {
  font-size: 12px;
  letter-spacing: 0.3px;
}

/* BOTONES ICONO GENERALES */
.icon-btn {
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  font-size: 16px;
  border-radius: 6px;
  transition: all .15s ease;
}

.icon-btn:hover {
  background: rgba(0,0,0,0.05);
  transform: scale(1.1);
}

.icon-open { color: var(--azul); }
.icon-pdf { color: var(--verde); }
.icon-delete { color: #c0392b; }
.icon-convert { color: var(--cafe); }

/* CALENDARIO */
#calendar {
  margin-top: 8px;
  width: 100%;
  min-height: 680px;
  background: white;
  border-radius: 14px;
  padding: 12px;
  box-sizing: border-box;
  overflow: hidden;
}

.fc {
  width: 100%;
  background: white;
  border-radius: 14px;
}

.fc-header-toolbar {
  margin-bottom: 22px !important;
}

.fc-view-harness {
  min-height: 580px !important;
}

.fc .fc-col-header-cell {
  background-color: var(--azul) !important;
}

.fc .fc-col-header-cell-cushion {
  color: white !important;
  font-weight: bold;
}

.fc .fc-button-primary {
  background: var(--azul) !important;
  border: none !important;
  border-radius: 10px !important;
}

.fc .fc-button-primary:hover {
  background: var(--cafe) !important;
}

.fc-block {
  font-weight: 600;
  border: 2px solid rgba(0,0,0,.15);
}


/* LEYENDA CALENDARIO */
.legend {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.legend span {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}

.color-box {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  border-radius: 4px;
}

.boda { background: var(--cafe); }
.corporativo { background: var(--azul); }
.social { background: var(--verde); }
.otro { background: var(--gris); }

.filter-box {
  margin-bottom: 16px;
}

.filter-box label {
  font-weight: bold;
  color: var(--azul);
  margin-right: 8px;
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  inset: 0;
  background: rgba(0,0,0,0.45);
  animation: fadeIn 0.2s ease-in;
}

.modal-content {
  background: white;
  width: 420px;
  margin: 8% auto;
  padding: 26px;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
  animation: slideDown 0.2s ease;
}

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

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

/* RESPONSIVE */
@media (max-width: 900px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
    position: relative;
  }

  .main {
    padding: 20px;
  }

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

  input,
  select {
    width: 100%;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  #companySelector {
    width: 100%;
  }
}

.experience-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  background: #fff;
  border: 1px solid #e3e6ee;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 10px;
  overflow: visible !important;
  position: relative;
  z-index: 1;
}

.experience-info {
  flex: 1;
}

.experience-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.experience-info p {
  margin: 8px 0;
  color: #666;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-line;
}

.experience-info small {
  font-weight: 700;
  color: var(--azul);
}

.exp-active {
  color: green;
  font-size: 12px;
  font-weight: 700;
}

.exp-inactive {
  color: red;
  font-size: 12px;
  font-weight: 700;
}

.experience-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.experience-actions button {
  width: 44px;
  height: 36px;
  padding: 0;
  margin: 0;
}

.commercial-tab-content {
  display: none;
}

.commercial-tab-content.active {
  display: block;
}

.agenda-task-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #dadada;
}

.agenda-task-left {
  display: flex;
  align-items: center;
  justify-content: center;
}

.agenda-complete-btn {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

.agenda-task-content {
  flex: 1;
}

.agenda-task-actions {
  display: flex;
  gap: 8px;
}

.completed {
  opacity: .65;
}

.completed-text {
  text-decoration: line-through;
}

.agenda-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.agenda-filters button {
  border: none;
  background: #1e2945;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.dashboard-section {
  background: white;
  padding: 18px;
  border-radius: 14px;
  margin-bottom: 22px;
  border: 1px solid #dadada;
}

.alerts-list {
  display: grid;
  gap: 12px;
}

.alert-card {
  padding: 14px;
  border-radius: 12px;
  border-left: 6px solid #1e2945;
  background: #f8f8f8;
}

.priority-urgente {
  border-left-color: #b00020;
}

.priority-alta {
  border-left-color: #9b684f;
}

.priority-media {
  border-left-color: #587e72;
}

.priority-baja {
  border-left-color: #dadada;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 20px;
  align-items: start;
  margin-top: 20px;
}

.dashboard-calendar-card,
.dashboard-alerts-card {
  background: white;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #dadada;
}

.dashboard-alerts-card {
  position: sticky;
  top: 20px;
}

#dashboardCalendar {
  min-height: 620px;
}

@media (max-width: 1100px) {
  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-alerts-card {
    position: static;
  }
}

.dashboard-calendar-full {
  margin-top: 24px;
}

.dashboard-calendar-card {
  background: white;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #dadada;
}

#dashboardCalendar {
  min-height: 720px;
}

.alert-pill {
  cursor: pointer;
  position: relative;
}

/* =========================
ALERTAS DROPDOWN
========================= */

.alerts-dropdown {
  display: none;

  position: absolute;

  top: 72px;
  right: 140px;

  width: 320px;
  max-height: 380px;

  overflow-y: auto;

  background: white;

  border: 1px solid #e5e7eb;

  border-radius: 14px;

  padding: 12px;

  box-shadow: 0 12px 30px rgba(0,0,0,.12);

  z-index: 9999;
}

.alerts-dropdown.show {
  display: block;
}

.alerts-dropdown h3 {
  font-size: 14px;
  margin-bottom: 12px;
  color: #1e2945;
}

/* =========================
CARD ALERTA
========================= */

.dropdown-alert {
  padding: 10px 12px;

  border-radius: 10px;

  background: #f8fafc;

  margin-bottom: 8px;

  border-left: 4px solid #1e2945;
}

.dropdown-alert strong {
  display: block;

  font-size: 13px;

  margin-bottom: 4px;

  color: #1e2945;
}

.dropdown-alert small {
  display: block;

  font-size: 11px;

  color: #6b7280;

  line-height: 1.4;
}

.dropdown-alert p {
  margin: 0;

  font-size: 12px;

  line-height: 1.4;
}

/* =========================
PRIORIDADES
========================= */

.priority-urgente {
  border-left-color: #b00020;
}

.priority-alta {
  border-left-color: #9b684f;
}

.priority-media {
  border-left-color: #587e72;
}

.priority-baja {
  border-left-color: #d1d5db;
}

/* =========================
PIPELINE
========================= */

.pipeline-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 10px 0;
}

.pipeline-column {
  min-width: 280px;
  background: #f4f6f9;
  border-radius: 12px;
  padding: 12px;
  flex-shrink: 0;
}

.pipeline-column-header {
  background: white;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);

  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pipeline-column-header span {
  font-weight: 700;
  font-size: 14px;
}

.pipeline-column-header strong {
  font-size: 24px;
}

.pipeline-column-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pipeline-mini-card {
  background: white;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);

  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pipeline-mini-card strong {
  font-size: 15px;
  color: #1e2945;
}

.pipeline-mini-card span {
  font-size: 14px;
}

.pipeline-mini-card small {
  display: block;
  color: #666;
}

.pipeline-date {
  display: block;
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
  margin-top: 2px;
}

.pipeline-mini-card select {
  margin-top: 8px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #dadada;
  background: white;
}

.pipeline-empty {
  background: white;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  color: #888;
}

/* =========================
STATUS COLORS
========================= */

.status-border-draft {
  border-left: 5px solid #6c757d;
}

.status-border-sent {
  border-left: 5px solid #0d6efd;
}

.status-border-pending {
  border-left: 5px solid #ffc107;
}

.status-border-reserved {
  border-left: 5px solid #fd7e14;
}

.status-border-approved {
  border-left: 5px solid #198754;
}

.status-border-rejected {
  border-left: 5px solid #dc3545;
}

.clients-toolbar {
  margin-bottom: 16px;
}

.clients-toolbar input {
  width: 100%;
  max-width: 520px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.clients-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.client-card {
  background: white;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.client-card h3 {
  margin: 0 0 10px 0;
  font-size: 15px;
}

.client-card p {
  margin: 3px 0;
  font-size: 13px;
  line-height: 1.25;
}

.client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.client-actions button {
  border: none;
  background: #1e3a5f;
  color: white;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.client-actions .danger-btn {
  background: #1e3a5f
}

.config-section {
  background: white;
  padding: 20px;
  border-radius: 14px;
  margin-top: 20px;
}

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

.config-add-row {
  display: flex;
  gap: 10px;
}

.config-add-row input {
  padding: 10px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  min-width: 240px;
}

.config-add-row button {
  background: #111827;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
}

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

.config-card {
  background: #f9fafb;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.config-card h4 {
  margin: 0;
  font-size: 15px;
}

.danger-btn {
  background: #111827;
  color: white;
  border: none;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: .2s;
}

.danger-btn:hover {
  background: #1f2937;
  transform: translateY(-1px);
}



.config-list-item:hover {
  background: #f9fafb;
  transform: translateY(-1px);
}

#venuesList {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

#venuesList .config-list-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  transition: .2s;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

#venuesList .config-list-item:hover {
  background: #f9fafb;
  transform: translateY(-1px);
}

#venuesList strong {
  font-size: 15px;
  color: #111827;
}

#venuesList small {
  color: #6b7280;
  font-size: 12px;
}

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

.edit-btn {
  background: #1e3a5f;
  color: white;
  border: none;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.edit-btn:hover {
  background: #1e3a5f;
}

.search-input {
  width: 100%;
  max-width: 520px;
  padding: 11px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  margin: 12px 0 18px;
  font-size: 14px;
}

.search-input:focus {
  outline: none;
  border-color: #1e2945;
  box-shadow: 0 0 0 3px rgba(30, 41, 69, .08);
}

#mainApp {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* =========================
LOGIN SCREEN
========================= */

#loginScreen {

    width: 100%;
    height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    background: #f4f5f9;

}

.login-box {

    width: 420px;

    background: white;

    padding: 40px;

    border-radius: 18px;

    box-shadow:
        0 10px 35px rgba(0,0,0,0.08);

    display: flex;
    flex-direction: column;

    gap: 18px;

}

.login-box h1 {

    margin: 0;

    text-align: center;

    font-size: 42px;

    color: #1d2951;

}

.login-box p {

    text-align: center;

    color: #666;

    margin-top: -8px;

}

.login-box input {

    padding: 14px;

    border-radius: 12px;

    border: 1px solid #DDD;

    font-size: 15px;

}

.login-box button {

    height: 48px;

    border: none;

    border-radius: 12px;

    background: #1d2951;

    color: white;

    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;

}

.login-box button:hover {

    opacity: 0.92;

}

.client-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 6px;
}

.client-status-lead {
  background: #fff4db;
  color: #9a6700;
}

.client-status-active {
  background: #dcfce7;
  color: #166534;
}

.app-version {

  display: block;

  margin-top: 4px;

  font-size: 11px;

  opacity: 0.65;

  letter-spacing: 1px;

}

/* =========================
SIDEBAR V3
========================= */

.sidebar {

    width: 250px;

    min-height: 100vh;

    background:
        linear-gradient(
            180deg,
            #1e293b 0%,
            #0f172a 100%
        );

    border-right:
        1px solid rgba(255,255,255,.06);

    color: #e2e8f0;

    padding: 24px 18px;

    display: flex;

    flex-direction: column;

    box-shadow:
        4px 0 24px rgba(0,0,0,.18);

}


.sidebar-brand {

    text-align: center;

    margin-bottom: 35px;

}


.sidebar-brand h2 {

    font-size: 24px;

    margin: 0;

    font-weight: 800;

    letter-spacing: .5px;

    color: white;

}


.app-version {

    display: inline-block;

    margin-top: 6px;

    font-size: 12px;

    opacity: .6;

}


.sidebar ul {

    list-style: none;

    padding: 0;

    margin: 0;

    display: flex;

    flex-direction: column;

    gap: 10px;

}


.sidebar li {

    padding: 14px 16px;

    border-radius: 14px;

    cursor: pointer;

    transition: all .2s ease;

    font-size: 15px;

    font-weight: 600;

    display: flex;

    align-items: center;

    gap: 10px;

    color: #e2e8f0;

}


.sidebar li:hover {

    background:
        rgba(59,130,246,.16);

    backdrop-filter:
        blur(8px);

    transform:
        translateX(3px);

}


.sidebar li.active {

    background:
        rgba(59,130,246,.22);

}


.sidebar-footer {

    margin-top: auto;

    padding-top: 24px;

    font-size: 12px;

    opacity: .45;

    text-align: center;

}

/* =========================
MAIN CONTENT FIX
========================= */

#mainApp {

    display: flex;

    min-height: 100vh;

}

.main-content {

    flex: 1;

    width: 100%;

    padding: 24px;

    overflow-x: auto;

}

#mainApp {
  display: flex !important;
  width: 100%;
  min-height: 100vh;
}

.sidebar {
  flex: 0 0 250px;
}

#mainContent,
.content,
.main,
main {
  flex: 1;
  width: calc(100% - 250px);
  min-width: 0;
}

/* =========================
DASHBOARD V3 OVERRIDE
========================= */

.dashboard-card,
.metric-card,
.kpi-card,
.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.dashboard-card h3,
.metric-card h3,
.kpi-card h3,
.card h3 {
  margin-top: 0;
  color: #0f172a;
}

.dashboard-grid,
.metrics-grid,
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.badge,
.status-badge,
.quote-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}


/* =========================
   AGENDA CALENDAR FIX
========================= */

#agendaCalendar {

    min-height: 650px;

    margin-top: 16px;

    margin-bottom: 24px;

}

/* =========================
   AGENDA QUOTE LINK
========================= */

#agendaQuoteContainer {

    margin-top: 10px;

}

/* =========================
   CONFIG LIST ROWS
========================= */

.config-list-row {

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 12px 14px;
    margin-bottom: 10px;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    background: #ffffff;

}

.config-list-actions {

    display: flex;
    gap: 8px;

}

/* =========================
   EVENT TYPES LIST FIX
========================= */

#eventTypesList {

    display: flex !important;

    flex-direction: column !important;

    gap: 10px;

}

#eventTypesList .config-list-row {

    width: 100%;

    display: flex;

    justify-content: space-between;

    align-items: center;

}

#eventTypesList .config-list-actions {

    display: flex;

    gap: 8px;

}

.config-tab-btn {
    background: #111827;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.config-tab-btn:hover {
    background: #1f2937;
    transform: translateY(-1px);
}

.sat-catalog-card {
  display: grid;
  grid-template-columns: 70px 1fr 40px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid #dbe3f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.sat-catalog-key {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 10px;
  background: #eef5ff;
  color: #005baa;
  font-weight: 800;
}

.sat-catalog-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sat-catalog-info strong {
  color: #0f172a;
  font-size: 14px;
}

.sat-catalog-info span {
  color: #64748b;
  font-size: 12px;
}

.sat-catalog-star {
  text-align: right;
}


.license-pill {
    background: #edf7ff;
    color: #006099;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
}

.license-dropdown {
    display: none;
    position: absolute;
    top: 38px;
    right: 0;
    width: 230px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .14);
    z-index: 9999;
    font-size: 12px;
    color: #0f172a;
}

.license-dropdown.show {
    display: block;
}

.license-dropdown h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 800;
}

.license-dropdown p {
    margin: 7px 0;
    font-size: 12px;
    line-height: 1.35;
}

.license-dropdown strong {
    font-weight: 800;
}

.master-pill {

    background: #fff7d6 !important;

    color: #9a6700 !important;

    font-weight: 700;

}

.login-logo-shell {

    width: 170px;

    height: 170px;

    margin: 0 auto 28px auto;

    background: #ffffff;

    border-radius: 24px;

    display: flex;

    align-items: center;

    justify-content: center;

    box-shadow: 0 12px 30px rgba(15,23,42,.08);

}

.login-logo {

    width: 145px;

    display: block;

}

.forgot-password-link {

    margin-top: 18px;

    text-align: center;

}

.forgot-password-link a {

    color: #475569;

    font-size: 12px;

    text-decoration: none;

}

.forgot-password-link a:hover {

    color: #1e2945;

}

#mainApp.app-hidden {
    display: none !important;
}

#mainApp.app-visible {
    display: flex !important;
}

.login-screen {

    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding-bottom: 80px;

    background: #f4f6fb;

}

.login-card {

    display: flex;

    flex-direction: column;

    align-items: center;

}

.user-menu-wrapper {

    position: relative;

    display: inline-flex;

    align-items: center;

}

.user-menu-dropdown {

    display: none;

    position: absolute;

    top: 38px;

    right: 0;

    width: 170px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    padding: 8px;

    box-shadow: 0 14px 35px rgba(15, 23, 42, .14);

    z-index: 9999;

}

.user-menu-dropdown.show {

    display: block;

}

.user-menu-dropdown button {

    width: 100%;

    border: none;

    background: transparent;

    padding: 10px 12px;

    border-radius: 10px;

    text-align: left;

    font-size: 13px;

    color: #334155;

    cursor: pointer;

}

.user-menu-dropdown button:hover {

    background: #f1f5f9;

}

/* =========================
SIDEBAR COLLAPSIBLE
========================= */

.sidebar-toggle-btn {

    width: 36px;
    height: 36px;

    margin: 0 auto 18px auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: rgba(255,255,255,.12);

    color: white;

    border: none;

    cursor: pointer;

    font-size: 18px;

}

.sidebar-toggle-btn:hover {

    background: rgba(255,255,255,.20);

}

.sidebar {

    transition:
        width .25s ease,
        flex-basis .25s ease;

}

.main {

    transition:
        width .25s ease;

}

body.sidebar-collapsed .sidebar {

    width: 70px;

    flex-basis: 70px;

    padding-left: 8px;
    padding-right: 8px;

}

body.sidebar-collapsed .main {

    width: calc(100% - 70px);

}

body.sidebar-collapsed .sidebar-brand h2,
body.sidebar-collapsed .app-version,
body.sidebar-collapsed .sidebar-footer {

    display: none;

}

body.sidebar-collapsed .sidebar li {
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0 auto;
    overflow: visible;
    white-space: nowrap;
    font-size: 0;
    position: relative;
}

body.sidebar-collapsed .sidebar li::before {
    font-size: 18px;
}

body.sidebar-collapsed #menuDashboard::before {
    content: "📊";
}

body.sidebar-collapsed #menuCommercialBtn::before {
    content: "🧾";
}

body.sidebar-collapsed #menuOperationsBtn::before {
    content: "🛠️";
}

body.sidebar-collapsed #menuFinanceBtn::before {
    content: "💰";
}

body.sidebar-collapsed #menuProductsBtn::before {
    content: "📦";
}

body.sidebar-collapsed #menuConfigBtn::before {
    content: "⚙️";
}

body.sidebar-collapsed #menuControlCenterBtn::before {
    content: "🧠";
}

body.sidebar-collapsed .sidebar li {
    position: relative;
}

body.sidebar-collapsed .sidebar li:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 58px;
    top: 50%;
    transform: translateY(-50%);
    background: #0f172a;
    color: white;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    z-index: 99999;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .22);
}

/* ==========================================
   CRM GRID — CATÁLOGOS
========================================== */

.crm-grid-wrapper {
    width: 100%;
    margin-top: 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

.crm-grid-header,
.crm-grid-row {
    display: grid;
    grid-template-columns: 80px 1fr 160px;
    align-items: center;
    gap: 12px;
}

.crm-grid-header {
    background: #f8fafc;
    font-weight: 800;
    color: #0f172a;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.crm-grid-row {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
}

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

.crm-grid-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.crm-grid-actions button {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 9px;
}

.crm-grid-counter {
    margin: 12px 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.events-crm-grid {
    overflow-x: auto;
}

.events-filter-bar {
    display: flex;
    justify-content: flex-end;
    margin: 12px 0;
}

.events-filter-bar button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-weight: 800;
    cursor: pointer;
}

.events-grid-header,
.events-grid-row {
    min-width: 1280px;
    grid-template-columns:
        1.4fr
        120px
        1.2fr
        120px
        1fr
        120px
        140px
        140px
        140px
        90px;
}

.events-grid-header > div {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 42px;
    background: transparent;
    cursor: default;
}

.events-grid-header > div[onclick] {
    cursor: pointer;
}

.events-sort-indicator {
    display: inline-flex;
    align-items: center;
    min-width: 14px;
    color: #64748b;
    font-weight: 800;
}

.events-grid-row small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}

.events-status-select {
    width: 100%;
    min-height: 32px;
    padding: 4px 8px;
    font-size: 12px;
}

.event-archived-row {
    background: #f8fafc;
    color: #64748b;
}

.events-grid-actions {
    justify-content: flex-start;
}

.lead-sources-grid-header,
.lead-sources-grid-row {
    grid-template-columns: 1fr 140px;
}
