* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f2f4f7;
  color: #1a1a1a;
}

header.topbar {
  background: #1e293b;
  color: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.topbar-logo {
  height: 32px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  margin-right: auto;
}

header.topbar nav a {
  color: #cbd5e1;
  text-decoration: none;
  margin-right: 20px;
  font-weight: 600;
}

header.topbar nav a:hover,
header.topbar nav a.active {
  color: #fff;
}

header.topbar button {
  background: transparent;
  border: 1px solid #64748b;
  color: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
}

main {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}

.panel {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.filters .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filters label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

input, select, textarea {
  padding: 8px 10px;
  border: 1px solid #ccd0d5;
  border-radius: 6px;
  font-size: 0.95rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

th {
  color: #475569;
  font-size: 0.8rem;
  text-transform: uppercase;
}

tr:hover {
  background: #f8fafc;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
}

.badge.abierto { background: #dc2626; }
.badge.en_proceso { background: #d97706; }
.badge.resuelto { background: #16a34a; }

.btn {
  display: inline-block;
  padding: 8px 14px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn.secondary {
  background: #64748b;
}

.btn.danger {
  background: #dc2626;
}

.error {
  color: #c0392b;
  font-weight: 600;
}

.login-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.login-box {
  background: #fff;
  padding: 32px;
  border-radius: 10px;
  width: 320px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.brand-header-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.brand-logo-login {
  width: 180px;
  max-width: 100%;
  height: auto;
  display: block;
}

.brand-header-login h1 {
  font-size: 1.2rem;
  margin: 10px 0 0;
  text-align: center;
}

.login-box label {
  display: block;
  font-weight: 600;
  margin: 14px 0 6px;
}

.login-box input {
  width: 100%;
}

.login-box button {
  margin-top: 20px;
  width: 100%;
  padding: 10px;
}

.foto-preview {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #e5e7eb;
  margin: 16px 0 20px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.tab-btn:hover {
  color: #1e293b;
}

.tab-btn.active {
  color: #1e293b;
  border-bottom-color: #2563eb;
}

.comentario {
  padding: 12px 0;
  border-bottom: 1px solid #eef0f3;
}

.comentario:last-child {
  border-bottom: none;
}

.comentario-meta {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.comentario-texto {
  white-space: pre-wrap;
}

.sin-comentarios {
  color: #6b7280;
  font-style: italic;
}

.nuevo-comentario {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed #e5e7eb;
}

.nuevo-comentario textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccd0d5;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}
