@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    background-color: #fefefe;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    overflow-y: scroll;
    color: var(--ped-color-darkblue);
}

:focus-visible{
    outline: var(--ped-color-blue) auto 1px;
}


label {
    font-size:16px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    padding: 20px 30px;
    border-radius: 8px;
    color: var(--ped-color-darkblue);
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.ped-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 155px; /* fija su altura */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: left;
    background-color: #ffffff;
    background-image: url('/static/ped-top-3.jpg');
    background-repeat: repeat-x;
    background-position: top center;
    background-size: auto 145px;
}

.ped-top > img {
    display: none;
}

.ped-top::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: var(--ped-color-blue);      
    z-index: 4;          /* por encima de todo */
}


.ped-top::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background:
        /* blanco desde la izquierda */
        linear-gradient(
            to right,
            rgba(255, 255, 255, 1) 5%,
            rgba(255, 255, 255, 0.6) 20%,
            rgba(255, 255, 255, 0) 40%
        ),
        /* blanco desde la derecha */
        linear-gradient(
            to left,
            rgba(255, 255, 255, 1) 5%,
            rgba(255, 255, 255, 0.6) 20%,
            rgba(255, 255, 255, 0) 40%
        );
}
.ped-line-bottom {
    position: absolute;
    top: 145px;
    left: 0;
    width: 100%;
    height: 10px;          /* ajusta el grosor */
    background: var(--ped-color-blue);  
    z-index: 4;
}
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 18px;
    border-radius: 5px;
    font-size: 16px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
  }
  
  /* Visible */
  .toast.show {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Tipos */
  .toast.success { background: var(--ped-color-darkblue) }
  .toast.error   { background: #e74c3c; }
  .toast.info    { background: #3498db; }
  .toast.warning { background: #f39c12; }

.overview{
    width: calc(100% - 40px);
}
body[data-page="admin"] .overview {
    display: flex;
    flex-direction: column;
}
body[data-page="admin"] #projects-data {
    order: 1;
}
body[data-page="admin"] #editors-data {
    order: 2;
}
.form-buttons {
  display: flex;
    gap: 12px;                   /* separación entre botones */
    margin-top: 20px;
    grid-column: 1 / -1; 
}


.flash-messages {
    margin: 10px 0;
}

.flash-message {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 5px;
}
.ped-logo {
    position: absolute;
    text-align: center; 
    left:30px;
    font-weight:700;
    font-size: 40px;
    letter-spacing: 2px;
    color: var(--ped-color-darkblue);
    display:flex;
    z-index: 3;
}

.ped-logo span{
    color: var(--ped-color-blue);
}

.ped-icon {
    height: 115px;
}

.app-switcher {
    width: 100%;
}

.app-switcher-header {
    display: flex;
    align-items: center;
    padding: 12px;
    padding-left:30px;
    cursor: pointer;
    font-weight: 600;
    background: var(--ped-color-darkblue);
    color:white;
}

.app-switcher-header .arrow {
    transition: transform 0.3s ease;
}

.app-switcher.open .arrow {
    transform: rotate(180deg);
}

.app-switcher-menu {
    list-style: none;
    padding-left: 30px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.app-switcher.open .app-switcher-menu {
    max-height: 200px;
    background: var(--ped-color-darkblue);
    color:white;
}

.app-switcher-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    text-decoration: none;
    color: inherit;
}

.app-switcher ion-icon{
    min-width: 45px; 
    font-size: 25px;
}


nav .logo {
    display: flex;
    flex-direction: column;
    color:white;
    font-weight:700;
    font-size: 40px;
    letter-spacing: 2px;
}

nav .logo-image {
    padding-top: 50px;
    padding-left: 20px;
    
}

nav .logo-image img {
    width: 170px;
    object-fit: cover;
}


nav {
    position: fixed;
    margin-top:-10px;
    left: 0;
    height: calc(100vh - 145px);
    width: 250px;
    background-color: var(--ped-color-blue);
    padding: 10px 0 10px 0px;
}

nav .menu-items {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 240px);
    justify-content: space-between;
}

nav .menu-items li {
    list-style: none;
    padding-left:20px;
    
}

nav .menu-items li a {
    display: flex;
    align-items: center;
    height: 50px;
    text-decoration: none;
    font-weight: 600;
    gap:8px
}



nav .menu-items li.active a {
    border-top-left-radius: 25px;
    border-bottom-left-radius: 25px;
    position: relative;
}

nav a ion-icon {
    color: white;
    font-size: 24px;
    min-width: 45px;
}

nav .menu-items li a .links {
    font-size: 16px;
    color: white;
}

nav .menu-items li.active a {
    background-color: #fefefe;
}

nav .menu-items li.active a:before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    right: 0;
    top: -40px;
    border-radius: 50%;
    box-shadow: 20px 20px #fefefe;
    pointer-events: none;
}

