.btn-add-card {
  background-color: #0971CE;
  color: #fff;
  border: none;
  padding: 8px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease;
}

.btn-add-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
/* ===================== */
/* Cards Container       */
/* ===================== */

.cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 20px;
  margin-bottom: 80px; /* suficiente para que los cards queden encima de la barra inferior */
  justify-content: center;
}

.card-item {
  position: relative;
  width: 300px;
  height: 180px;
  border-radius: 15px;
  color: white;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  overflow: hidden;
}

.card-item::before {
  content: "";
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  top: -100px;
  left: 50px;
  z-index: 0;
}

.card-item > * {
  position: relative;
  z-index: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-size: 14px;
}

.card-number {
  font-size: 20px;
  letter-spacing: 2px;
  text-align: center;
  margin: 10px 0;
}

.card-note,
.created-at {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.actions button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 18px;
}

/* Card Colors */
.emisor-bpa { background: linear-gradient(45deg,#015F62,#0AAAAF); }
.emisor-bandec { background: linear-gradient(45deg,#A00000,#C10A0A); }
.emisor-clasica { background: linear-gradient(45deg,#5086E8,#70C4FF); }
.emisor-bandec-prepago { background: linear-gradient(45deg,#4099D5,#28A354); }
.emisor-metropolitano { background: linear-gradient(45deg,#64D501,#99DE66); }

/* ===================== */
/* Modal                 */
/* ===================== */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  box-sizing: border-box;
}

.modal-content {
  background-color: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  padding: 25px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  box-sizing: border-box;
}

.modal-content h2 {
  margin: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #222;
}

.input-group {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
}

.input-group i {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #666;
  font-size: 16px;
}

.modal-content input,
.modal-content select {
  width: 100%;
  padding: 10px 12px 10px 35px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  box-sizing: border-box;
}

.modal-content input:focus,
.modal-content select:focus {
  outline: none;
  border-color: #0971CE;
  box-shadow: 0 0 5px rgba(9,113,206,0.4);
}

.modal-content button {
  margin-top: 15px;
  background-color: #0971CE;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.modal-content button:hover {
  background-color: #065cb0;
  transform: scale(1.02);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #0971CE;
}

/* ===================== */
/* Media Queries         */
/* ===================== */
@media (max-width: 600px) {
  .cards-container {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 10px;
  }

  .card-item {
    width: 80%;
    max-width: 400px;
  }
}

@media (max-width: 500px) {
  .modal-content {
    width: 100%;
    max-width: 95%;
    padding: 20px 15px;
  }

  .modal {
    padding: 5px;
  }
}

@media (min-width: 1024px) {
  /* Ajustar contenido principal */
  .main-content {
    margin-right: 250px; /* igual al ancho del drawer */
    position: relative;
    z-index: 1;           /* sobre fondo pero debajo de drawer */
  }

  /* Ajustar header de tarjetas */
  .cards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    z-index: 2; /* asegurar que est谷 encima de drawer */
    position: relative;
  }

  /* Bot車n agregar tarjeta */
  #btnAddCard {
    z-index: 2;
    position: relative; /* no absoluto */
  }
}

/* ======================== */
/*        MODO OSCURO       */
/* ======================== */

/* Fondo general */
body.dark-mode {
  background: #021923;
  color: #FFFFFF;
}

/* Topbar */
body.dark-mode .topbar {
  background: #042738;
  color: #FFFFFF;
}

/* Drawer Menu */
body.dark-mode .drawer-menu {
  background: #042433;
}

body.dark-mode .drawer-menu .close-btn {
  color: #FFFFFF;
}

body.dark-mode .drawer-menu li {
  color: #FFFFFF;
}

body.dark-mode .drawer-menu li:hover {
  background: #021923;
}

/* Cards Container */
body.dark-mode .cards-container {
  background: transparent;
}

body.dark-mode .card-item {
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

body.dark-mode .card-item::before {
  background: rgba(255,255,255,0.1);
}

/* Botones dentro de cards */
body.dark-mode .btn-add-card {
  background-color: #0971CE;
  color: #FFFFFF;
}

/* Modal */
body.dark-mode .modal {
  background-color: rgba(0,0,0,0.7);
}

body.dark-mode .modal-content {
  background-color: #042738;
  color: #FFFFFF;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
}

body.dark-mode .modal-content h2 {
  color: #FFFFFF;
}

body.dark-mode .modal-content input,
body.dark-mode .modal-content select {
  background: #021923;
  color: #FFFFFF;
  border: 1px solid #555;
}

body.dark-mode .modal-content input:focus,
body.dark-mode .modal-content select:focus {
  border-color: #0971CE;
  box-shadow: 0 0 5px rgba(9,113,206,0.6);
}

body.dark-mode .modal-content button {
  background-color: #0971CE;
  color: #FFFFFF;
}

body.dark-mode .modal-content button:hover {
  background-color: #065cb0;
}

body.dark-mode .modal-close {
  color: #FFFFFF;
}

/* Toast */
body.dark-mode .custom-toast {
  background: #042433;
  color: #FFFFFF;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.05);
}

body.dark-mode .custom-toast .custom-toast-content {
  color: #FFFFFF;
}

/* Mantener colores de tipo */
body.dark-mode .toast-success i { color: #28A745; }
body.dark-mode .toast-error i { color: #FF4C4C; }
body.dark-mode .toast-warning i { color: #FFA500; }

/* Bottom Navigation */
body.dark-mode .bottom-nav {
  background: #042738;
}

body.dark-mode .bottom-nav button {
  color: #FFFFFF;
}

body.dark-mode .bottom-nav button:hover {
  color: #97c0ff;
}
