@import url('https://fonts.googleapis.com/css2?family=Saira:wght@800&display=swap');

html {
    font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

/* 1. Aplicamos el fondo al BODY real para que sea global */
body {
    margin-bottom: 60px;

    padding: 0;
    /* Unificamos todo en una sola l�nea para evitar conflictos 
    background: #f6f9fc url('/Img/vertical.svg') no-repeat center center fixed;
    background-size: auto;
    min-height: 100vh;
        */
}

/* 2. Ajustamos tu contenedor para que sea transparente y deje ver el fondo */
.page-body {
    padding: 42px 32px;
    /*background: transparent; 
    min-height: calc(100vh - 70px); */
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ============================================================
   Variables del sistema (ref: docs/style.css)
   ============================================================ */
:root {
    --main-color: #C41018; /*#002E62;*/
    --second-color: #1A6AB5; /*#008CCA;*/
    --third-color: #E31B23; /*#7DB804;*/
    --body-color: #28292a;
    --background-color: #F7F7F7; /*#E3ECFA;*/
    --warning-color: #E4B931;
    --danger-color: #E31B23; /*#FD493F;*/
    --btn-color: #1A6AB5; /*#6FA500;*/
    --light-gray: #F7F7F7;
    --text-color: #212121;
    --white: #f8f9fa;
    --disable-color: #a7acb2;
    --sidebar-width: 240px;
    --topbar-height: 60px;
}

/* ============================================================
   Layout principal (post-login)
   ============================================================ */
body.app-layout {
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
}

/* ----- Topbar ----- */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background-color: white;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px 0 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
    .topbar .toplogo {
        width: var(--sidebar-width);
        display: flex;
        justify-content: center;
        align-items: center;
        border-right: solid 2px #c2c2c2;
        margin-right: 24px;

    }

    .topbar .brand {
        font-size: 1.05rem;
        font-weight: 700;
        text-decoration: none;
        letter-spacing: 0.02em;
    }

.topbar .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}

    .topbar .user-info .separator {
        color: rgba(48, 48, 48, 0.35);
        transform: rotate(20deg);
    }

.topbar .user-info .meta {
  opacity: 0.8;
  font-size: 0.8rem;
}
    .topbar .user-info .meta i {
        font-weight: bold;
        color: #6f6f6f
    }


    .topbar .btn-logout {
        background: #f2f2f2;
        color: var(--bs-body-color);
        border: 1px solid rgba(255,255,255,0.4);
        font-weight:bold;
        padding: 4px 14px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.8rem;
        text-decoration: none;
        transition: background-color 0.15s;
        margin-left: 4px;
    }

.topbar .btn-logout:hover {
  background-color: rgba(255,255,255,0.15);
}

/* ----- Sidebar ----- */
.sidebar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background-color: var(--main-color);
  overflow-y: auto;
  z-index: 900;
  padding-top: 10px;
}

.sidebar .nav-section-title {
  margin-bottom:12px;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 14px 20px 6px;
}

.sidebar .nav-link {
  display: flex;
  font-weight:bold;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.78);
  padding: 10px 20px;
  font-size: 0.875rem;
  border-left: 3px solid transparent;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-left-color 0.15s;
}

.sidebar .nav-link:hover {
  background-color: rgba(255,255,255,0.08);
  color: white;
  border-left-color: var(--second-color);
}

.sidebar .nav-link.active {
  background-color: rgba(0,140,202,0.18);
  color: white;
  border-left-color: var(--second-color);
  font-weight:bolder;
}

/* ----- Contenido central ----- */
.main-content {
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
  min-height: 100vh;
  background-color: var(--background-color);
}


/* ============================================================
   Layout de login
   ============================================================ */
body.login-layout {
  background: linear-gradient(160deg, #002E62 0%, #1A6AB5 55%, #2179c4 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.login-card {
  background: white;
  border-radius: 12px;
  padding: 40px 48px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.login-card .login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-card .login-logo h2 {
  color: var(--main-color);
  margin: 0;
  font-size: 1.5rem;
}

.login-card .login-logo p {
  color: var(--disable-color);
  font-size: 0.85rem;
  margin-top: 4px;
  margin-bottom: 0;
}

.login-card .form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--body-color);
}

