/* ============================================
   ADMIN - Adaptado al estilo de main.css
   Estética macOS/Apple: Glass, blur, bordes suaves
   ============================================ */

#menu .nav-list > li > a {
  background-repeat: no-repeat;
  background-position: left center;
  padding-left: 20px;
  /* Hereda transición y color de main.css */
  transition: background-color 0.2s ease, color 0.2s ease;
  border-radius: 8px;
}

.well {
  background: var(--glass-bg);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  padding: 15px;
}

#content {
  font-size: 0.8em;
  background: var(--glass-bg);
  border-radius: 20px;
}

#auth_login_zone {
    max-width: 450px;
    margin: auto;
}

.form-actions {
    padding: 19px 20px 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    background-color: rgb(255 255 255 / 0%);
    border-top: 1px solid #e5e5e5;
    zoom:1}

/* ----------------------------------------
   ERRORES DE FORMULARIO
   Rojo Apple coherente con main.css (.btn-danger)
   ---------------------------------------- */
.jforms-error-list {
    margin-left: 0;
    background-color: rgba(255, 59, 48, 0.1);
    background-image: none;
    background-repeat: no-repeat;
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    color: #FF3B30;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.jforms-error-list li {
    list-style: none;
    color: #FF3B30;
    font-weight: 500;
}

/* ----------------------------------------
   FIELDSETS
   Bordes y radios coherentes con el sistema
   ---------------------------------------- */
fieldset legend {
    width: auto;
    padding-left: 0.5em;
    padding-right: 0.5em;
    border-bottom: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main, #1d1d1f);
}

fieldset legend label {
    display: inline-block;
}

fieldset {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 1em;
    margin-bottom: 1em;
    background-color: rgba(255, 255, 255, 0.6);
}

/* ----------------------------------------
   TABLAS Y FORMULARIOS
   ---------------------------------------- */
.services-table th {
    width: 30%;
    min-width: 10em;
}

.form-horizontal .control-label {
    width: 240px;
}

.form-horizontal .controls {
    margin-left: 250px;
}

.table .table {
    background-color: transparent;
}

/* ----------------------------------------
   DASHBOARD
   ---------------------------------------- */
#dashboard-content {
    padding-left: 2.1277%;
}

.dashboard-widget h3 {
    background-color: rgba(245, 245, 247, 0.9);
    border-radius: 8px 8px 0 0;
    margin: 0 0 10px;
    padding: 6px 10px;
    font-weight: 600;
    color: var(--text-main, #1d1d1f);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.table-server-info th,
.table-server-info td {
    width: 50%;
}

@media (width <= 480px) {
    .form-horizontal .controls {
        margin-left: 0;
    }
}

/*
======
Admin repository lists
======
*/
div.admin_repository:target::before {
    /* Fixed page header overlaps in-page anchors
     * https://stackoverflow.com/questions/4086107/fixed-page-header-overlaps-in-page-anchors
     */
    content: "";
    display: block;
    height: 75px;
    margin: -75px 0 0;
}

/*
======
Admin QGIS project lists
======
*/
div#lizmap_project_list_container {
    height: 80%;
    width: 100%;
    margin: auto;

    /* Colores de estado actualizados al sistema Apple */
    --warning-bg-color: rgba(255, 149, 0, 0.15);   /* Naranja Apple translúcido */
    --error-bg-color: rgba(255, 59, 48, 0.12);      /* Rojo Apple translúcido */
    --blocker-bg-color: rgba(255, 59, 48, 0.85);    /* Rojo Apple sólido */
    --highlighted-line-bg-color: var(--accent, #007AFF);
}

#lizmap_project_list {
    min-inline-size: 60%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.6);
}

div.lizmap_project_list_details {
    background-color: rgba(245, 245, 247, 0.9);
    border-radius: 8px;
    padding: 5px 8px;
}

/* Cursor pointer solo si la tabla tiene columnas ocultas */
table.lizmap_project_list tr {
    cursor: default;
}