nav .menu-items li.active a:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    right: 0;
    bottom: -40px;
    border-radius: 50%;
    box-shadow: 20px -20px #fefefe;
    pointer-events: none;
}


nav .menu-items li.active a .links {
    color: var(--ped-color-darkblue);
}

nav .menu-items li.active a ion-icon {
    color: var(--ped-color-darkblue);
}

.section-admin, .section-laboratory{
    padding-bottom: 40px;
}

[id$="Pagination"] button {
    margin: 2px;
    padding: 4px 8px;
    cursor: pointer;
    border: 1px solid var(--ped-color-darkblue);
    border-radius: 5px;
    background-color: #f3f6f9;
    color: var(--ped-color-darkblue);
}

[id$="Pagination"] button:hover {
    opacity: 0.85;
}

.pagination-active {
    background-color: var(--ped-color-darkblue) !important;
    color: white !important;
}

input[type="submit"]:disabled,
button:disabled {
    cursor: not-allowed;           
    opacity: 0.4;    
  }

.custom-file-upload {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f3f6f9;
    color: var(--ped-color-darkblue);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    border: 2px solid var(--ped-color-darkblue);
    font-family: inherit;
}

.custom-file-upload:hover {
    opacity: 0.8;
}

#fileInput {
    display: none;
}

.toggle-link {
    cursor: pointer;
    padding: 2px;
    padding-left:10px;
    padding-right:10px;
    border: 1px solid var(--ped-color-darkblue);
    border-radius: 5px;
    margin-left:10px;
}
  
  .toggle-link:hover {
    opacity: 0.8;
}

.form-fields .button-delete {
    color: #cb630e;
    border-color: #cb630e;
    background-color: #f3f6f9;
}

.form-fields {
    display: grid;
    grid-template-columns: max-content 1fr;

    row-gap: 10px;
    column-gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    padding-left: 70px; /* alinear con contenido */
}


.form-fields label {
    text-align: right;
    white-space: nowrap;
}

.form-helper-text {
    color: #666;
    font-size: 0.8em;
}

.form-fields select {
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
    width: 200px;
    color:var(--ped-color-grey);
}

.form-fields textarea {
    width: 100%;
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    color:var(--ped-color-grey);
}

.form-fields input {
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
    width: 200px;
    color:var(--ped-color-grey);
}

.login-input {
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
    width: 300px;
    color:var(--ped-color-grey);
    margin-top:5px;
}
.form-fields button {
    padding: 4px 10px;
    border-radius: 5px;
    font-weight: 600;
    border: 2px solid var(--ped-color-darkblue);
    color: var(--ped-color-darkblue);
    font-family: inherit;
    cursor: pointer;
    background-color: #f3f6f9;
    margin-top:5px;
    
}

.login-button {
    padding: 4px 10px;
    border-radius: 5px;
    font-weight: 600;
    border: 2px solid var(--ped-color-darkblue);
    color: var(--ped-color-darkblue);
    font-family: inherit;
    cursor: pointer;
    background-color: #f3f6f9;
    margin-top:5px;
    
}
.form-fields button:hover {
    opacity: 0.8;
}

