:root {
  --primary: #769ac9;
  --accent: #96c0f0;
  --bg: #f0f4f3;
  --white: #ffffff;
  --danger: #ec832c;
  --warning: #f1c40f;
  --success: #27ae60;
  --critico: #fa0e0e;
  --low: #72a4e6;
  --text-main: #2c3e50;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Segoe UI", sans-serif;
  background-color: var(--bg);
  margin: 0;
  color: var(--text-main);
}

/* Logo*/
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
img {
  width: 100px;
}
.logo a:active img {
  transform: scale(0.95);
}
/* Navbar */
.navbar {
  background: var(--primary);
  color: white;
  padding: 0 2rem;
  min-height: 60px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-links {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #383b3d;
  text-decoration: none;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 60px;
  font-weight: 600;
}

.nav-links a.active {
  background: #c4dbf1;
  color: var(--primary);
  border-radius: 15px;
}

/* Container */
.app-container {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 20px;
}

.seccion-contenido {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Formulario*/
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.field-full {
  grid-column: span 3;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  font-size: 0.85rem;
  color: #7f8c8d;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px;
  border: 2px solid #edf2f1;
  border-radius: 8px;
  box-sizing: border-box;
}

button#btnCrear {
  grid-column: span 3;
  background: var(--primary);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

/* Ticket */
.ticket {
  background: white;
  border: 1px solid #eee;
  border-left: 8px solid #ccc;
  padding: 15px 20px;
  margin-bottom: 12px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ticket.critico {
  border-left-color: var(--critico);
}
.ticket.alto {
  border-left-color: var(--danger);
}
.ticket.medio {
  border-left-color: var(--warning);
}
.ticket.bajo {
  border-left-color: var(--low);
}

.ticket.resuelto {
  background: #f8faf9;
  opacity: 0.6;
  border-left-color: var(--success) !important;
}

/* Botone */
.btn-action {
  height: 34px;
  padding: 0 15px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  border-radius: 6px;
  border: none;
  background: var(--accent);
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.ticket-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.btn-delete {
  background: #fff5f5;
  color: #e74c3c;
  border: 1px solid #ffcccc;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.btn-delete:hover {
  background: #e74c3c;
  color: white;
}

/* Buscador */
.search-bar {
  width: 100%;
  margin-bottom: 20px;
  border: 2px solid var(--accent);
  padding: 12px;
  border-radius: 8px;
}

/* Modal*/
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background: white;
  margin: 5vh auto;
  width: 95%;
  max-width: 550px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
}

.modal-header {
  background: var(--primary);
  color: white;
  padding: 15px 25px;
  display: flex;
  justify-content: space-between;
}

.modal-body {
  padding: 20px 25px;
  overflow-y: auto;
  flex-grow: 1;
}

.modal-footer {
  background: #f1f1f1;
  padding: 15px 25px;
  display: flex;
  justify-content: space-between;
}

/* Metricas */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.stat-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #eee;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  margin: 10px 0;
  color: var(--primary);
}

/* Media Q */
@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 1rem;
  }

  .nav-links {
    width: 100%;
    justify-content: space-around;
    margin-top: 5px;
  }

  .nav-links a {
    height: auto;
    padding: 10px;
    font-size: 13px;
  }

  .app-container {
    margin: 15px auto;
    padding: 0 10px;
  }

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

  .field-full {
    grid-column: span 1;
  }

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

  .ticket {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .ticket-actions {
    width: 100%;
    justify-content: space-between;
  }
}
