* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background: #0b1220;
  color: #e5e7eb;
  min-height: 100vh;
}

a {
  color: #60a5fa;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 35%),
    linear-gradient(135deg, #0b1220, #111827 60%, #0f172a);
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 430px;
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 34px 30px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}

.login-box h1 {
  font-size: 34px;
  color: #60a5fa;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.login-box p {
  color: #94a3b8;
  margin-bottom: 18px;
}

.small-text {
  margin-top: 18px;
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
}

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

label {
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: -6px;
}

input,
textarea,
select {
  width: 100%;
  padding: 14px 15px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #fff;
  outline: none;
  transition: 0.2s ease;
  font-size: 15px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button,
.btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  opacity: 0.96;
  text-decoration: none;
}

.btn-dark {
  background: #1e293b;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  background: rgba(17, 24, 39, 0.96);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar h1 {
  font-size: 26px;
  margin-bottom: 4px;
}

.topbar span {
  color: #94a3b8;
  font-size: 14px;
}

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

.container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px 30px;
}

.card {
  background: rgba(17, 24, 39, 0.97);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.22);
}

.card h2,
.card h3 {
  margin-bottom: 12px;
}

.form-card {
  max-width: 760px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

th {
  color: #cbd5e1;
  font-size: 14px;
  background: rgba(255,255,255,0.02);
}

td {
  color: #e5e7eb;
  font-size: 14px;
}

.badge {
  display: inline-block;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}

.status-abierto {
  background: rgba(37, 99, 235, 0.22);
  color: #93c5fd;
}

.status-en-progreso {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
}

.status-cerrado {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
}

.priority-baja {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

.priority-media {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}

.priority-alta {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
}

.priority-critica {
  background: rgba(127, 29, 29, 0.45);
  color: #fecaca;
}

.grid-two {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.ticket-meta {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  color: #cbd5e1;
}

.inline-form {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.inline-form select {
  max-width: 220px;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0;
  max-height: 430px;
  overflow-y: auto;
  padding-right: 4px;
}

.message-item {
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 14px;
  border-radius: 14px;
}

.message-item strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
}

.message-item span {
  font-size: 12px;
  color: #94a3b8;
}

.message-item p {
  margin-top: 10px;
  line-height: 1.6;
  color: #e5e7eb;
}

.reply-form {
  margin-top: 10px;
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 15px;
  font-size: 14px;
}

.alert.error {
  background: rgba(127, 29, 29, 0.5);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.alert.success {
  background: rgba(20, 83, 45, 0.5);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

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

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

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .btn {
    flex: 1;
  }
}

@media (max-width: 600px) {
  .login-box {
    padding: 26px 20px;
  }

  .topbar {
    padding: 18px 16px;
  }

  .container {
    padding: 0 14px 24px;
    margin-top: 20px;
  }

  .card {
    padding: 18px;
  }

  .topbar h1 {
    font-size: 22px;
  }
}