* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f7fa;
  color: #1f2937;
}

/* =========================================================
   LOGIN / CAMBIO DE CONTRASEÑA
========================================================= */

.login-wrapper,
.panel-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card,
.panel-card {
  width: 100%;
  max-width: 420px;
  padding: 35px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.login-card h1,
.panel-card h1 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #10243a;
}

.login-card p,
.panel-card p {
  line-height: 1.6;
}

.login-card label {
  display: block;
  margin-top: 18px;
  margin-bottom: 6px;
  font-weight: 600;
}

.login-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #ffffff;
  color: #111827;
  font-size: 16px;
  outline: none;
}

.login-card input:focus {
  border-color: #1f5f99;
  box-shadow: 0 0 0 3px rgba(31, 95, 153, 0.12);
}

.login-card button {
  width: 100%;
  margin-top: 24px;
  padding: 13px 18px;
  border: 0;
  border-radius: 7px;
  background: #10243a;
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}

.login-card button:hover {
  background: #183a5a;
}

.login-error {
  margin: 20px 0;
  padding: 12px;
  border-radius: 7px;
  background: #fef2f2;
  color: #b91c1c;
}

/* =========================================================
   DASHBOARD GENERAL
========================================================= */

.dashboard {
  min-height: 100vh;
  display: flex;
}

/* =========================================================
   SIDEBAR
========================================================= */

.dashboard-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;

  width: 260px;

  display: flex;
  flex-direction: column;

  background: #10243a;
  color: #ffffff;

  box-shadow: 5px 0 20px rgba(0, 0, 0, 0.08);
}

.dashboard-brand {
  padding: 30px 24px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-brand-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
}

.dashboard-brand-subtitle {
  margin-top: 4px;
  color: #f26522;
  font-size: 15px;
  font-weight: 600;
}

.dashboard-menu {
  flex: 1;
  padding: 24px 14px;
}