table.lizmap_project_list tr.has_hidden_columns {
    cursor: pointer;
}

/* Borde izquierdo azul Apple al hacer hover */
table.lizmap_project_list tr td:first-child {
    border-left: 3px solid transparent;
    transition: border-color 0.15s ease;
}

table.lizmap_project_list tr:not(.child):hover td:first-child {
    border-left: 3px solid var(--highlighted-line-bg-color);
}

/* Estados de alerta en celdas */
table.lizmap_project_list tr .liz-warning {
    background-color: var(--warning-bg-color);
}

table.lizmap_project_list tr .liz-error {
    background-color: var(--error-bg-color);
}

table.lizmap_project_list tr .liz-blocker {
    background-color: var(--blocker-bg-color);
    color: white;
}

/* Detalles en vista responsive de datatable */
div.lizmap_project_list_details dt {
    margin-top: 5px;
    font-weight: 600;
    color: var(--text-main, #1d1d1f);
}

div.lizmap_project_list_details dd {
    padding: 5px 8px;
    max-height: 250px;
    overflow: auto;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 6px;
    margin-bottom: 4px;
}

table.lizmap_project_list tr dd.lizmap-project-qgis-log pre {
    font-size: 0.9em;
    line-height: 10px;
}

table.lizmap_project_list tr td.lizmap-project-qgis-log pre {
    font-size: 0.8em;
    line-height: 10px;
    max-height: 80px;
    max-width: 300px;
    overflow: auto;
}

/* ----------------------------------------
   LEYENDA DE AYUDA DE LA LISTA DE PROYECTOS
   ---------------------------------------- */
#lizmap_project_list_help div.modal-body {
    background-color: rgba(245, 245, 247, 0.95);
    border-radius: 0 0 12px 12px;
}

#lizmap_project_list_help ul ul li {
    font-weight: bold;
}

#lizmap_project_list_help ul ul ul.rules li {
    font-weight: normal;
}

#lizmap_project_list_help ul > .rules {
    list-style: none;
}

#lizmap_project_list_help ul > .rules li::before {
    content: '■';
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    font-size: 2.5em;
}

#lizmap_project_list_help .badge-warning {
    position: absolute;
    left: 55px;
}

#lizmap_project_list_help .no_symbol::before {
    content: '';
}

#lizmap_project_list_help .no_symbol > li:nth-child(1) {
    font-weight: normal;
}

/* Colores de los indicadores de estado en la leyenda */
#lizmap_project_list_help .warning::before {
    color: #FF9500; /* Naranja Apple */
}

#lizmap_project_list_help .error::before {
    color: #FF3B30; /* Rojo Apple */
}

#lizmap_project_list_help .blocker::before {
    color: #FF3B30; /* Rojo Apple sólido */
}

/* ----------------------------------------
   LISTA DE USUARIOS Y GRUPOS
   ---------------------------------------- */
.jacl2-list.jacl2-list-sticky-heads thead,
.jacl2-list-user.jacl2-list-sticky-heads thead {
    top: 75px;
}

#groups-list_wrapper,
#users-list_wrapper {
    padding: 1em 0 1em 2em;
}

/* Botón de copiar al portapapeles: minimalista */
.copy-to-clipboard {
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 6px;
    color: var(--text-main, #1d1d1f);
    opacity: 0.6;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    padding: 4px;
}

.copy-to-clipboard:hover {
    opacity: 1;
    background-color: rgba(0, 122, 255, 0.1);
}

.copy-to-clipboard svg {
    pointer-events: none;
}

/* Campo de contraseña en formulario de login */
#jforms_jcommunity_login_auth_password {
    flex: 3 3;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 6px 10px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#jforms_jcommunity_login_auth_password:focus {
    outline: 3px solid rgba(0, 122, 255, 0.4);
    outline-offset: 1px;
    border-color: var(--accent, #007AFF);
}