/**
 * Módulo: Propiedades
 * Estilos específicos de la lista de propiedades, formulario y ficha detallada.
 * Prefijo: prop-
 *
 * Estilos responsive en: css/responsive/propiedades/
 * Usado por: js/modules/directorio.js (renderPropiedades, renderFichaPropiedad)
 */

/* ============================================================
   LISTA DE PROPIEDADES
   ============================================================ */

/* Cabecera de sección */
.prop-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.prop-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prop-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Badge de tipo de propiedad */
.prop-type-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 6px;
    vertical-align: middle;
}

/* Tarjeta de propiedad en la lista */
.prop-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 12px;
    transition: box-shadow 0.15s;
}

.prop-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.prop-card-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.prop-card-info {
    flex: 1;
}

.prop-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.prop-card-address {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.prop-card-units {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

/* Acciones de la tarjeta */
.prop-card-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.prop-btn-ficha {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
    border: none;
    cursor: pointer;
}

.prop-btn-ficha:hover { background: #e0e7ff; }

.prop-btn-edit {
    padding: 5px 8px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    color: #374151;
    font-size: 12px;
    transition: background 0.15s;
}

.prop-btn-edit:hover { background: #dbeafe; }

.prop-btn-delete {
    padding: 5px 8px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    color: #ef4444;
    font-size: 12px;
    transition: background 0.15s;
}

.prop-btn-delete:hover { background: #fee2e2; }

/* Lista de unidades */
.prop-units-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.prop-unit-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 11px;
    color: #374151;
}

/* Estado vacío */
.prop-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* ============================================================
   FORMULARIO DE PROPIEDAD
   ============================================================ */

.prop-form-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.prop-form-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

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

.prop-form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.prop-form-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #1f2937;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s;
    font-family: inherit;
}

.prop-form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.prop-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

/* Sección de unidades en el formulario */
.prop-units-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

/* Contenedor de filas de unidad generadas dinámicamente */
.prop-units-form-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.prop-units-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.prop-btn-add-unit {
    padding: 4px 10px;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.prop-btn-add-unit:hover { background: #e0e7ff; }

.prop-unit-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.prop-unit-input {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
}

.prop-unit-level-input {
    width: 70px;
    padding: 5px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
}

.prop-btn-remove-unit {
    padding: 4px 8px;
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.15s;
}

.prop-btn-remove-unit:hover { background: #fecaca; }

/* ============================================================
   FICHA DE PROPIEDAD
   ============================================================ */

/* Grid de tarjetas */
.prop-ficha-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

/* Tarjeta individual */
.prop-ficha-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
}

/* Tarjeta de ancho completo */
.prop-ficha-card--wide {
    grid-column: 1 / -1;
}

/* Título de tarjeta */
.prop-ficha-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Filas info clave-valor */
.prop-ficha-info-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prop-ficha-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #374151;
}

.prop-ficha-info-label {
    color: #6b7280;
    font-weight: 500;
}

/* Fila de persona */
.prop-ficha-persona-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f9fafb;
    font-size: 13px;
}

.prop-ficha-persona-row:last-child { border-bottom: none; }

.prop-ficha-persona-row i {
    margin-top: 2px;
    font-size: 15px;
}

/* Fila de contrato */
.prop-ficha-contrato-row {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}

.prop-ficha-contrato-row:last-child { border-bottom: none; }

.prop-ficha-contrato-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.prop-ficha-monto {
    font-weight: 700;
    color: #10b981;
    font-size: 14px;
}

/* Estado vacío dentro de tarjeta */
.prop-ficha-empty {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
    padding: 6px 0;
}

/* Badge de ocupación */
.prop-ficha-ocupacion {
    text-align: center;
    padding: 10px 0;
}

.prop-ficha-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.prop-ficha-badge--full    { background: #d1fae5; color: #065f46; }
.prop-ficha-badge--partial { background: #fef3c7; color: #92400e; }
.prop-ficha-badge--empty   { background: #f3f4f6; color: #6b7280; }

/* Acciones rápidas */
.prop-ficha-acciones {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prop-ficha-accion-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s;
}

.prop-ficha-accion-btn:hover { opacity: 0.85; }

.prop-ficha-accion-btn--indigo { background: #eef2ff; color: #4338ca; }
.prop-ficha-accion-btn--green  { background: #ecfdf5; color: #065f46; }
.prop-ficha-accion-btn--amber  { background: #fffbeb; color: #92400e; }