.dashboard-menu-link {
  display: block;

  margin-bottom: 8px;
  padding: 13px 15px;

  border-radius: 8px;

  color: #d8e1ea;
  text-decoration: none;

  font-size: 15px;
  font-weight: 600;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.dashboard-menu-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.dashboard-menu-link.active {
  background: #ffffff;
  color: #10243a;
}

.dashboard-sidebar-footer {
  padding: 20px 14px 24px;

  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-logout {
  display: block;

  padding: 12px 15px;

  border-radius: 8px;

  color: #ffffff;
  text-decoration: none;

  font-size: 15px;
  font-weight: 600;
}

.dashboard-logout:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* =========================================================
   CONTENIDO PRINCIPAL
========================================================= */

.dashboard-main {
  width: calc(100% - 260px);
  min-height: 100vh;

  margin-left: 260px;
  padding: 34px;

  background: #f5f7fa;
}

/* =========================================================
   HEADER
========================================================= */

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;

  margin-bottom: 30px;
}

.dashboard-header h1 {
  margin: 0;

  color: #10243a;

  font-size: 31px;
  font-weight: 700;
}

.dashboard-header p {
  margin: 8px 0 0;

  color: #667085;

  font-size: 15px;
  line-height: 1.5;
}

.dashboard-user {
  min-width: 190px;

  padding: 13px 18px;

  border: 1px solid #e3e8ef;
  border-radius: 10px;

  background: #ffffff;

  text-align: right;

  box-shadow: 0 4px 14px rgba(16, 36, 58, 0.04);
}

.dashboard-user strong {
  display: block;

  color: #10243a;

  font-size: 15px;
}

.dashboard-user span {
  display: block;

  margin-top: 3px;

  color: #667085;

  font-size: 13px;
  text-transform: capitalize;
}

/* =========================================================
   BIENVENIDA
========================================================= */

.dashboard-welcome {
  margin-bottom: 28px;
  padding: 28px 30px;

  border: 1px solid #e2e8f0;
  border-radius: 14px;

  background: #ffffff;

  box-shadow: 0 8px 25px rgba(16, 36, 58, 0.05);
}

.dashboard-welcome h2 {
  margin: 0 0 8px;

  color: #10243a;

  font-size: 23px;
}

.dashboard-welcome p {
  margin: 0;

  color: #667085;

  line-height: 1.6;
}

/* =========================================================
   TARJETAS DE ACCIONES
========================================================= */

.dashboard-actions {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 22px;
}

.dashboard-action-card {
  min-height: 180px;

  display: flex;
  align-items: flex-start;
  gap: 18px;

  padding: 26px;

  border: 1px solid #e2e8f0;
  border-radius: 14px;

  background: #ffffff;

  color: inherit;
  text-decoration: none;

  box-shadow: 0 8px 25px rgba(16, 36, 58, 0.05);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.dashboard-action-card:hover {
  transform: translateY(-3px);

  border-color: #c7d6e5;

  box-shadow: 0 13px 30px rgba(16, 36, 58, 0.1);
}

.dashboard-action-icon {
  width: 48px;
  height: 48px;

  flex: 0 0 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 11px;

  background: #eef4f9;
  color: #10243a;

  font-size: 25px;
  font-weight: 700;
}

.dashboard-action-card h3 {
  margin: 2px 0 10px;

  color: #10243a;

  font-size: 18px;
}

.dashboard-action-card p {
  margin: 0;

  color: #667085;

  font-size: 14px;
  line-height: 1.6;
}

/* =========================================================
   FORMULARIO DE CERTIFICADOS
========================================================= */

.certificate-form-card {
  width: 100%;
  padding: 30px;

  border: 1px solid #e2e8f0;
  border-radius: 14px;

  background: #ffffff;

  box-shadow: 0 8px 25px rgba(16, 36, 58, 0.05);
}

/* =========================================================
   ENCABEZADO DEL FORMULARIO
========================================================= */

.certificate-form-header {
  margin-bottom: 28px;
  padding-bottom: 20px;

  border-bottom: 1px solid #e5e7eb;
}

.certificate-form-header h2 {
  margin: 0 0 7px;

  color: #10243a;

  font-size: 22px;
  font-weight: 700;
}

.certificate-form-header p {
  margin: 0;

  color: #667085;

  font-size: 14px;
  line-height: 1.5;
}

/* =========================================================
   GRID DEL FORMULARIO
========================================================= */

.certificate-form-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 22px 26px;
}

.certificate-field-full {
  grid-column: 1 / -1;
}

/* =========================================================
   CAMPOS
========================================================= */

.certificate-field {
  display: flex;
  flex-direction: column;
}

.certificate-field label {
  margin-bottom: 7px;

  color: #344054;

  font-size: 14px;
  font-weight: 600;
}

.certificate-field input {
  width: 100%;
  height: 46px;

  padding: 0 13px;

  border: 1px solid #d0d5dd;
  border-radius: 8px;

  background: #ffffff;
  color: #101828;

  font-family: Arial, Helvetica, sans-serif;

  font-size: 15px;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.certificate-field input::placeholder {
  color: #98a2b3;
}

.certificate-field input:focus {
  border-color: #1f5f99;

  box-shadow: 0 0 0 3px rgba(31, 95, 153, 0.1);
}

.certificate-field small {
  margin-top: 7px;

  color: #667085;

  font-size: 12px;
  line-height: 1.45;
}

/* =========================================================
   INPUT NUMBER
========================================================= */

.certificate-field input[type="number"] {
  appearance: auto;
}

/* =========================================================
   INPUT DATE
========================================================= */

.certificate-field input[type="date"] {
  cursor: pointer;
}

/* =========================================================
   ACCIONES DEL FORMULARIO
========================================================= */

.certificate-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;

  margin-top: 32px;
  padding-top: 24px;

  border-top: 1px solid #e5e7eb;
}

/* =========================================================
   BOTÓN SECUNDARIO
========================================================= */

.certificate-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 120px;
  height: 44px;

  padding: 0 18px;

  border: 1px solid #d0d5dd;
  border-radius: 8px;

  background: #ffffff;
  color: #344054;

  text-decoration: none;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.certificate-button-secondary:hover {
  background: #f8fafc;
  border-color: #b8c2cc;
}

/* =========================================================
   BOTÓN PRINCIPAL
========================================================= */

.certificate-button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 190px;
  height: 44px;

  padding: 0 20px;

  border: 0;
  border-radius: 8px;

  background: #10243a;
  color: #ffffff;

  font-family: Arial, Helvetica, sans-serif;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.certificate-button-primary:hover {
  background: #183a5a;
}

.certificate-button-primary:active {
  transform: translateY(1px);
}

/* =========================================================
   RESPONSIVE DEL FORMULARIO
========================================================= */

@media (max-width: 760px) {
  .certificate-form-card {
    padding: 22px;
  }

  .certificate-form-grid {
    grid-template-columns: 1fr;
  }

  .certificate-field-full {
    grid-column: auto;
  }

  .certificate-form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .certificate-button-secondary,
  .certificate-button-primary {
    width: 100%;
  }
}

/* =========================================================
   LISTADO DE CERTIFICADOS
========================================================= */

.certificates-list-card {
  width: 100%;
  padding: 30px;

  border: 1px solid #e2e8f0;
  border-radius: 14px;

  background: #ffffff;

  box-shadow: 0 8px 25px rgba(16, 36, 58, 0.05);
}

/* =========================================================
   CABECERA DEL LISTADO
========================================================= */

.certificates-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 24px;
  padding-bottom: 20px;

  border-bottom: 1px solid #e5e7eb;
}

