/* Minimal offline Materialize-inspired subset (custom build) - MIT style */
:root {
  --m-primary: #5d5d5d;
  /* strong blue */
  --m-primary-dark: #08306d;
  --m-accent: #ffb300;
  /* amber accent */
  --m-bg: #f5f7fa;
  --m-surface: #ffffff;
  --m-text: #263238;
  --m-text-light: #eceff1;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font: 400 16px/1.5 "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--m-bg);
  color: var(--m-text);
}

a {
  text-decoration: none;
  color: var(--m-primary);
}

a:hover {
  color: var(--m-primary-dark);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
}

.col {
  padding: 0 8px;
  flex: 1 0 0%;
}

/* Navbar */
.navbar-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

nav {
  background: var(--m-primary);
  color: var(--m-text-light);
  height: 56px;
  display: flex;
  align-items: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, .25);
}

nav .nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0 16px;
  color: var(--m-text-light);
}

ul.nav-links {
  list-style: none;
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0 16px;
}

ul.nav-links a {
  color: var(--m-text-light);
  font-size: .85rem;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 4px;
  transition: background .15s;
}

ul.nav-links a:hover {
  background: rgba(255, 255, 255, .15);
}

button.nav-toggle {
  display: none;
}

@media (max-width:760px) {
  ul.nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--m-primary-dark);
    position: absolute;
    top: 56px;
    left: 0;
    width: 100%;
    padding: 8px 0;
  }

  ul.nav-links.show {
    display: flex;
  }

  ul.nav-links a {
    padding: 12px 20px;
    border-radius: 0;
  }

  button.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: var(--m-text-light);
    font-size: 1.4rem;
    padding: 0 16px;
    cursor: pointer;
  }
}

/* Footer */
.footer-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--m-primary);
  color: var(--m-text-light);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, .2);
}

footer .footer-inner {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  letter-spacing: .5px;
}

main.page-content {
  padding: 72px 0 72px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 4px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  letter-spacing: .4px;
  transition: background .15s, box-shadow .15s;
  color: #fff;
  background: var(--m-primary);
}

.btn:hover {
  background: var(--m-primary-dark);
}

.btn:focus {
  outline: 2px solid var(--m-accent);
  outline-offset: 2px;
}

.btn-flat {
  background: transparent;
  color: var(--m-primary);
}

.btn-flat:hover {
  background: rgba(13, 71, 161, .1);
}

.btn-accent {
  background: var(--m-accent);
  color: #000;
}

.btn-accent:hover {
  background: #ffa000;
}

.btn-small {
  padding: 6px 10px;
  font-size: .75rem;
}

.btn-large {
  padding: 14px 22px;
  font-size: 1rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 1.1rem;
}

/* Soft variant (suavizado) */
.btn-soft {
  background: #e3eefc;
  color: #0d47a1;
  border: 1px solid #c3d9f5;
  font-weight: 600;
  box-shadow: none;
}

.btn-soft:hover {
  background: #d6e6f9;
}

.btn-soft:focus {
  outline: 2px solid #90caf9;
  outline-offset: 2px;
}

/* Cards */
.card {
  background: var(--m-surface);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 100px;
  transition: box-shadow .2s, transform .2s;
}

.card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  transform: translateY(-2px);
}

.card-title {
  font-size: .9rem;
  font-weight: 600;
  margin: 0;
  color: var(--m-primary);
}

.card-sub {
  font-size: .7rem;
  color: #607d8b;
  margin: 0;
}

/* Category list (empleados.php) */
.category-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-item {
  background: #fff;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.category-item:hover {
  background: #f5f9ff;
}

.category-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.category-info h3 {
  margin: 0;
  font-size: .85rem;
  font-weight: 600;
  color: #0d47a1;
  letter-spacing: .3px;
}

.category-info span {
  font-size: .65rem;
  color: #607d8b;
  letter-spacing: .3px;
}

.category-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
  overflow: hidden;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  font-size: .78rem;
}

th {
  background: #e3eaf3;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

tr:nth-child(even) {
  background: #fafcff;
}

tr:hover {
  background: #f0f6ff;
}

tr:first-child th,
tr:first-child td {
  border-top: 0;
}

td {
  border-top: 1px solid #eceff1;
}

/* Forms */
form {
  margin-top: 12px;
}

label {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .5px;
  color: #455a64;
  margin: 10px 0 4px;
}

input[type=text],
input[type=password],
input[type=date],
input[type=number],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  background: #fff;
  color: #37474f;
  font-size: .85rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--m-primary);
  outline-offset: 1px;
}

.helper-text {
  font-size: .65rem;
  color: #607d8b;
  margin-top: 2px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .5px;
  background: #eceff1;
  color: #37474f;
}

.badge-success {
  background: #c8e6c9;
  color: #2e7d32;
}

.badge-danger {
  background: #ffcdd2;
  color: #c62828;
}

/* Utility */
.mt-2 {
  margin-top: 12px;
}

.mt-3 {
  margin-top: 18px;
}

.mt-4 {
  margin-top: 24px;
}

.mb-2 {
  margin-bottom: 12px;
}

.mb-3 {
  margin-bottom: 18px;
}

.center {
  text-align: center;
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.w-100 {
  width: 100%;
}

/* Icons (using emoji fallback) */
.icon {
  font-size: 1.1rem;
  display: inline-block;
  line-height: 1;
}

/* Modal (if needed) */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 8px;
  max-width: 520px;
  width: 100%;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}

.modal-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--m-primary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* Smooth modal animation */
.modal-content {
  animation: modalPop .18s ease-out;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Fixed spacing adjustment if footer overlaps short pages */
body.has-fixed-bars main.page-content {
  min-height: calc(100vh - 124px);
}

/* header 56 + footer 48 + buffer */
/* Reduced motion respect */
@media (prefers-reduced-motion:reduce) {
  * {
    transition: none !important;
  }
}