.table-action-button {
    padding: 0;
    border-radius: 0;
    font-weight: 600;
    border: none;
    color: var(--ped-color-darkblue);
    background-color: transparent;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.table-action-button:hover {
    opacity: 0.8;
}

.table-action-button ion-icon {
    display: block;
    font-size: 25px;
    --ionicon-stroke-width: 48px;
}

.diff-del {
    text-decoration: line-through;
    background-color: var(--ped-color-delete);
}

.diff-add {
    background-color: var(--ped-color-add)
}
  
.multi-tags {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.multi-tags li {
    border-radius: 15px;
    padding: 2px 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.multi-tags li button {
    border: none;
    background: none;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    margin-top: 0;
}

.tag-user {
    background-color: var(--ped-color-delete);
}

.multi-tags li button:hover {
    color: #c0392b;
}
.error-add {
    background-color: var(--ped-color-add);
}

.error-delete {
    background-color: var(--ped-color-delete);
}

.error-modify {
    background-color: var(--ped-color-modify);
  }
.custom-drop-area {
    display: block;
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border: 2px dashed #3582bc;
    border-radius: 10px;
    background-color: #f1f1ff;
    text-align: center;
    cursor: pointer;
    color: #124469;
    margin-bottom: 10px;
}

.custom-drop-area:hover {
    background-color: unset;
}

.user-info {
    position: absolute;
    top: 50%;
    right: 30px;
    display: flex;
    align-items: center;
    transform: translateY(-50%);
    gap: 10px;
    z-index:3;
    cursor: pointer;

}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 4px solid var(--ped-color-blue);
    color: var(--ped-color-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 26px;
}

.user-name {
    color: var(--ped-color-blue);
    font-weight: 500;
}


.user-info:hover .user-avatar {
    background: var(--ped-color-blue);
    color: white;
}

.user-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 160px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 2001;
}

.user-menu a {
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.user-menu a:hover {
    background: #f5f7fa;
}

.user-menu a.logout {
    color: #d63031;
    font-weight: 500;
}

.action{
    background-color: var(--ped-color-darkblue);
    padding-left : 8px;
    padding-right : 8px;
    border-radius: 5px;
    border-width: 2px;
    border-color: var(--ped-color-darkblue);
    color: white;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;

}
.action:hover{
    background-color: var(--ped-color-darkblue);
    border-color: var(--ped-color-darkblue);
    color: white;

}
.action:focus-visible{
    outline: unset;
}

.action ion-icon {
    vertical-align: middle;
    font-size: 20px; /* puedes ajustar el tamaño si quieres */
    height:25px;
  }

.scroll-anchor {
    scroll-margin-top: 185px; /* altura de tu cabecera fija */
  }


.dashboard {
    position: relative;
    left: 250px;
    width: calc(100% - 250px);
    min-height: 100vh;
    background-color: #fefefe;
    margin-top: 155px;
    padding-top: 20px;
    padding-bottom: calc(100vh - 400px);
}



.container {
    padding-left: 50px;
    padding-right: 50px;
}

.container .title {
    display: flex;
    align-items: center;
    margin: 10px 0 20px;
}
.container .subtitle {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.container .title ion-icon {
    width: 35px;
    height: 35px;
    padding: 5px;
    /*background-color: var(--ped-color-darkblue);
    color: White;*/
    border-radius: 6px;
}

.container .title .text {
    font-size: 24px;
    font-weight: 500;
    margin-left: 10px;
}
.container .subtitle .text {
    font-size: 16px;
    font-weight: 500;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin: 8px 0 18px;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 6px 14px;
    border-radius: 999px;
    border: 2px solid var(--ped-color-darkblue);
    background-color: #f3f6f9;
    color: var(--ped-color-darkblue);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.admin-tab:hover {
    opacity: 0.85;
}

.admin-tab.active {
    background-color: var(--ped-color-darkblue);
    color: #fff;
    border-color: var(--ped-color-darkblue);
}

.container .boxes {
    display: flex;
    justify-content: space-between;
    flex-wrap: none;
}

.container .boxes .box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(100%/4 - 15px);
    padding: 15px 20px;
    border-radius: 10px;
    background-color: #9cdef5;
}

.boxes .box ion-icon {
    font-size: 35px;
    color: var(--ped-color-darkblue);
    margin: 5px;
}

.boxes .box .text {
    font-size: 18px;
    font-weight: 500;
    color: var(--ped-color-darkblue);
}

.boxes .box .number {
    font-size: 40px;
    font-weight: 500;
    color: var(--ped-color-darkblue);
}


.container .table-design{
padding: 0px 20px 40px 70px;
}

.container .activity {
    width: 90%;
    font-size: 18px;
    color: #333;
    margin-top: 20px;
}

.container .activity thead tr th{
    text-align: left;
    padding-bottom: 20px;
    font-size: 20px;
}

.container .activity tbody tr td{
    color: #333;
    white-space: nowrap;
    padding: 4px;
}

.container .activity tbody tr td a.delete-btn{
    color: #000;
    text-decoration: none;
}

.container .activity tbody tr.odd{
    background-color: #ceecf6;

}

.center{
    display: flex;
    justify-content: center;
    align-items: center;
}


:root {
    --bs-body-bg: var(--bs-gray-100);
    --ped-color-blue: #0073d2;
    --ped-color-darkblue: #124469;
    --ped-color-grey: #394d5c;
    --ped-color-bg: #dcdde5;
    --ped-color-red: #931329;
    --ped-color-add: #c0d9c0;
    --ped-color-delete: #e7b9b9;
    --ped-color-modify: #b3cbdf;

}

.nav-link {
  color: black;
}

.styled-table {
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.85em;
    width: 100%;
    min-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  }
  .styled-table thead tr {
    background-color: var(--ped-color-darkblue);
    color: #ffffff;
    text-align: left;
  }
  .styled-table thead tr th a{
    color: #ffffff;
    font-weight: 600;
  }
  .styled-table th,
  .styled-table td {
      padding: 12px 15px;
      vertical-align: middle;
  }
  .styled-table tbody td,
  .styled-table tbody th[scope="row"] {
    max-width: 360px;
  }
  .table-datetime {
    white-space: nowrap;
  }
  .table-datetime .table-date,
  .table-datetime .table-time {
    display: block;
  }
  .styled-table tbody td.status-cell {
    font-weight: 500;
    text-align: center;
  }
  .styled-table tbody td.status-cell .cell-clamp {
    display: inline-block;
    max-height: none;
    -webkit-line-clamp: unset;
    overflow: visible;
  }
  .styled-table tbody td.status-requested {
    color: #5c4a00;
    background-color: #fff1b8;
  }
  .styled-table tbody td.status-pending {
    color: #7a3f00;
    background-color: #ffd9b3;
  }
  .styled-table tbody td.status-reviewed {
    color: #0f5132;
    background-color: #cfe8d8;
  }
  .styled-table tbody td.status-error {
    color: #842029;
    background-color: #f5c2c7;
  }
  .cell-clamp {
    position: relative;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    line-height: 1.4;
    max-height: calc(1.4em * 3);
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
  }
  .cell-clamp.is-truncated::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 35%;
    height: 1.4em;
    pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.96));
  }
  .styled-table tbody tr:nth-of-type(even) .cell-clamp.is-truncated::after {
    background: linear-gradient(to right, rgba(243,246,249,0), rgba(243,246,249,0.96));
  }
  .styled-table tbody tr.selected .cell-clamp.is-truncated::after {
    background: linear-gradient(to right, rgba(255,246,230,0), rgba(255,246,230,0.96));
  }
  .styled-table tbody tr {
    border-bottom: 1px solid #dddddd;
    cursor: pointer;
  }
  .styled-table tbody tr.selected {
    background-color: #fff6e6 !important;
    border-left: 4px solid #f68f3b;
  }
  
  .styled-table tbody tr:nth-of-type(even) {
    background-color: #f3f6f9;
  }
  
  .styled-table tbody tr:last-of-type {
    border-bottom: 2px solid var(--ped-color-darkblue);
  }
.table-empty-state {
  display: none;
  width: 100%;
  margin: 25px 0;
  padding: 28px 24px;
  border-radius: 12px;
  border: 1px dashed rgba(15, 61, 101, 0.2);
  background: linear-gradient(180deg, #f9fbfd 0%, #f3f6f9 100%);
  color: var(--ped-color-darkblue);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}
.table-empty-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.table-empty-subtitle {
  font-size: 0.92rem;
  opacity: 0.78;
}
.nav-link:hover{

  color: var(--ped-color-darkblue);
}

.t-danger{

  --bs-table-color: var(--ped-color-red);
  --bs-table-striped-color: var(--ped-color-red);
}

.panel-edit{
  background-color:var(--ped-color-lightpurple);
  padding:20px;
}

.form-group .form-control{
  background-color:#fff;
}

.form-group  label{
  margin-bottom:5px;
  font-weight:600;
}

/* FORM ACTIVO (cuando hay segmento seleccionado) */
.form-active input:not([readonly]),
.form-active textarea:not([readonly]),
.form-active select {
  background-color: #fff6e6; /* mismo tono que la tabla */
  transition: background-color 0.2s ease;
}


input[readonly],
textarea[readonly] {
  background-color: #f3f6f9;   /* gris claro */
  cursor: not-allowed;
}

.btn-primary{
  background-color: var(--ped-color-darkblue);
  border-color: var(--ped-color-darkblue);
  padding-left:20px;
  padding-right:20px;
}

.btn-secondary{
  background-color: var(--ped-color-lightpurple);
  border-color: var(--ped-color-lightpurple);
  color:black;
}
.btn-secondary:hover{
  background-color: var(--ped-color-blue);
  border-color: var(--ped-color-blue);
  color:black;
}



#progress-bar{
    background: var(--ped-color-darkblue);

}
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

.processing-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.processing-overlay.show {
    display: flex;
}

.processing-card {
    min-width: 320px;
    max-width: 420px;
    padding: 28px 30px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    text-align: center;
}

.processing-spinner {
    width: 28px;
    height: 28px;
    margin: 0 auto 16px;
    border-width: 3px;
    border-top-color: var(--ped-color-darkblue);
}

.processing-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ped-color-darkblue);
    margin-bottom: 8px;
}

.processing-subtitle {
    font-size: 0.96rem;
    color: #456;
    margin-bottom: 12px;
}

.processing-countdown {
    font-size: 0.92rem;
    color: #667;
}