.certificates-list-header h2 {
  margin: 0 0 7px;

  color: #10243a;

  font-size: 22px;
  font-weight: 700;
}

.certificates-list-header p {
  margin: 0;

  color: #667085;

  font-size: 14px;
  line-height: 1.5;
}

/* =========================================================
   BUSCADOR
========================================================= */

.certificates-search {
  margin-bottom: 22px;
}

.certificates-search input {
  width: 100%;
  max-width: 420px;
  height: 44px;

  padding: 0 14px;

  border: 1px solid #d0d5dd;
  border-radius: 8px;

  background: #ffffff;
  color: #101828;

  font-size: 14px;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.certificates-search input::placeholder {
  color: #98a2b3;
}

.certificates-search input:focus {
  border-color: #1f5f99;

  box-shadow: 0 0 0 3px rgba(31, 95, 153, 0.1);
}

/* =========================================================
   CONTENEDOR DE TABLA
========================================================= */

.certificates-table-wrapper {
  width: 100%;
  overflow-x: auto;

  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

/* =========================================================
   TABLA
========================================================= */

.certificates-table {
  width: 100%;
  min-width: 980px;

  border-collapse: collapse;

  background: #ffffff;
}

.certificates-table thead {
  background: #f8fafc;
}

.certificates-table th {
  padding: 14px 16px;

  border-bottom: 1px solid #e5e7eb;

  color: #475467;

  text-align: left;

  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.certificates-table td {
  padding: 15px 16px;

  border-bottom: 1px solid #eef2f6;

  color: #344054;

  font-size: 14px;

  vertical-align: middle;
}

.certificates-table tbody tr:last-child td {
  border-bottom: 0;
}

.certificates-table tbody tr:hover {
  background: #fbfcfd;
}

/* =========================================================
   CÓDIGO DEL CERTIFICADO
========================================================= */

.certificates-code {
  color: #10243a;

  font-family: Consolas, Monaco, monospace;

  font-size: 13px;
  font-weight: 700;
}

/* =========================================================
   ESTADOS
========================================================= */

.certificate-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 82px;

  padding: 6px 10px;

  border-radius: 999px;

  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.certificate-status-valid {
  background: #ecfdf3;
  color: #16794a;
}

.certificate-status-revoked {
  background: #fff7ed;
  color: #b45309;
}

/* =========================================================
   BOTONES DE LA TABLA
========================================================= */

.certificate-table-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 34px;

  padding: 7px 11px;

  border: 1px solid #d0d5dd;
  border-radius: 7px;

  background: #ffffff;
  color: #344054;

  text-decoration: none;

  font-size: 12px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.certificate-table-button:hover {
  background: #f8fafc;
  border-color: #b8c2cc;
}

.certificate-table-button-primary {
  border-color: #10243a;

  background: #10243a;
  color: #ffffff;
}

.certificate-table-button-primary:hover {
  background: #183a5a;
  border-color: #183a5a;
}

.certificate-table-button-danger {
  border-color: #fecaca;

  background: #fffafa;
  color: #b42318;
}

.certificate-table-button-danger:hover {
  background: #fef2f2;
  border-color: #fda29b;
}

/* =========================================================
   ESTADO VACÍO
========================================================= */

.certificates-empty-row:hover {
  background: #ffffff !important;
}

.certificates-empty {
  min-height: 180px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 30px;

  text-align: center;
}

.certificates-empty strong {
  margin-bottom: 8px;

  color: #10243a;

  font-size: 16px;
}

.certificates-empty span {
  max-width: 500px;

  color: #667085;

  font-size: 13px;
  line-height: 1.6;
}

/* =========================================================
   RESPONSIVE DEL LISTADO
========================================================= */

@media (max-width: 760px) {
  .certificates-list-card {
    padding: 22px;
  }

  .certificates-list-header {
    align-items: stretch;
    flex-direction: column;
  }

  .certificates-list-header .certificate-button-primary {
    width: 100%;
  }

  .certificates-search input {
    max-width: none;
  }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {
  .dashboard-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .dashboard-sidebar {
    position: relative;

    width: 100%;
    min-height: auto;
  }

  .dashboard {
    display: block;
  }

  .dashboard-main {
    width: 100%;

    margin-left: 0;
    padding: 24px;
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-user {
    width: 100%;
    text-align: left;
  }

  .dashboard-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .dashboard-main {
    padding: 18px;
  }

  .dashboard-header h1 {
    font-size: 26px;
  }

  .dashboard-welcome {
    padding: 22px;
  }

  .dashboard-action-card {
    padding: 21px;
  }

  .login-card,
  .panel-card {
    padding: 27px 22px;
  }
}

/* =========================================================
   PALETA CORPORATIVA ALPHA
   AJUSTE VISUAL GENERAL
========================================================= */

:root {
  --primary-color: #12aeca;
  --primary-dark: #087a92;

  --secondary-color: #8bbd10;
  --secondary-dark: #6f990b;

  --contact-bg: #123344;
  --contact-button: #12aeca;

  --modal-blue: #12aeca;

  --text-color: #24313d;
  --light-text-color: #ffffff;
  --subtle-text-color: #687687;

  --background-color: #f5f9fa;
  --card-background: #ffffff;

  --footer-background: #17242f;

  --border-color: #cbd8df;
  --input-border-color: #d9e4ea;

  --shadow-color: rgba(0, 0, 0, 0.08);

  --accent-soft: #e7f7fa;
  --success-soft: #f3f9df;

  --heading-color: #12aeca;
  --dark-surface: #17242f;
}

/* =========================================================
   FONDO GENERAL
========================================================= */

body,
.dashboard-main {
  background: var(--background-color);
  color: var(--text-color);
}

/* =========================================================
   SIDEBAR
========================================================= */

.dashboard-sidebar {
  background: var(--contact-bg);
  color: var(--light-text-color);

  box-shadow: 4px 0 18px rgba(0, 0, 0, 0.06);
}

.dashboard-brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-brand-title {
  color: var(--light-text-color);
}

.dashboard-brand-subtitle {
  color: var(--primary-color);
}

.dashboard-menu-link {
  color: #dce8ed;
}

.dashboard-menu-link:hover {
  background: rgba(18, 174, 202, 0.14);

  color: var(--light-text-color);
}

.dashboard-menu-link.active {
  background: var(--card-background);
  color: var(--primary-dark);
}

.dashboard-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-logout {
  color: var(--light-text-color);
}

.dashboard-logout:hover {
  background: rgba(18, 174, 202, 0.14);
}

/* =========================================================
   TÍTULOS
========================================================= */

.dashboard-header h1,
.dashboard-welcome h2,
.dashboard-action-card h3,
.certificate-form-header h2,
.certificates-list-header h2 {
  color: var(--heading-color);
}

/* =========================================================
   TEXTOS SECUNDARIOS
========================================================= */

.dashboard-header p,
.dashboard-welcome p,
.dashboard-action-card p,
.certificate-form-header p,
.certificate-field small,
.certificates-list-header p,
.certificates-empty span {
  color: var(--subtle-text-color);
}

/* =========================================================
   TARJETA DEL USUARIO
========================================================= */

.dashboard-user {
  border-color: var(--border-color);

  background: var(--card-background);

  box-shadow: 0 4px 14px var(--shadow-color);
}

.dashboard-user strong {
  color: var(--text-color);
}

.dashboard-user span {
  color: var(--primary-dark);
}

/* =========================================================
   TARJETAS GENERALES
========================================================= */

.dashboard-welcome,
.dashboard-action-card,
.certificate-form-card,
.certificates-list-card {
  border-color: var(--border-color);

  background: var(--card-background);

  box-shadow: 0 8px 24px var(--shadow-color);
}

/* =========================================================
   TARJETAS DEL DASHBOARD
========================================================= */

.dashboard-action-card:hover {
  border-color: var(--primary-color);

  box-shadow: 0 12px 28px rgba(18, 174, 202, 0.12);
}

.dashboard-action-icon {
  background: var(--accent-soft);
  color: var(--primary-dark);
}

/* =========================================================
   FORMULARIOS
========================================================= */

.certificate-form-header {
  border-bottom-color: var(--border-color);
}

.certificate-field label {
  color: var(--text-color);
}

.certificate-field input,
.login-card input,
.certificates-search input {
  border-color: var(--input-border-color);

  background: var(--card-background);

  color: var(--text-color);
}

.certificate-field input:focus,
.login-card input:focus,
.certificates-search input:focus {
  border-color: var(--primary-color);

  box-shadow: 0 0 0 3px rgba(18, 174, 202, 0.12);
}

.certificate-field input::placeholder,
.certificates-search input::placeholder {
  color: #9aabb5;
}

/* =========================================================
   BOTÓN PRINCIPAL
========================================================= */

.certificate-button-primary,
.login-card button {
  background: var(--primary-color);

  color: var(--light-text-color);
}

.certificate-button-primary:hover,
.login-card button:hover {
  background: var(--primary-dark);
}

/* =========================================================
   BOTÓN SECUNDARIO
========================================================= */

.certificate-button-secondary {
  border-color: var(--border-color);

  background: var(--card-background);

  color: var(--text-color);
}

.certificate-button-secondary:hover {
  border-color: var(--primary-color);

  background: var(--accent-soft);

  color: var(--primary-dark);
}

/* =========================================================
   LISTADO / TABLA
========================================================= */

.certificates-table-wrapper {
  border-color: var(--border-color);
}

.certificates-table {
  background: var(--card-background);
}

.certificates-table thead {
  background: var(--accent-soft);
}

.certificates-table th {
  border-bottom-color: var(--border-color);

  color: var(--primary-dark);
}

.certificates-table td {
  border-bottom-color: #e7eef2;

  color: var(--text-color);
}

.certificates-table tbody tr:hover {
  background: #f7fcfd;
}

.certificates-code {
  color: var(--primary-dark);
}

/* =========================================================
   ESTADOS
========================================================= */

.certificate-status-valid {
  background: var(--success-soft);

  color: var(--secondary-dark);
}

.certificate-status-revoked {
  background: #fff4e8;

  color: #b05b16;
}

/* =========================================================
   BOTONES DE TABLA
========================================================= */

.certificate-table-button {
  border-color: var(--border-color);

  background: var(--card-background);

  color: var(--text-color);
}

.certificate-table-button:hover {
  border-color: var(--primary-color);

  background: var(--accent-soft);

  color: var(--primary-dark);
}

.certificate-table-button-primary {
  border-color: var(--primary-color);

  background: var(--primary-color);

  color: var(--light-text-color);
}

.certificate-table-button-primary:hover {
  border-color: var(--primary-dark);

  background: var(--primary-dark);

  color: var(--light-text-color);
}

/* =========================================================
   LOGIN Y CAMBIO DE CONTRASEÑA
========================================================= */

.login-card,
.panel-card {
  background: var(--card-background);

  box-shadow: 0 15px 40px var(--shadow-color);
}

.login-card h1,
.panel-card h1 {
  color: var(--heading-color);
}

/* =========================================================
   MENSAJES
========================================================= */

.login-error {
  background: #fff1f1;
  color: #b42318;
}

/* =========================================================
   SIDEBAR BLANCO - AJUSTE DE CONTRASTE
========================================================= */

.dashboard-sidebar {
  background: #ffffff;
  color: var(--text-color);

  border-right: 1px solid var(--border-color);

  box-shadow: 4px 0 18px rgba(0, 0, 0, 0.04);
}

/* =========================================================
   MARCA
========================================================= */

.dashboard-brand {
  border-bottom: 1px solid var(--border-color);
}

.dashboard-brand-title {
  color: var(--text-color);
}

.dashboard-brand-subtitle {
  color: var(--primary-color);
}

/* =========================================================
   ENLACES
========================================================= */

.dashboard-menu-link {
  color: var(--text-color);
}

.dashboard-menu-link:hover {
  background: var(--accent-soft);
  color: var(--primary-dark);
}

.dashboard-menu-link.active {
  background: var(--primary-color);
  color: #ffffff;
}

/* =========================================================
   PIE DEL SIDEBAR
========================================================= */

.dashboard-sidebar-footer {
  border-top: 1px solid var(--border-color);
}

.dashboard-logout {
  color: var(--text-color);
}

.dashboard-logout:hover {
  background: #fff1f1;
  color: #b42318;
}

/* =========================================================
   LOGO DEL SIDEBAR
========================================================= */

.dashboard-brand {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px 18px;

  background: #ffffff;

  border-bottom: 1px solid var(--border-color);
}

.dashboard-brand-logo {
  display: block;

  width: 100%;
  max-width: 170px;

  height: auto;

  object-fit: contain;
}

.dashboard-brand-logo {
  display: block;
  width: 170px;
  height: auto;
  object-fit: contain;
}

/* =========================================================
   SIDEBAR CONTRAÍDO / DESPLEGABLE
   ALPHA CERTIFICADOS
========================================================= */

.dashboard-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;

  z-index: 1000;

  width: 72px;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  background: #ffffff;
  color: var(--text-color);

  border-right: 1px solid var(--border-color);

  box-shadow: 4px 0 18px rgba(0, 0, 0, 0.04);

  transition:
    width 0.25s ease,
    box-shadow 0.25s ease;
}

/* =========================================================
   SIDEBAR DESPLEGADO
========================================================= */

.dashboard-sidebar:hover {
  width: 260px;

  box-shadow: 8px 0 28px rgba(0, 0, 0, 0.12);
}

/* =========================================================
   CABECERA DEL SIDEBAR
========================================================= */

.dashboard-brand {
  width: 100%;
  height: 92px;

  flex: 0 0 92px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  overflow: hidden;

  background: #ffffff;

  border-bottom: 1px solid var(--border-color);
}

/* =========================================================
   HAMBURGUESA
========================================================= */

.dashboard-menu-hamburger {
  width: 44px;
  height: 44px;

  flex: 0 0 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--primary-dark);

  border-radius: 9px;
}

.dashboard-menu-hamburger svg {
  width: 27px;
  height: 27px;

  display: block;
}

/* =========================================================
   LOGO
========================================================= */

.dashboard-brand-logo {
  display: none;

  width: 170px;
  max-width: 170px;
  height: auto;

  object-fit: contain;
}

/* =========================================================
   CAMBIO HAMBURGUESA → LOGO
========================================================= */

.dashboard-sidebar:hover .dashboard-menu-hamburger {
  display: none;
}

.dashboard-sidebar:hover .dashboard-brand-logo {
  display: block;
}

/* =========================================================
   MENÚ
========================================================= */

.dashboard-menu {
  flex: 1;

  width: 100%;

  padding: 20px 10px;

  overflow: hidden;
}

/* =========================================================
   ENLACES
========================================================= */

.dashboard-menu-link {
  width: 100%;
  min-height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 0;

  margin-bottom: 8px;
  padding: 0;

  overflow: hidden;

  border-radius: 8px;

  color: var(--text-color);
  text-decoration: none;

  font-size: 15px;
  font-weight: 600;

  white-space: nowrap;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    padding 0.25s ease,
    gap 0.25s ease;
}

/* =========================================================
   ICONOS
========================================================= */

.dashboard-menu-icon {
  width: 24px;
  height: 24px;

  flex: 0 0 24px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-menu-icon svg {
  width: 22px;
  height: 22px;

  display: block;
}

/* =========================================================
   TEXTO OCULTO
========================================================= */

.dashboard-menu-text {
  max-width: 0;

  overflow: hidden;

  opacity: 0;

  transform: translateX(-6px);

  white-space: nowrap;

  transition:
    max-width 0.25s ease,
    opacity 0.18s ease,
    transform 0.25s ease;
}

/* =========================================================
   TEXTO AL DESPLEGAR
========================================================= */

.dashboard-sidebar:hover .dashboard-menu-link {
  justify-content: flex-start;

  gap: 13px;

  padding: 0 16px;
}

.dashboard-sidebar:hover .dashboard-menu-text {
  max-width: 190px;

  opacity: 1;

  transform: translateX(0);
}

/* =========================================================
   ENLACE ACTIVO
========================================================= */

.dashboard-menu-link.active {
  background: var(--primary-color);
  color: #ffffff;
}

.dashboard-menu-link:hover {
  background: var(--accent-soft);
  color: var(--primary-dark);
}

.dashboard-menu-link.active:hover {
  background: var(--primary-dark);
  color: #ffffff;
}

/* =========================================================
   PIE DEL SIDEBAR
========================================================= */

.dashboard-sidebar-footer {
  width: 100%;

  padding: 16px 10px 20px;

  overflow: hidden;

  border-top: 1px solid var(--border-color);
}

/* =========================================================
   CERRAR SESIÓN
========================================================= */

.dashboard-logout {
  width: 100%;
  min-height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 0;

  padding: 0;

  overflow: hidden;

  border-radius: 8px;

  color: var(--text-color);
  text-decoration: none;

  font-size: 15px;
  font-weight: 600;

  white-space: nowrap;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    padding 0.25s ease,
    gap 0.25s ease;
}

.dashboard-sidebar:hover .dashboard-logout {
  justify-content: flex-start;

  gap: 13px;

  padding: 0 16px;
}

.dashboard-logout:hover {
  background: #fff1f1;
  color: #b42318;
}

/* =========================================================
   CONTENIDO PRINCIPAL
   SOLO RESERVA EL SIDEBAR CONTRAÍDO
========================================================= */

.dashboard-main {
  width: calc(100% - 72px);

  margin-left: 72px;

  min-height: 100vh;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 820px) {
  .dashboard {
    display: block;
  }

  .dashboard-sidebar {
    position: relative;

    width: 100%;

    min-height: auto;

    bottom: auto;

    overflow: visible;
  }

  .dashboard-sidebar:hover {
    width: 100%;
  }

  .dashboard-brand {
    height: auto;

    padding: 20px 18px;
  }

  .dashboard-menu-hamburger {
    display: none;
  }

  .dashboard-brand-logo,
  .dashboard-sidebar:hover .dashboard-brand-logo {
    display: block;
  }

  .dashboard-menu {
    padding: 16px 14px;
  }

  .dashboard-menu-link,
  .dashboard-sidebar:hover .dashboard-menu-link {
    justify-content: flex-start;

    gap: 13px;

    padding: 0 16px;
  }

  .dashboard-menu-text,
  .dashboard-sidebar:hover .dashboard-menu-text {
    max-width: none;

    opacity: 1;

    transform: none;
  }

  .dashboard-sidebar-footer {
    padding: 16px 14px 20px;
  }

  .dashboard-logout,
  .dashboard-sidebar:hover .dashboard-logout {
    justify-content: flex-start;

    gap: 13px;

    padding: 0 16px;
  }

  .dashboard-main {
    width: 100%;

    margin-left: 0;

    padding: 24px;
  }
}

/* =========================================================
   TABLA DE CERTIFICADOS
   ACCIONES EN UNA SOLA FILA
========================================================= */

.certificates-table th:last-child,
.certificates-table td:last-child {
  width: 280px;
  min-width: 280px;

  white-space: nowrap;
}

.certificates-table td:last-child form {
  display: inline !important;

  margin-left: 6px !important;
}