.login-card .form-control {
  border: 2px solid var(--light-gray);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.95rem;
  transition: border-color 0.15s;
}

.login-card .form-control:focus {
  border-color: var(--second-color);
  box-shadow: none;
}

.btn-login {
    display: block;
    width: 100%;
    background-color: var(--btn-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

.btn-login:hover {
  background-color: var(--second-color);
  color: white;
}

/* ============================================================
   Badges de estatus
   ============================================================ */
.badge-estatus {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-solicitud-validacion  { background-color: #FFF3CD; color: #856404; }
.badge-rechazada             { background-color: #F8D7DA; color: #842029; }
.badge-validada              { background-color: #D1ECF1; color: #0C5460; }
.badge-impresa               { background-color: #CCE5FF; color: #004085; }
.badge-vinculada             { background-color: #D4EDDA; color: #155724; }
.badge-solicitud-reimpresion { background-color: #E2D9F3; color: #4A235A; }

/* Badges de estatus — Lotes */
.badge-lote-solicitado        { background-color: #FFF3CD; color: #856404; }
.badge-lote-validado          { background-color: #D1ECF1; color: #0C5460; }
.badge-lote-editado           { background-color: #E2E3E5; color: #383D41; }
.badge-lote-rechazado         { background-color: #F8D7DA; color: #842029; }
.badge-lote-aprobado          { background-color: #D4EDDA; color: #155724; }
.badge-lote-produccion        { background-color: #CCE5FF; color: #004085; }
.badge-lote-producido         { background-color: #B8DAFF; color: #004085; }
.badge-lote-validacion        { background-color: #FFEEBA; color: #856404; }
.badge-lote-entregado         { background-color: #C3E6CB; color: #155724; }
.badge-lote-no-entregado      { background-color: #F5C6CB; color: #842029; }
.badge-lote-solicitado-chapala { background-color: #D6D8FF; color: #2D2F8A; }


.table-responsive {
    border-radius: var(--bs-card-border-radius);
}

.page-title {
    font-size: 1.8rem;
    text-transform: uppercase;
    font-family: 'Saira', sans-serif;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}
/* ============================================================
   Botones de accion en tabla
   ============================================================ */
.btn-action {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.btn-action:hover { opacity: 0.85; text-decoration: none; }

.btn-action-primary   { background-color: var(--btn-color);    color: white; }
.btn-action-secondary { background-color: var(--light-gray);    color: var(--body-color); }
.btn-action-danger    { background-color: var(--danger-color);  color: white; }
.btn-action-warning   { background-color: var(--warning-color); color: #333; }
.btn-action-success   { background-color: #198754;              color: white; }
.btn-action-info      { background-color: #0dcaf0;              color: #333; }
.btn-action-info-secondary      { background-color: var(--btn-color);     color: white; }
/* En footer de modal los botones de accion usan padding mayor */
.modal-footer .btn-action {
    padding: 8px 18px;
    font-size: 0.875rem;
    border-radius: 6px;
}

.btn-filter {
    background-color: white;
    color: var(--btn-color);
    font-weight: bold;
    border: solid var(--btn-color);
    border-radius: 6px;
    font-size: 0.85rem;
    padding: 6px 14px;
    height: 32px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s;
}

    .btn-filter:hover {
        background-color: #004280;
        color: white;
    }

button:disabled {
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    background: #ebebeb !important;
    color: black !important;
    border: solid 1px #a7a7a7 !important;
}

button.btn {
    font-weight: bold;
}


.btn-nueva {
    background-color: var(--btn-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: bold;
    padding: 6px 14px;
    height: 31px;
    cursor: pointer;
    transition: background-color 0.15s;
    text-decoration: none;
    white-space: nowrap;
}


.modal-header {
    background-color: #3d3d3d;
    color: white;
    border-radius: 0;
    padding: 14px 20px;
}

.btn-back {
    font-size: 0.85rem;
    color: var(--main-color);
    text-decoration: none;
    font-weight: 600;
    padding: 4px 10px;
    border: 1px solid var(--main-color);
    border-radius: 5px;
    transition: background-color 0.15s;
    white-space: nowrap;
}

    .btn-back:hover {
        background-color: var(--main-color);
        color: white;
        text-decoration: none;
    }

.modal-footer {
    gap: .5rem;
}