:root {
  --orange-main: #FE5F2F;
  --orange-secondary: #FFA832;
  --cyan-support: #64CCC5;
  --dark: #1F2933;
  --light: #F4F7FA;
  --white: #FFFFFF;
  --border: #dde5ec;
  --text: #24303b;
  --success: #1f9d55;
  --error: #d64545;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--light);
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.site-header,
.app-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.header-inner,
.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

.brand-logo {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--orange-main);
}

.brand-logo-white {
  color: var(--white);
}

.brand-subtitle {
  font-size: 14px;
  color: #6b7785;
  margin-top: 4px;
}

.header-contact,
.app-user-meta {
  font-size: 14px;
  color: #52606d;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--orange-main);
  color: var(--white);
}

.btn-outline {
  border: 1px solid var(--orange-main);
  color: var(--orange-main);
  background: var(--white);
}

.hero {
  min-height: 80vh;
  background:
    linear-gradient(120deg, rgba(31, 41, 51, 0.88), rgba(254, 95, 47, 0.62)),
    url("img/banner.png");
  background-size: cover;
  background-position: center top;
  background-color: var(--dark);
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  color: #fff;
}

.hero-placeholder {
  border: 2px dashed rgba(255, 255, 255, .5);
  border-radius: 22px;
  padding: 25px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.hero h1 {
  font-size: 52px;
  line-height: 1.05;
  margin: 0 0 16px;
}

.hero p {
  font-size: 22px;
}

.contact-section,
.app-main {
  padding: 40px 0 60px;
}

.card {
  background: var(--white);
  border-radius: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(31, 41, 51, 0.05);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  background: var(--white);
}

.site-footer {
  background: var(--dark);
  color: var(--white);
  padding: 28px 0;
}

.footer-copy {
  margin-top: 8px;
  color: #c6d0da;
}

.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fff8f5, #f4f7fa);
}

.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  padding: 32px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 35px rgba(31, 41, 51, 0.08);
}

.auth-logo {
  margin: 10px 0 20px;
  text-align: center;
}

.full-btn {
  width: 100%;
  margin-top: 14px;
}

.auth-links {
  margin-top: 18px;
  text-align: center;
  color: var(--orange-main);
  font-weight: 600;
}

.auth-footer {
  text-align: center;
  padding: 18px;
  color: #617080;
  font-size: 14px;
}

.module-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.module-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fffdfb 0%, #fff6f1 100%);
  color: var(--dark);
  font-weight: 700;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 6px 18px rgba(31, 41, 51, 0.04);
}

.module-nav a:hover {
  transform: translateY(-2px);
  border-color: rgba(254, 95, 47, 0.35);
  box-shadow: 0 12px 24px rgba(254, 95, 47, 0.10);
  color: var(--orange-main);
}

.module-nav a:active {
  transform: translateY(0);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.notification-list {
  margin: 0;
  padding-left: 18px;
}

.notification-list li {
  margin-bottom: 14px;
}

.app-actions {
  display: flex;
  gap: 14px;
  font-size: 22px;
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-weight: 600;
}

.alert.success {
  background: #e8f7ef;
  color: var(--success);
}

.alert.error {
  background: #fdecec;
  color: var(--error);
}

.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #25D366;
  color: white;
  padding: 14px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  z-index: 999;
}

@media (max-width: 900px) {

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

  .header-inner,
  .app-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  background: var(--white);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.table th {
  background: #f8fafc;
  color: #445566;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
}

.pdf-frame {
  width: 100%;
  min-height: 700px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.approval-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.approval-card {
  padding: 20px;
}

.btn-danger {
  background: #d64545;
  color: #fff;
}

code {
  display: inline-block;
  background: #f4f7fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  word-break: break-all;
}

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

.version-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef4f8;
  border: 1px solid var(--border);
  font-weight: 700;
  color: var(--dark);
  font-size: 13px;
}

.status-approved {
  color: #1f9d55;
  font-weight: 700;
}

.status-observed {
  color: #d9822b;
  font-weight: 700;
}

.status-rejected {
  color: #d64545;
  font-weight: 700;
}

.status-progress {
  color: #2f6fed;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card h3 {
  margin-bottom: 10px;
  font-size: 16px;
  color: #52606d;
}

.stat-card p {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: var(--orange-main);
}

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.app-actions a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  text-decoration: none;
}

.app-actions a i {
  font-size: 1.35rem;
  transition: all .2s ease;
}

/* Iconos naranjas */
.app-actions a:not(.logout) i {
  color: #fd7e14;
  /* Naranja Bootstrap */
}

/* Cerrar sesión rojo */
.app-actions a.logout i {
  color: #dc3545;
  /* Rojo Bootstrap */
}

/* Efecto hover */
.app-actions a:hover i {
  transform: scale(1.25);
}

.notif-badge {
  position: absolute;
  top: 4px;
  right: 2px;
}

.app-sidebar-toggle {
  position: fixed;
  z-index: 1045;
  top: 96px;
  left: 16px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--orange-main);
  border-radius: 50%;
  background: var(--white);
  color: var(--orange-main);
  box-shadow: 0 8px 20px rgba(31, 41, 51, .16);
  font-size: 1.45rem;
  transition: transform .2s ease, box-shadow .2s ease;
}

.app-sidebar-toggle:hover,
.app-sidebar-toggle:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(254, 95, 47, .25);
}

.app-sidebar-toggle.is-attention {
  animation: sidebar-pulse 1.1s ease-in-out 3;
}

@keyframes sidebar-pulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(31, 41, 51, .16); }
  50% { box-shadow: 0 0 0 10px rgba(254, 95, 47, .16), 0 12px 26px rgba(254, 95, 47, .3); }
}

.app-sidebar {
  position: fixed;
  z-index: 1046;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(300px, 86vw);
  padding: 24px 16px;
  overflow-y: auto;
  background: var(--white);
  border-right: 1px solid var(--border);
  box-shadow: 12px 0 30px rgba(31, 41, 51, .16);
  transform: translateX(-105%);
  transition: transform .25s ease;
}

.app-sidebar.is-open { transform: translateX(0); }

.app-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 20px;
  color: var(--dark);
}

.app-sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--dark);
  font-weight: 600;
}

.app-sidebar-link i { width: 20px; color: var(--orange-main); text-align: center; }
.app-sidebar-link:hover { background: #fff4ee; color: var(--orange-main); }
.app-sidebar-link.active { background: var(--orange-main); color: var(--white); }
.app-sidebar-link.active i { color: var(--white); }

.app-sidebar-backdrop {
  position: fixed;
  z-index: 1040;
  inset: 0;
  background: rgba(31, 41, 51, .38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.app-sidebar-backdrop.is-visible { opacity: 1; pointer-events: auto; }

@media (min-width: 901px) {
  .app-sidebar-backdrop { display: none; }
}

@media (max-width: 900px) {
  .app-sidebar-toggle { top: 16px; left: auto; right: 16px; }
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  /* opcional */
}

.dashboard-welcome {
  padding: 18px 20px;
}

.dashboard-welcome-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dashboard-welcome h1 {
  margin: 0;
}

.dashboard-welcome p {
  margin: 0;
  color: #52606d;
  font-weight: 500;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-secondary {
  background: #e5e7eb;
  color: #374151;
}