:root {
  --primary: #0f172a;
  --primary-hover: #1e293b;
  --bg-gradient: linear-gradient(-45deg, #f8fafc, #e0e7ff, #dbeafe, #f1f5f9);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --success: #10b981;
  --error: #ef4444;
  --radius: 1rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--bg-gradient);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}
nav {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}
.nav-links {
  display: flex;
  justify-content: center;
  gap: 3rem;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 2rem;
}
nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
}
nav a:hover,
nav a.active {
  color: var(--primary);
  background: rgba(15, 23, 42, 0.03);
}
nav a.active {
  font-weight: 600;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
.main-container {
  max-width: 98%;
  margin: 2rem auto;
  padding: 0 1.5rem;
  width: 100%;
}
header {
  text-align: center;
  margin-bottom: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.8s ease-out;
}
.header-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}
header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.03em;
  background: linear-gradient(to right, #0f172a, #334155);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 500;
}
.logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: #ffffff;
  padding: 0.75rem;
  border-radius: 1.5rem;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05),
    0 0 0 4px rgba(255, 255, 255, 0.4);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo:hover {
  transform: rotate(3deg) scale(1.05);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04),
    0 0 0 4px rgba(255, 255, 255, 0.6);
}
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  border-left: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 1.5rem;
  padding: 3rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--glass-shadow);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.glass-card:hover {
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.1);
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-title i {
  color: var(--text-main);
}
#formEmpleado {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.colspan-3 {
  grid-column: span 3;
}
.colspan-2 {
  grid-column: span 2;
}
.colspan-1 {
  grid-column: span 1;
}
.subsection-title {
  grid-column: 1 / -1;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.subsection-title:first-child {
  margin-top: 0;
}
@media (max-width: 900px) {
  #formEmpleado {
    grid-template-columns: repeat(2, 1fr);
  }
  .colspan-3 {
    grid-column: span 2;
  }
  .colspan-2 {
    grid-column: span 2;
  }
}
@media (max-width: 600px) {
  #formEmpleado {
    grid-template-columns: 1fr;
  }
  .colspan-3,
  .colspan-2,
  .colspan-1 {
    grid-column: span 1;
  }
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}
input,
select {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(203, 213, 225, 0.6);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  width: 100%;
  backdrop-filter: blur(4px);
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
}
input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}
button.btn-primary {
  grid-column: 1 / -1;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.1),
    0 2px 4px -1px rgba(15, 23, 42, 0.06);
  letter-spacing: 0.025em;
}
button.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.2);
}
.table-container {
  overflow-x: auto;
  max-height: 80vh;
  min-height: 65vh;
  overflow-y: auto;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  border: 1px solid rgba(203, 213, 225, 0.4);
  background: rgba(255, 255, 255, 0.5);
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}
th {
  padding: 1.2rem 1rem;
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}
td {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
  color: var(--text-main);
  transition: background 0.2s;
}
tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: rgba(241, 245, 249, 0.6);
}
.btn-action {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-action:hover {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}
#qrContainer {
  text-align: center;
  animation: slideUp 0.4s ease-out;
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#qrcode {
  background: white;
  padding: 1.5rem;
  border-radius: 1rem;
  display: inline-block;
  margin: 1.5rem 0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}
#downloadQR {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--success);
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
}
#downloadQR:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}
.avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
}
.id-badge {
  font-weight: 600;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 0.4rem;
}
.emp-name {
  font-weight: 500;
  color: var(--text-main);
}
.badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  border-width: 1px;
  border-style: solid;
  display: inline-block;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.8);
}
@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.status-active {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
}
.status-inactive {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}
.mt-1 {
  margin-top: 0.25rem;
}
.text-xs {
  font-size: 0.85rem;
}
.text-xxs {
  font-size: 0.75rem;
}
.text-center {
  text-align: center;
}
.text-muted {
  color: var(--text-muted);
}
.text-error {
  color: var(--error);
}
@media (max-width: 768px) {
  .main-container {
    margin: 1.5rem auto;
    padding: 0 1rem;
  }
  .header-brand {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  header h1 {
    font-size: 1.6rem;
    text-align: center;
    line-height: 1.2;
  }
  .logo {
    width: 90px;
    height: 90px;
  }
  .glass-card {
    padding: 1.5rem;
    border-radius: 1rem;
  }
  nav {
    padding: 0.75rem 1rem;
    gap: 1.5rem;
  }
  nav a {
    font-size: 0.9rem;
  }
  #qr-reader {
    border-radius: 1rem !important;
  }
}
@media (max-width: 480px) {
  header h1 {
    font-size: 1.4rem;
  }
  .main-container {
    margin: 1rem auto;
  }
  .glass-card {
    padding: 1.25rem;
  }
}
.premium-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo-container {
  background: white;
  padding: 0.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.02);
}
.logo-container img {
  height: 40px;
  width: auto;
  object-fit: contain;
}
.brand-text {
  font-weight: 800;
  font-size: 1.5rem;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin: 0;
  -webkit-text-fill-color: #0f172a !important;
}
.brand-text span:first-of-type {
  color: #3b82f6 !important;
  -webkit-text-fill-color: #3b82f6 !important;
}
.align-center {
  display: flex;
  align-items: center;
}
.brand-subtitle {
  font-weight: 500;
  font-size: 1rem;
  color: #64748b;
  margin-left: 0.75rem;
  border-left: 2px solid #e2e8f0;
  padding-left: 0.75rem;
  letter-spacing: normal;
}
.btn-logout {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #ffe4e6;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.btn-logout:hover {
  background: #ffe4e6;
  transform: translateY(-2px);
}
@media (max-width: 1000px) {
  .premium-navbar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  .hide-mobile {
    display: none !important;
  }
}
