/* Modern HOA Management System Styles */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors - Improved contrast */
    --primary-color: #f3f4f6;
    --primary-dark: #6b7280;
    --primary-light: rgba(255, 255, 255, 0.1);
    --primary-light-gray:#c1c9d9;

    /* Secondary Colors */
    --secondary-color: #6b7280;
    --secondary-dark: #4b5563;
    --secondary-light: #9ca3af;

    /* Status Colors */
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;

    /* Background Colors - Better contrast */
    --light-bg: #ffffff;
    --dark-bg: #2e3237;
    --gray-bg: #f9fafb;
    --card-bg: rgba(23, 23, 23, 0.7);

    /* Text Colors - Improved readability */
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --text-white: #ffffff;
    --text-light: #f9fafb;

    /* Gray Scale - Better contrast ratios */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* White and Black */
    --white: #ffffff;
    --black: #000000;

    /* Shadows - Enhanced for better depth */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Border and Radius */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;

    /* Borders */
    --border-light: rgba(216, 220, 225);
    --border-medium: #d1d5db;
    --border-dark: #9ca3af;
    --border-subtle: #e2e8f0;

    /* Brand / surfaces (acciones y paneles) */
    --brand-color: #2563eb;
    --brand-hover: #1d4ed8;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--white);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.sidebar {
    width: 280px;
    background: var(--dark-bg);
    border-right: 1px solid var(--gray-700);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.main-content {
    background-color: var(--white);
    margin-left: 280px;
    min-height: 100vh;
}

.page-content {
    padding: 2rem;
}

/* Header - Desktop styles by default */
.header {
    border-bottom: 1px solid var(--gray-200);
    top: 0;           
    z-index: 100;  
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.3rem 2rem;
    display: flex; /* Flexbox para elementos en desktop */
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
}

/* Por defecto, ocultar elementos móviles */
.mobile-menu-button,
.header-main-row,
.header-info-row,
.header-logout-btn {
    display: none !important; 
}

/* Por defecto, mostrar elementos de escritorio y estilizarlos */
.header-page-title {
    display: block !important;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.desktop-user-menu {
    display: flex !important;
    align-items: center;
    gap: 1rem;
}


/* Navigation */
.nav-menu {
    list-style: none;
    padding: 1rem 0;
}

.nav-item {
    margin: 0.25rem 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-white);
    border-radius: var(--border-radius);
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    outline:none;
    background-color: var(--gray-500);
    color: var(--white);
    transform: translateX(4px);
    text-decoration: none;
}

.nav-link.active {
    background-color: var(--gray-600);
    color: var(--white);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s;
}

.nav-link i {
    font-size: 1.125rem;
    width: 20px;
}

.nav-link:active::after {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    opacity: 1;
    transition: 0s;
}

/* El destello de luz */


/* Cards */
.card {
    background: var(--gray-400);
    border-radius: var(--border-radius-lg);
    height: auto !important; /* Deja que el contenido dicte el alto */
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
}

.card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--gray-50);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    flex: 1;
    min-width: 0;
    padding: 2rem;
    background-color: var(--gray-200);
}

.card-body--table {
    padding: 0;
}

.card-body--table .table-responsive {
    padding: 0;
}

.card--table {
    overflow: visible;
}

.card-header--toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
}

.card-header__action {
    flex-shrink: 0;
    width: auto;
}

.card-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Contenedor para tablas responsive */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
    width: 100%;
}

.table-responsive .table {
    margin-top: 0;
    min-width: 720px;
}

.table-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
}

.btn-icon {
    min-width: 0;
    padding: 0.4rem 0.55rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-medium);
}

.table tbody tr:hover {
    background: var(--gray-50);
    transition: background-color 0.2s ease;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-success {
    background: #dcfce7;
    color: #166534;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-info {
    background: #f0f9ff;
    color: #0c4a6e;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--brand-color);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--brand-hover);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--gray-300);
    color: var(--text-primary);
    border: 2px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;

}

.btn-secondary:hover {
    background: var(--gray-200);
    border-color: var(--border-medium);
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
    text-decoration: none;
    outline: none;
}

.btn-outline-secondary {
    background: var(--white);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--text-primary);
    text-decoration: none;
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    background: var(--success-color);
    filter: brightness(0.9);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    background: var(--danger-color);
    filter: brightness(0.9);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-info {
    background: var(--info-color);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-info:hover {
    background: var(--info-color);
    filter: brightness(0.9);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-warning {
    background: var(--warning-color);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-warning:hover {
    background: var(--warning-color);
    color: var(--white);
    filter: brightness(0.92);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

/* Quick Action Buttons */
.quick-action-btn {
    background: var(--white);
    color: var(--text-primary);
    border: 2px solid var(--border-light);
    padding: 1.5rem 1rem;
    text-align: center;
    border-radius: var(--border-radius);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    
}

.quick-action-btn:hover {
    background: var(--primary-color);
    color: var(--gray-400);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.quick-action-btn i {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.quick-action-btn .btn-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-sm {
    padding: 0.55rem 1rem;
    font-size: 0.75rem;
    margin-left: 0rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-control {
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid var(--gray-300); 
    width: 100% !important;
    color: var(--black); 
    border-radius: var(--border-radius); 
    padding: 12px 15px 12px 15px !important;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.5px rgba(200, 211, 217, 1);
    background: var(--white);
}

.form-control:hover {
    border-color: var(--border-dark);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-select {
    border-radius: 8px !important;
    border: 1px solid var(--gray-300);
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    cursor: pointer;
}

.modal-header {
    display: flex; /* Alinea título y X en la misma línea */
    justify-content: space-between; /* Empuja la X al extremo derecho */
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    color: #666;
}


/* Grid Layout */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Stats Cards */
.stat-card {
    background: var(--primary-color);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-300)
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary); /* Same color as other labels */
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    color: var(--text-primary); /* Darker color for better contrast on gray background */
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Search and Filters */
.search-bar {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    width: 100%;
}

.list-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.list-toolbar__search {
    position: relative;
    width: 100%;
}

.list-toolbar__row {
    align-items: flex-end;
    display: flex;
    gap: 0.5rem;
}

.list-toolbar__filter {
    flex: 1 1 auto;
    min-width: 0;
}

.btn-compact,
.filters .btn-filter.btn-compact,
.list-toolbar .btn-filter.btn-compact {
    flex-shrink: 0;
    font-size: 0.75rem;
    height: 2.625rem;
    padding: 0 0.75rem;
    width: auto;
}

.filters .btn-filter,
.list-toolbar .btn-filter {
    background: var(--white);
    border: 1px solid var(--border-medium);
    box-shadow: none;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    height: 2.625rem;
    padding: 0 1rem;
    width: auto;
}

.filters .btn-filter:hover,
.list-toolbar .btn-filter:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--text-primary);
    transform: none;
}



.search-input {
    width: 100%;
    padding: 12px 15px 12px 45px !important;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.2s ease;

}

.search-input:focus {
    outline: none !important;
    border-color: var(--gray-300);
    box-shadow: 0 0 0 3px rgba(169, 173, 180, 0.1);
}

.search-icon {
    color: var(--gray-500);
    cursor: pointer;
    left: 1rem;
    pointer-events: auto;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.confirm-action-modal {
    z-index: 2500;
}

.confirm-action-modal__content {
    max-width: 420px;
}

.confirm-action-modal__content .modal-body p {
    color: var(--gray-700);
    line-height: 1.5;
}

.payment-form-error-line {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin: 0 0 0.75rem;
}

#propertyPaymentContent .filter-group.has-field-error label {
    color: var(--danger-color);
}

#propertyPaymentContent .filter-group.has-field-error input,
#propertyPaymentContent .filter-group.has-field-error select,
#propertyPaymentContent .filter-group.has-field-error textarea,
#propertyPaymentContent .filter-group.has-field-error .form-control,
#propertyPaymentContent .filter-group.has-field-error .form-select {
    border: 2px solid var(--danger-color) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18) !important;
}

.toast-notification {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 3000;
    min-width: 280px;
    max-width: min(420px, calc(100vw - 2rem));
    margin-bottom: 0;
    box-shadow: var(--shadow-lg);
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    /* Sin overflow-y aquí: si no, la barra de scroll “come” el border-radius a la derecha */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.modal-content > .modal-header {
    flex-shrink: 0;
}

/* header + body directo (detalle propiedad, pago, etc.) */
.modal-content > .modal-body {
    padding: 2rem;
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
}

/* header + form + body + footer (crear / editar) */
.modal-content > form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.modal-content > form > .modal-body {
    padding: 2rem;
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
}

.modal-content > form > .modal-footer {
    flex-shrink: 0;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 4px solid;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.alert-dismissible {
    padding-right: 2.75rem;
}

.alert .btn-close {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0.55;
    padding: 0;
    position: absolute;
    right: 0.85rem;
    top: 0.7rem;
}

.alert .btn-close::before {
    content: "\00d7";
}

.alert .btn-close:hover {
    opacity: 1;
}

.alert--hiding {
    opacity: 0;
    transform: translateY(-0.35rem);
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-left-color: var(--success-color);
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: var(--danger-color);
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-left-color: var(--warning-color);
}

.alert-info {
    background: #f0f9ff;
    color: #0c4a6e;
    border-left-color: var(--info-color);
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--gray-300);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    .main-content {
        margin-left: 240px;
    }
}

/* Estilos para pantallas mayores a 768px (Desktop) */
@media (min-width: 769px) {
    /* Ocultar elementos específicos de móvil */
    .mobile-menu-button,
    .header-info-row,
    .header-logout-btn {
        display: none !important; 
    }

    .header-main-row {
        display: block !important;
        flex: 0 1 auto;
        width: auto;
    }

    /* Mostrar y estilizar elementos de escritorio */
    .header-page-title {
        display: block !important;
        color: var(--text-primary);
        font-size: 1.5rem;
        font-weight: 600;
        margin: 0;
    }

    .desktop-user-menu {
        display: flex !important;
        align-items: center;
        gap: 1rem;
    }

    /* Asegurar que el header de escritorio tenga su diseño original */
    .header {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 1.3rem 2rem !important; 
    }
}

/* Styles for screens smaller than 768px (Mobile) */
@media (max-width: 768px) {
    /* Ocultar elementos de desktop en móvil */
    .desktop-user-menu {
        display: none !important;
    }

    /* Mostrar y estilizar las filas específicas de móvil */
    .header-main-row {
        display: flex !important; 
        width: 100%;
        justify-content: space-between; 
        align-items: center;
    }

    .header-logout-btn {
        display: inline-flex !important;
    }

    .header-info-row {
        display: flex !important;
        width: 100%;
        justify-content: flex-start; 
        align-items: center;
        margin-top: 0.25rem; 
    }

    .header {
        padding: 1rem; 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 0.5rem; 
        position: relative; 
    }

    .header-main-row .header-page-title {
        font-size: 1.2rem; 
        margin: 0;
        flex-grow: 1; 
        text-align: center; 
    }

    .header-logout-btn {
        display: inline-flex; 
        padding: 0.4rem 0.8rem; 
        font-size: 0.7rem; 
        margin-left: 0; 
    }

    .header-info-row span {
        font-size: 0.8rem; 
    }

    .mobile-menu-button {
        display: block !important; 
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--text-primary);
        cursor: pointer;
        padding: 0;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem; 
    }

    .page-content {
        padding: 1rem;
    }

    .btn {
        box-sizing: border-box;
        max-width: 100%;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .filters {
        flex-direction: column; 
        align-items: stretch; 
        gap: 1rem; 
    }

    .filter-group {
        min-width: unset; 
        width: 100%; 
    }

    .list-toolbar__row {
        align-items: flex-end;
        flex-direction: row;
    }

    .list-toolbar__filter {
        width: auto;
    }

    .card-header--toolbar {
        flex-direction: row;
    }

    .card-header--toolbar .card-header__action {
        margin-left: auto;
        width: auto;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%; 
        max-width: 280px; 
    }

    .main-content {
        padding: 0.5rem; 
    }

    /* Overlay cuando el sidebar está abierto en móvil */
    body.sidebar-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999; 
    }
}

/* Financial report (screen + print) */
.accounting-report-page {
    max-width: 100%;
}

.page-back {
    margin-bottom: 1rem;
}

.page-back__link {
    align-items: center;
    color: var(--gray-600);
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 500;
    gap: 0.35rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.page-back__link:hover {
    color: var(--brand-color);
    text-decoration: none;
}

.financial-report-panel {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.financial-report-header {
    margin-bottom: 1.25rem;
}

.financial-report-header--toolbar {
    align-items: flex-start;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin-bottom: 0;
    padding: 1.75rem 2rem 1.5rem;
}

.financial-report-header__text {
    min-width: 0;
}

.financial-report-actions {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.financial-report-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
}

.financial-report-meta {
    color: var(--gray-500);
    font-size: 0.9375rem;
    margin: 0 0 0.5rem;
}

.financial-report-status-badge {
    border-radius: 9999px;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-top: 0.35rem;
    padding: 0.25rem 0.65rem;
}

.financial-report-status-badge--ok {
    background: #ecfdf5;
    color: #047857;
}

.financial-report-status-badge--warn {
    background: #fffbeb;
    color: #b45309;
}

.financial-report-body {
    padding: 1.5rem 2rem 2rem;
}

.financial-report-accounts {
    align-items: start;
    gap: 1rem;
}

.financial-report .card.financial-report-account-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    box-shadow: none;
    margin-bottom: 0;
}

.financial-report .card.financial-report-account-card .card-header {
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.875rem 1.25rem;
}

.financial-report .card.financial-report-account-card .card-body {
    background: var(--surface);
    padding: 0.75rem 1.25rem 1.25rem;
}

.financial-report-subheading {
    color: var(--gray-600);
    font-size: 0.8125rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.financial-report-subheading:not(:first-child) {
    margin-top: 1rem;
}

.financial-report-table--compact {
    margin-top: 0;
}

.financial-report-summary-section {
    border-top: 1px solid var(--border-subtle);
    margin-top: 1.5rem;
    padding-top: 1.25rem;
}

.financial-report-summary-section .financial-report-summary {
    gap: 0.75rem 2rem;
    margin-bottom: 0.75rem;
}

.financial-report-summary-section .financial-report-footnote {
    margin: 0;
}

.financial-report-kpis {
    gap: 1rem;
    padding: 1.5rem 2rem 0;
}

.financial-report-kpis--annual {
    padding: 0 0 1.5rem;
}

.financial-report .stat-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-left-width: 4px;
    box-shadow: none;
    padding: 1.25rem 1.5rem;
    text-align: left;
}

.financial-report .stat-card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
    transform: none;
}

.financial-report .stat-card--expected {
    border-left-color: var(--gray-400);
}

.financial-report .stat-card--collected {
    border-left-color: var(--success-color);
}

.financial-report .stat-card--outstanding {
    border-left-color: var(--warning-color);
}

.financial-report .stat-card--rate {
    border-left-color: var(--brand-color);
}

.financial-report .stat-value {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    margin-bottom: 0.35rem;
}

.financial-report .stat-label {
    color: var(--gray-500);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
}

.financial-report-empty-state {
    align-items: center;
    background: var(--surface-muted);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--border-radius);
    color: var(--gray-500);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 2rem 0;
    padding: 2rem 1.5rem;
    text-align: center;
}

.financial-report-empty-state i {
    color: var(--gray-400);
    font-size: 1.5rem;
}

.financial-report-empty-state p {
    font-size: 0.9375rem;
    margin: 0;
    max-width: 28rem;
}

.financial-report-empty-state--inline {
    margin: 0;
}

.financial-report-section {
    border-top: 1px solid var(--border-subtle);
    margin-top: 1.5rem;
}

.financial-report .card.financial-report-section {
    border-top: none;
    margin-top: 0;
}

.financial-report-section__header {
    align-items: center;
    background: var(--surface-muted);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2rem;
}

.financial-report-section__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.financial-report-section__subtitle {
    color: var(--text-muted, #64748b);
    font-size: 0.8125rem;
    margin: 0.25rem 0 0;
}

.financial-report-section--period,
.financial-report-section--cash {
    margin-bottom: 1.25rem;
}

.financial-report-kpis--cash {
    margin-bottom: 0.75rem;
}

.financial-report .stat-sublabel {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.15rem;
    opacity: 0.85;
}

.financial-report-note {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 0.5rem;
    color: #92400e;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
}

.financial-report-note p {
    margin: 0;
}

.financial-report-details {
    margin-top: 1rem;
}

.financial-report-details summary {
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary, #2563eb);
    padding: 0.35rem 0;
}

.financial-report-table--payments {
    margin-top: 0.5rem;
}

.financial-report-cell-meta {
    color: var(--text-muted, #64748b);
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.25rem;
}

.financial-report-section__body {
    padding: 1.5rem 2rem 2rem;
}

.financial-report-section__total {
    font-variant-numeric: tabular-nums;
    font-size: 1rem;
    font-weight: 700;
}

.financial-report-table {
    border-collapse: collapse;
    width: 100%;
}

.financial-report-table-wrap {
    max-width: none;
    overflow-x: auto;
    width: 100%;
}

.financial-report-table--dues {
    table-layout: fixed;
}

.financial-report-table--dues .col-month {
    text-align: left;
    width: 28%;
}

.financial-report-table--dues .col-amount {
    text-align: right;
    width: 24%;
}

.financial-report-table th,
.financial-report-table td {
    border-bottom: 1px solid var(--gray-100);
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
}

.financial-report-table th {
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.financial-report-table .amount {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.financial-report-table--dues thead th {
    background: #1e293b;
    border-bottom: none;
    color: #fff;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    padding: 0.75rem;
}

.financial-report-table--dues tbody td {
    padding: 0.75rem;
}

.financial-report-table--dues tfoot td {
    background: #ecfdf5;
    border-bottom: none;
    border-top: 2px solid var(--border-medium);
    color: var(--text-primary);
    font-weight: 700;
    padding-top: 0.85rem;
}

.financial-report-table--dues tbody tr.is-current-month {
    background: rgba(16, 185, 129, 0.08);
    font-weight: 600;
}

.financial-report-table--dues tbody tr.is-current-month td {
    border-bottom-color: rgba(16, 185, 129, 0.2);
}

.financial-report-badge {
    background: rgba(16, 185, 129, 0.12);
    border-radius: 9999px;
    color: #047857;
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-left: 0.5rem;
    padding: 0.15rem 0.5rem;
    text-transform: uppercase;
    vertical-align: middle;
}

.financial-report-summary {
    display: grid;
    gap: 0.5rem 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.financial-report-footnote,
.financial-report-empty {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Print Styles */
@media print {
    @page {
        margin: 1.2cm 1.5cm;
        size: A4 portrait;
    }

    .sidebar,
    .btn,
    .modal,
    .no-print,
    .page-header,
    .mobile-header {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    body.print-report-active * {
        visibility: hidden;
    }

    body.print-report-active .financial-report-print-target,
    body.print-report-active .financial-report-print-target * {
        visibility: visible;
    }

    body.print-report-active .financial-report-print-target {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    body.print-report-active .financial-report-print-target .no-print {
        display: none !important;
        visibility: hidden !important;
    }

    .financial-report-print-target .card,
    .card {
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 0.75rem;
    }

    .financial-report-print-target .grid,
    .financial-report-print-target .grid-2,
    .financial-report-print-target .grid-3,
    .financial-report-print-target .grid-4 {
        display: block !important;
    }

    .financial-report-print-target .stat-card {
        border: 1px solid #cbd5e1;
        box-shadow: none;
        margin-bottom: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .financial-report-header {
        border-bottom: 2px solid #111827;
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
    }

    .financial-report-title {
        font-size: 1.35rem;
        font-weight: 700;
        margin: 0 0 0.35rem;
        color: #111827 !important;
    }

    .financial-report-meta {
        color: #374151 !important;
        font-size: 0.95rem;
        margin: 0;
    }

    .financial-report-status {
        color: #065f46 !important;
        font-size: 0.85rem;
        font-weight: 600;
        margin: 0.35rem 0 0;
    }

    .financial-report-section {
        margin-bottom: 1rem;
    }

    .financial-report-section__header {
        align-items: center;
        border-bottom: 1px solid #cbd5e1;
        display: flex;
        justify-content: space-between;
        margin-bottom: 0.5rem;
        padding-bottom: 0.35rem;
    }

    .financial-report-section__title {
        font-size: 1rem;
        font-weight: 700;
        margin: 0;
        color: #111827 !important;
    }

    .financial-report-section__total {
        font-size: 0.95rem;
        font-weight: 700;
        color: #111827 !important;
    }

    .financial-report-table {
        border-collapse: collapse;
        font-size: 0.85rem;
        width: 100%;
    }

    .financial-report-table th,
    .financial-report-table td {
        border-bottom: 1px solid #e5e7eb;
        padding: 0.35rem 0;
        vertical-align: top;
    }

    .financial-report-table th {
        color: #6b7280 !important;
        font-size: 0.75rem;
        font-weight: 600;
        text-align: left;
        text-transform: uppercase;
    }

    .financial-report-table .amount,
    .financial-report-table .col-amount {
        font-variant-numeric: tabular-nums;
        text-align: right;
        white-space: nowrap;
    }

    .financial-report-table--dues {
        table-layout: fixed;
    }

    .financial-report-summary {
        border-top: 2px solid #111827;
        display: grid;
        gap: 0.35rem 1.5rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 1rem;
        padding-top: 0.75rem;
    }

    .financial-report-summary__item {
        color: #111827 !important;
        font-size: 0.9rem;
    }

    .financial-report-footnote {
        color: #6b7280 !important;
        font-size: 0.8rem;
        margin-top: 0.75rem;
    }

    .financial-report-empty {
        color: #6b7280 !important;
        font-size: 0.85rem;
        margin: 0;
    }
}

/* Utility Classes for Better Readability */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-white { color: var(--text-white); }

.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--secondary-color); }
.bg-light { background-color: var(--gray-bg); }
.bg-white { background-color: var(--white); }

.font-weight-light { font-weight: 300; }
.font-weight-normal { font-weight: 400; }
.font-weight-medium { font-weight: 500; }
.font-weight-semibold { font-weight: 600; }
.font-weight-bold { font-weight: 700; }

/* Improved Focus States */
*:focus {
    outline: 1px solid var(--gray-200);
    outline-offset: 2px;
}

/* Better Link Styles */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* ---------- Property detail (scoped; no change to global layout) ---------- */
.property-detail-page .nav.property-detail-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid var(--border-medium);
}
.property-detail-page .property-detail-tabs .nav-item {
    margin: 0;
}
.property-detail-page .property-detail-tabs .nav-link {
    display: block;
    margin: 0;
    padding: 0.65rem 1.1rem;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    font-weight: 500;
    cursor: pointer;
    transform: none;
    box-shadow: none;
    text-decoration: none;
}
.property-detail-page .property-detail-tabs .nav-link:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}
.property-detail-page .property-detail-tabs .nav-link.active {
    background: var(--white);
    color: var(--text-primary);
    border-color: var(--border-medium);
    border-bottom-color: var(--white);
    margin-bottom: -1px;
}
.property-detail-page .tab-content {
    background: var(--white);
    border: 1px solid var(--border-medium);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}
.property-detail-page .tab-pane {
    display: none;
}
.property-detail-page .tab-pane.active {
    display: block;
}
/* Cabecera: meta en una línea + saldo sin recuadro */
.property-detail-page .property-detail-overview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.property-detail-page .property-detail-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}
.property-detail-page .property-detail-meta-chunk {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    white-space: nowrap;
}
.property-detail-page .property-detail-meta-chunk .text-muted {
    font-size: 0.8rem;
    font-weight: 500;
}
.property-detail-page .property-detail-unit-num {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}
.property-detail-page .property-detail-owner-name {
    font-weight: 600;
    color: var(--text-secondary);
}
.property-detail-page .property-detail-meta-dot {
    color: var(--gray-400);
    font-weight: 700;
    user-select: none;
}
.property-detail-page .property-detail-type-chip {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}
.property-detail-page .property-detail-balance {
    padding-top: 0.25rem;
    border-top: 1px solid var(--gray-200);
}
.property-detail-page .property-detail-balance-label {
    margin: 0 0 0.35rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.property-detail-page .property-detail-balance-label--debt {
    color: var(--danger-color);
}
.property-detail-page .property-detail-balance-label--credit {
    color: var(--success-color);
}
.property-detail-page .property-detail-balance-label--ok {
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.95rem;
    font-weight: 600;
}
.property-detail-page .property-detail-balance-amount {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.property-detail-page .property-detail-balance-amount .balance-caption {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.85;
    margin-left: 0.25rem;
}
.property-detail-page .property-detail-balance-amount--secondary {
    font-size: 1.35rem;
    font-weight: 600;
}
.property-detail-page .table-light th {
    background: var(--gray-100);
    color: var(--text-muted);
    font-weight: 600;
}
.property-detail-page .badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
}
.property-detail-page .bg-success-subtle { background: rgba(5, 150, 105, 0.15); color: var(--success-color); }
.property-detail-page .bg-warning-subtle { background: rgba(217, 119, 6, 0.15); color: var(--warning-color); }
.property-detail-page .bg-danger-subtle { background: rgba(220, 38, 38, 0.12); color: var(--danger-color); }
.property-detail-page .rounded-pill { border-radius: 999px; }

.property-detail-page .payment-status-actions {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.property-detail-page .payment-status-actions__row {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    flex-wrap: nowrap;
    gap: 0.35rem;
}

.property-detail-page #propertyPaymentsTable {
    margin-top: 0;
}

.property-detail-page #propertyPaymentsTable th,
.property-detail-page #propertyPaymentsTable td {
    padding: 0.55rem 0.75rem;
    vertical-align: middle;
}

.property-detail-page #propertyPaymentsTable th:nth-child(4),
.property-detail-page #propertyPaymentsTable td:nth-child(4),
.property-detail-page #propertyPaymentsTable th:nth-child(5),
.property-detail-page #propertyPaymentsTable td:nth-child(5),
.property-detail-page #propertyPaymentsTable td:nth-child(6) {
    white-space: nowrap;
}

.property-detail-page .payment-action-group {
    background: var(--white);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    display: inline-flex;
    overflow: hidden;
}

.property-detail-page .payment-action-group .btn {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--text-secondary);
    margin: 0;
}

.property-detail-page .payment-action-group .btn + .btn {
    border-left: 1px solid var(--border-subtle);
}

.property-detail-page .payment-action-group .btn:hover {
    background: var(--surface-muted);
    color: var(--text-primary);
    transform: none;
}

.property-detail-page .payment-action-group .btn-view-voucher span {
    margin-left: 0.35rem;
}

.property-detail-page .payment-action-group__danger:hover {
    background: rgba(220, 38, 38, 0.08);
    color: var(--danger-color);
}

.property-detail-page .payment-action-link {
    align-items: center;
    color: var(--text-secondary);
    display: inline-flex;
    font-size: 0.8125rem;
    font-weight: 500;
    gap: 0.3rem;
    text-decoration: none;
}

.property-detail-page .payment-action-link:hover {
    color: var(--brand-color);
    text-decoration: underline;
}

.property-detail-page .payment-action-link--ledger:hover {
    color: var(--success-color);
}

.voucher-preview-modal {
    max-width: min(920px, 96vw);
}

.voucher-preview-modal__body {
    background: var(--gray-50);
    padding: 1rem;
}

.voucher-preview-image {
    display: block;
    height: auto;
    margin: 0 auto;
    max-height: 75vh;
    max-width: 100%;
}

.voucher-preview-image[hidden],
.voucher-preview-frame[hidden] {
    display: none !important;
}

.voucher-preview-frame {
    background: var(--white);
    border: 0;
    min-height: 70vh;
    width: 100%;
}

.property-detail-page .btn-approve-dues-payment span {
    margin-left: 0.35rem;
}

.property-detail-page .btn-approve-dues-payment.is-loading {
    opacity: 0.9;
    pointer-events: none;
}

.property-detail-page .btn-approve-dues-payment.is-loading .loading {
    margin-right: 0.35rem;
    vertical-align: middle;
}

.property-detail-page .property-detail-ledger-link span {
    margin-left: 0.35rem;
}

/* Libro mayor: fila señalada desde detalle de pago (#ledger-txn-<id>) */
tr.ledger-row--highlight {
    outline: 2px solid var(--info-color);
    background-color: rgba(8, 145, 178, 0.12);
    box-shadow: inset 3px 0 0 0 var(--info-color);
}

/* Listas: fila resaltada (?highlight=<pk>) — propietarios o propiedades */
#ownersTable tbody tr.table-row--highlight,
#propertiesTable tbody tr.table-row--highlight {
    outline: 2px solid var(--info-color);
    background-color: rgba(8, 145, 178, 0.12);
    box-shadow: inset 3px 0 0 0 var(--info-color);
}

/* Enlace desde detalle de propietario → listado de propiedades */
a.property-unit-to-list-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--info-color);
    text-underline-offset: 2px;
}
a.property-unit-to-list-link:hover {
    color: var(--info-color);
}

.property-detail-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 0.5rem;
}

/* Página completa de detalle: panel sobre fondo blanco */
.property-detail-page[data-property-detail-full="1"] {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.5rem 1.5rem;
}

.property-detail-back-link {
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.property-detail-back-link:hover,
.property-detail-back-link:focus {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

a.property-unit-link {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}

a.property-unit-link:hover {
    text-decoration: underline;
}

.property-payment-preview-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
}

.property-payment-preview-note p {
    margin: 0;
}

/* Filtros del historial de pagos (página completa) */
.property-payment-filters {
    padding: 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
}

.property-payment-filters__grid {
    align-items: end;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(11rem, 1.6fr) repeat(4, minmax(7rem, 1fr)) auto;
}

.property-payment-filters__grid .filter-group--search {
    min-width: 0;
}

.property-payment-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.property-payment-filters .form-label {
    margin-bottom: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.property-filter-input,
.property-filter-btn {
    width: 100%;
    min-height: 2.625rem;
    box-sizing: border-box;
}

.property-payment-filters .form-control,
.property-payment-filters .form-select {
    width: 100% !important;
    min-height: 2.625rem;
    height: 2.625rem;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem;
}

.property-payment-filters .form-select {
    padding-right: 2.25rem !important;
}

.property-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

.filter-group__label-spacer {
    visibility: hidden;
    height: 1.25rem;
    margin: 0;
    padding: 0;
}

/* Filtros de reportes contables */
.report-filters-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.report-filters-card .card-body {
    background: var(--surface);
    padding: 1rem 1.25rem;
}

.report-filters__grid {
    align-items: end;
    display: grid;
    gap: 0.75rem 1rem;
}

.report-filters__grid--monthly {
    grid-template-columns: minmax(220px, 2fr) minmax(96px, 120px) minmax(96px, 120px) max-content;
}

.report-filters__grid--monthly-compact {
    grid-template-columns: minmax(96px, 120px) minmax(96px, 120px) max-content;
}

.report-filters__grid--balance {
    grid-template-columns: minmax(220px, 2fr) minmax(180px, 220px) max-content;
}

.report-filters__grid--balance-compact {
    grid-template-columns: minmax(180px, 220px) max-content;
}

.report-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.report-filters .form-label {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0;
}

.report-filters .form-control,
.report-filters .form-select {
    box-sizing: border-box;
    font-size: 0.875rem;
    height: 2.625rem;
    min-height: 2.625rem;
    padding: 0.5rem 0.75rem !important;
    width: 100% !important;
}

.report-filters .form-select {
    padding-right: 2.25rem !important;
}

.report-filters .filter-group--action {
    justify-self: start;
}

.report-filters:not(.report-filters__grid) {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 100%;
}

.report-filters .filter-group--actions {
    margin-top: 0.25rem;
}

.report-filters .filter-group--actions .btn {
    box-sizing: border-box;
    justify-content: center;
    max-width: 100%;
    width: 100%;
}

.report-filters .filter-group--action .btn,
.report-filters .btn-filter {
    background: var(--white);
    border: 1px solid var(--border-medium);
    box-shadow: none;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    height: 2.625rem;
    min-width: 0;
    padding: 0 1rem;
    white-space: nowrap;
    width: auto;
}

.report-filters .filter-group--action .btn:hover,
.report-filters .btn-filter:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    box-shadow: none;
    color: var(--text-primary);
    transform: none;
}

@media (max-width: 768px) {
    .report-filters__grid--monthly,
    .report-filters__grid--balance {
        grid-template-columns: 1fr;
    }

    .report-filters .filter-group--action .btn,
    .report-filters .filter-group--actions .btn {
        justify-content: center;
        text-align: center;
        white-space: normal;
        width: 100%;
    }

    .accounting-panel__header {
        align-items: stretch;
        flex-direction: column;
    }

    .accounting-panel__header > .btn {
        justify-content: center;
        width: 100%;
    }

    .accounting-panel__body {
        padding: 1rem;
    }

    .financial-report-header--toolbar {
        flex-direction: column;
        padding: 1.25rem 1.25rem 1rem;
    }

    .financial-report-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .financial-report-kpis {
        padding: 1.25rem 1.25rem 0;
    }

    .financial-report-empty-state {
        margin: 1.25rem 1.25rem 0;
    }

    .financial-report-body {
        padding: 1.25rem;
    }

    .financial-report-section__header,
    .financial-report-section__body {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Formulario registrar/editar pago (modal) */
.owner-payment-form .payment-form-filters,
#propertyPaymentContent .payment-form-filters,
#paymentForm .payment-form-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.owner-payment-form .payment-form-filters--amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.owner-payment-form .payment-form-filters--full {
    grid-template-columns: 1fr;
}

.owner-payment-form .form-control[readonly] {
    background: #e9ecef;
}

#propertyPaymentContent .payment-form-filters--full,
#paymentForm .payment-form-filters--full {
    grid-template-columns: 1fr;
}

.owner-payment-form .payment-form-filters .filter-group,
#propertyPaymentContent .payment-form-filters .filter-group,
#paymentForm .payment-form-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.owner-payment-form .payment-form-filters .form-label,
#propertyPaymentContent .payment-form-filters .form-label,
#paymentForm .payment-form-filters .form-label {
    margin-bottom: 0;
    font-size: 0.8125rem;
}

.owner-payment-form .payment-form-filters .form-control,
.owner-payment-form .payment-form-filters .form-select,
#propertyPaymentContent .payment-form-filters .form-control,
#propertyPaymentContent .payment-form-filters .form-select,
#propertyPaymentContent .payment-form-filters textarea,
#paymentForm .payment-form-filters .form-control,
#paymentForm .payment-form-filters .form-select,
#paymentForm .payment-form-filters textarea {
    width: 100% !important;
    min-height: 2.625rem;
    box-sizing: border-box;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem;
}

#propertyPaymentContent .payment-form-filters textarea,
#paymentForm .payment-form-filters textarea {
    min-height: 4.5rem;
    height: auto;
}

.owner-payment-form .payment-form-filters .form-select,
#propertyPaymentContent .payment-form-filters .form-select,
#paymentForm .payment-form-filters .form-select {
    padding-right: 2.25rem !important;
}

#propertyPaymentsTable tr[hidden] {
    display: none;
}

/* Modal detalle: espaciado más compacto */
.property-details-modal {
    max-width: 920px;
}

#propertyDetailsModal .property-detail-page .tab-content {
    padding: 1rem !important;
}

#propertyDetailsModal .property-detail-page .property-detail-overview {
    gap: 0.75rem;
}

#propertyDetailsModal .property-payment-preview-note {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

#propertyDetailsModal .property-payment-preview-note .property-detail-full-link i {
    margin-left: 0.35rem;
}

.property-payment-row--open {
    cursor: pointer;
}

.property-payment-row--open:hover {
    background: var(--surface-muted);
}

@media (max-width: 992px) {
    .property-payment-filters__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .property-payment-filters__grid .filter-group--action {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .property-payment-filters__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .owner-payment-form .payment-form-filters,
    .owner-payment-form .payment-form-filters--amounts,
    #propertyPaymentContent .payment-form-filters,
    #paymentForm .payment-form-filters {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .property-payment-filters__grid {
        grid-template-columns: 1fr;
    }
}

/* Panel de contabilidad */
.accounting-dashboard-kpis {
    gap: 1rem;
}

.home-dashboard .accounting-dashboard-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .home-dashboard .accounting-dashboard-kpis {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

.accounting-dashboard .stat-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-left-width: 4px;
    box-shadow: none;
    padding: 1.25rem 1.5rem;
    text-align: left;
}

.accounting-dashboard a.stat-card {
    color: inherit;
    display: block;
    text-decoration: none;
}

.accounting-dashboard .stat-card:hover {
    border-color: var(--brand-color);
    box-shadow: var(--shadow-sm);
    transform: none;
}

.accounting-dashboard .stat-card--expected { border-left-color: var(--gray-400); }
.accounting-dashboard .stat-card--collected { border-left-color: var(--success-color); }
.accounting-dashboard .stat-card--outstanding { border-left-color: var(--warning-color); }
.accounting-dashboard .stat-card--rate { border-left-color: var(--brand-color); }
.accounting-dashboard .stat-card--debtors { border-left-color: var(--danger-color); }

.property-detail-page .tab-content.owner-statement-panel {
    padding: 1.15rem 1.25rem 1.35rem;
}

.owner-year-filter {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.owner-year-filter .form-label {
    margin: 0;
}

.owner-year-filter .form-select {
    max-width: 8rem;
}

.owner-year-filter .form-control {
    max-width: 14rem;
}

.property-detail-page .property-detail-tabs .nav-link[data-hint] {
    position: relative;
}

.property-detail-page .property-detail-tabs .nav-link[data-hint]:hover::after,
.property-detail-page .property-detail-tabs .nav-link[data-hint]:focus-visible::after {
    content: attr(data-hint);
    position: absolute;
    left: 50%;
    top: calc(100% + 0.45rem);
    transform: translateX(-50%);
    padding: 0.3rem 0.55rem;
    border-radius: 6px;
    background: var(--gray-900);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    z-index: 2;
    pointer-events: none;
}

.owner-statement-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.owner-statement-filters button {
    border: 1px solid var(--border-medium);
    background: var(--white);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.8125rem;
    cursor: pointer;
}

.owner-statement-filters button.active {
    background: var(--brand-color);
    border-color: var(--brand-color);
    color: var(--white);
}

.owner-payment-toolbar {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.owner-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 7.5rem;
}

.owner-filter-field .form-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0;
}

.owner-filter-field .form-select {
    min-width: 7.5rem;
}

.owner-filter-field--search {
    flex: 1 1 14rem;
    max-width: 18rem;
}

.owner-filter-field--status {
    margin-left: auto;
}

.owner-payment-toolbar .owner-statement-filters {
    margin-bottom: 0;
}

.owner-payment-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.owner-payment-legend,
.owner-payment-item {
    align-items: center;
    display: grid;
    gap: 0.75rem 1.25rem;
    grid-template-columns: minmax(11rem, 1.1fr) 6.5rem minmax(8rem, 1.4fr) auto 5.5rem;
}

.owner-payment-legend {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0 0.95rem;
    text-transform: uppercase;
}

.owner-payment-legend span:nth-child(2),
.owner-payment-item__amount,
.owner-payment-legend span:nth-child(5),
.owner-payment-item__receipt {
    text-align: right;
}

.owner-payment-item {
    background: var(--white);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.85rem 0.95rem;
}

.owner-payment-item__pay {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.owner-payment-item__pay time {
    color: var(--text-primary);
    font-weight: 600;
}

.owner-payment-item__method,
.owner-payment-item__ref {
    color: var(--text-muted);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.owner-payment-item__amount {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.owner-payment-item__months {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.owner-month-chip {
    background: var(--gray-100);
    border-radius: 999px;
    color: var(--gray-700);
    font-size: 0.72rem;
    line-height: 1.3;
    padding: 0.15rem 0.45rem;
}

.owner-month-chip--more {
    background: var(--gray-200);
    font-weight: 600;
}

.owner-month-chip--abono {
    background: rgba(217, 119, 6, 0.12);
    color: var(--warning-color);
}

.owner-payment-item[hidden],
.owner-payment-legend[hidden] {
    display: none !important;
}

.owner-receipt-link {
    align-items: center;
    color: var(--text-primary);
    display: inline-flex;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    gap: 0.35rem;
    justify-content: flex-end;
    text-decoration: none;
}

.owner-receipt-link:hover {
    color: var(--brand-color);
}

.owner-receipt-link i {
    color: var(--danger-color);
    font-size: 0.85rem;
}

@media (max-width: 800px) {
    .owner-payment-legend {
        display: none;
    }

    .owner-payment-item {
        align-items: start;
        grid-template-columns: 1fr auto;
    }

    .owner-payment-item__months,
    .owner-payment-item__status {
        grid-column: 1 / -1;
    }

    .owner-payment-item__receipt {
        justify-self: end;
    }
}

.owner-expense-chart {
    height: 240px;
    margin-bottom: 1.5rem;
}

.owner-expense-files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.owner-collection {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
}

.owner-collection__chart {
    height: 220px;
}

.owner-collection__kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 800px) {
    .owner-collection,
    .owner-collection__kpis {
        grid-template-columns: 1fr;
    }
}

.accounting-dashboard .stat-value {
    font-size: 1.75rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    margin-bottom: 0.35rem;
}

.accounting-dashboard .stat-label {
    color: var(--gray-500);
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
    text-transform: none;
}

.accounting-panel {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.accounting-dashboard-split {
    align-items: start;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.accounting-dashboard-split .accounting-panel {
    margin-top: 0;
}

.accounting-panel__header {
    align-items: center;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
}

.accounting-panel__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.accounting-panel__subtitle {
    color: var(--gray-500);
    display: block;
    font-size: 0.8125rem;
    margin-top: 0.15rem;
}

.accounting-panel__body {
    background: var(--surface);
    padding: 1.25rem 1.5rem;
}

.accounting-panel__body--flush {
    padding: 0;
}

.accounting-panel__body--flush .accounting-table {
    margin-top: 0;
}

.accounting-chart-wrap {
    height: 300px;
    position: relative;
}

.accounting-table {
    box-shadow: none;
    margin-top: 0;
}

.accounting-table th.amount,
.accounting-table td.amount {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.accounting-table__link {
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
}

.accounting-table__link:hover {
    color: var(--brand-color);
    text-decoration: underline;
}

.accounting-table__danger {
    color: var(--danger-color);
    font-weight: 600;
}

.accounting-subheading {
    color: var(--gray-600);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin: 0 0 0.75rem;
    text-transform: uppercase;
}

.accounting-subheading:not(:first-child) {
    margin-top: 1.25rem;
}

.accounting-balance-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.accounting-balance-row {
    align-items: center;
    background: var(--surface-muted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.625rem 0.875rem;
}

.accounting-zero-accounts {
    margin-top: 0.75rem;
}

.accounting-zero-accounts summary {
    color: var(--gray-500);
    cursor: pointer;
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.accounting-balance-row__amount {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
}

.accounting-empty {
    color: var(--gray-500);
    margin: 0;
    padding: 2rem 1rem;
    text-align: center;
}

.accounting-empty--inline {
    padding: 0.5rem 0 1rem;
    text-align: left;
}

.accounting-report-filter {
    margin-bottom: 1.25rem;
    max-width: 420px;
}

.accounting-report-context {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin: 0 0 1.25rem;
}

.accounting-report-tiles {
    gap: 1rem;
}

.accounting-report-tile {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    text-align: center;
}

.accounting-report-tile__icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.accounting-report-tile__icon--monthly { color: var(--brand-color); }
.accounting-report-tile__icon--caney { color: var(--info-color); }
.accounting-report-tile__icon--balance { color: var(--success-color); }
.accounting-report-tile__icon--export { color: var(--warning-color); }

.accounting-report-tile__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.accounting-report-tile__desc {
    color: var(--gray-500);
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}

.accounting-report-tile__footnote {
    font-size: 0.8125rem;
    margin: 0.75rem 0 0;
}

.accounting-report-tile__footnote a {
    color: var(--gray-500);
}

.accounting-report-tile__footnote a:hover {
    color: var(--brand-color);
}

.accounting-placeholder {
    color: var(--gray-500);
    padding: 2.5rem 1rem;
    text-align: center;
}

.accounting-placeholder i {
    color: var(--gray-400);
    display: block;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.accounting-placeholder h3 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.accounting-placeholder p {
    margin: 0 0 0.35rem;
}

.accounting-placeholder__note {
    font-size: 0.8125rem;
}

@media (max-width: 768px) {
    .accounting-dashboard-split {
        grid-template-columns: 1fr;
    }
}

/* Panel de control (inicio) */
.dashboard-finance-kpis {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-finance-kpi {
    background: var(--surface-muted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    padding: 1.1rem 1.15rem 0.85rem;
    text-align: left;
}

.dashboard-finance-kpi--collected {
    border-left: 4px solid var(--success-color);
}

.dashboard-finance-kpi--outstanding {
    border-left: 4px solid var(--warning-color);
}

.dashboard-finance-kpi--expected {
    border-left: 4px solid var(--gray-400);
}

.dashboard-finance-kpi__value {
    font-size: 1.5rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.35rem;
}

.dashboard-finance-kpi--collected .dashboard-finance-kpi__value {
    color: var(--success-color);
}

.dashboard-finance-kpi--outstanding .dashboard-finance-kpi__value {
    color: var(--warning-color);
}

.dashboard-finance-kpi--expected .dashboard-finance-kpi__value {
    color: var(--text-primary);
}

.dashboard-finance-kpi__label {
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.dashboard-finance-kpi__total {
    border-top: 1px solid var(--border-subtle);
    color: var(--gray-500);
    font-size: 0.75rem;
    margin-top: 0.85rem;
    padding-top: 0.6rem;
}

.home-dashboard .dashboard-inbox {
    margin-bottom: 1.5rem;
}

.dashboard-shortcuts__grid {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-shortcut {
    align-items: center;
    border-right: 1px solid var(--border-subtle);
    color: inherit;
    display: flex;
    gap: 0.85rem;
    min-height: 4.5rem;
    padding: 0.9rem 1.1rem;
    text-decoration: none;
    transition: background 0.15s ease;
}

.dashboard-shortcut:last-child {
    border-right: 0;
}

.dashboard-shortcut:hover {
    background: var(--surface-muted);
    color: inherit;
    text-decoration: none;
}

.dashboard-shortcut__icon {
    align-items: center;
    background: var(--surface-muted);
    border-radius: 0.65rem;
    color: var(--primary-color, #2563eb);
    display: inline-flex;
    flex-shrink: 0;
    font-size: 1rem;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

.dashboard-shortcut__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.dashboard-shortcut__title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
}

.dashboard-shortcut__hint {
    color: var(--gray-500);
    font-size: 0.75rem;
    line-height: 1.3;
}

@media (max-width: 992px) {
    .dashboard-shortcuts__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-shortcut:nth-child(2) {
        border-right: 0;
    }
}

@media (max-width: 640px) {
    .dashboard-shortcuts__grid {
        grid-template-columns: 1fr;
    }

    .dashboard-shortcut {
        border-right: 0;
        border-bottom: 1px solid var(--border-subtle);
    }

    .dashboard-shortcut:last-child {
        border-bottom: 0;
    }
}

.property-detail-page .property-reassign {
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.property-detail-page .property-reassign summary {
    cursor: pointer;
    font-weight: 600;
}

.home-dashboard__actions {
    gap: 1rem;
}

.home-dashboard .quick-action-btn:hover {
    background: rgba(37, 99, 235, 0.06);
    border-color: var(--brand-color);
    color: var(--brand-color);
    transform: translateY(-1px);
}

.visually-hidden {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.page-breadcrumb {
    align-items: center;
    color: var(--gray-500);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    gap: 0.35rem 0.5rem;
    margin-bottom: 1rem;
}

.page-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.page-breadcrumb a:hover {
    color: var(--brand-color);
    text-decoration: underline;
}

.form-card {
    max-width: 640px;
}

.form-card__actions {
    display: flex;
    gap: 0.75rem;
}

.form-help {
    color: var(--gray-500);
    display: block;
    font-size: 0.8125rem;
    margin-top: 0.35rem;
}

.form-error {
    color: var(--danger-color);
    font-size: 0.8125rem;
    margin-top: 0.35rem;
}

.owner-edit-units {
    color: var(--gray-600);
    font-size: 0.875rem;
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}

.owner-edit-units li {
    margin-bottom: 0.35rem;
}

.owner-edit-units a {
    color: var(--text-secondary);
    text-decoration: none;
}

.owner-edit-units a:hover {
    color: var(--brand-color);
    text-decoration: underline;
}

/* Detalle de condominio */
.condominio-detail-page .accounting-panel:first-of-type {
    margin-top: 0;
}

.condominio-detail-meta {
    align-items: center;
    color: var(--gray-600);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    gap: 0.35rem 0.5rem;
    margin-top: 0.5rem;
}

.condominio-detail-meta__sep {
    color: var(--gray-300);
}

.condominio-detail-description {
    color: var(--gray-500);
    font-size: 0.875rem;
    font-style: italic;
    margin: 0.65rem 0 0;
}

.condominio-detail-muted {
    color: var(--gray-500);
}

.condominio-detail-panel-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 1rem;
    text-align: center;
}

.condominio-detail-transactions {
    max-height: 420px;
    overflow-y: auto;
    padding: 0 !important;
}

.condominio-detail-txn-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.condominio-detail-txn {
    align-items: flex-start;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
}

.condominio-detail-txn:last-child {
    border-bottom: none;
}

.condominio-detail-txn__main {
    min-width: 0;
}

.condominio-detail-txn__desc {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
}

.condominio-detail-txn__date {
    color: var(--gray-500);
    font-size: 0.8125rem;
    margin-top: 0.15rem;
}

.condominio-detail-txn__amounts {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 0.15rem;
    text-align: right;
}

.condominio-detail-txn__debit {
    color: var(--danger-color);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.condominio-detail-txn__credit {
    color: var(--success-color);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.condominio-detail-settings-hint {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 1.25rem;
}

.condominio-detail-settings-grid {
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .condominio-detail-txn {
        flex-direction: column;
        gap: 0.5rem;
    }

    .condominio-detail-txn__amounts {
        align-items: flex-start;
        text-align: left;
    }
}

/* Relación de gastos: abono N/De y columna quitar fila */
.accounting-table .col-installment {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
}

.accounting-table .installment-pair {
    display: inline-flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.25rem;
}

.accounting-table .installment-pair .form-control--compact-num {
    width: 2.75rem !important;
    max-width: 2.75rem !important;
    min-width: 2.5rem !important;
    padding: 0.35rem 0.25rem !important;
    text-align: center;
    display: inline-block !important;
    flex: 0 0 auto;
}

.accounting-table .installment-pair__sep {
    color: var(--gray-500, #6b7280);
    font-size: 0.875rem;
    line-height: 1;
    user-select: none;
    flex: 0 0 auto;
}

.accounting-table td.col-amount-usd .form-control {
    width: 6.5rem !important;
    max-width: 6.5rem !important;
    margin-left: auto;
    display: inline-block !important;
    text-align: right;
}

.accounting-balance-list--live {
    transition: background-color 0.25s ease;
    border-radius: var(--radius-md, 0.5rem);
    background-color: rgba(59, 130, 246, 0.06);
}

.accounting-balance-row--emphasis {
    border-top: 1px solid var(--gray-200, #e5e7eb);
    padding-top: 0.35rem;
    margin-top: 0.15rem;
}

.expense-lines-tfoot td {
    border-top: 2px solid var(--gray-300, #d1d5db);
    background: var(--gray-50, #f9fafb);
}

.expense-section-subtotals__list {
    display: grid;
    gap: 0.35rem;
}

.expense-section-subtotals__item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.875rem;
}

.expense-section-subtotals__amount {
    font-variant-numeric: tabular-nums;
}

.accounting-table .col-row-delete {
    width: 1%;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.accounting-table .col-row-delete .btn-remove-expense-line {
    padding: 0.2rem 0.45rem;
    line-height: 1;
}

.accounting-table .expense-line-delete-field {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.accounting-table .col-row-delete input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    cursor: pointer;
}

/* Relación de gastos (detalle / edición) */
.accounting-panel__header--toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
}

.accounting-panel__header-text {
    min-width: 0;
}

.accounting-panel__header--toolbar .financial-report-status-badge {
    margin-left: 0.35rem;
    vertical-align: middle;
}

.financial-report-actions__form {
    display: inline-flex;
    margin: 0;
}

.accounting-panel--nested {
    background: var(--surface-muted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    box-shadow: none;
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
}

.accounting-balance-row--strong {
    background: #ecfdf5;
    border-color: rgba(16, 185, 129, 0.25);
    font-weight: 600;
}

.expense-report-summary {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    margin-bottom: 1.5rem;
}

.expense-report-collection__grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.expense-report-stat {
    background: var(--surface-muted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0.875rem;
}

.expense-report-stat__label {
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.expense-report-stat__value {
    font-size: 1.125rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.expense-report-stat__value--ok {
    color: var(--success-color);
}

.expense-report-stat__value--warn {
    color: var(--warning-color);
}

.expense-report-filter {
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1.5rem;
    max-width: 320px;
    padding-bottom: 1.25rem;
}

.expense-report-filter__row {
    display: flex;
    gap: 0.5rem;
}

.expense-report-section {
    margin-bottom: 1.5rem;
}

.expense-report-section:last-of-type {
    margin-bottom: 0;
}

.expense-report-table {
    margin-top: 0;
}

.expense-report-table th.amount,
.expense-report-table td.amount {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.expense-report-table__summary td {
    background: var(--surface-muted);
    border-top: 2px solid var(--border-medium);
    font-weight: 600;
}

.expense-report-table--compact th,
.expense-report-table--compact td {
    font-size: 0.875rem;
    padding: 0.65rem 0.75rem;
}

.expense-report-unit-preview__amount {
    font-size: 1rem;
    margin: 0 0 0.35rem;
}

.expense-report-unit-preview__due {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0;
}

.expense-report-notes {
    border-top: 1px solid var(--border-subtle);
    margin-top: 1.5rem;
    padding-top: 1.25rem;
}

.expense-report-notes p {
    color: var(--gray-600);
    margin: 0;
}

.expense-report-delivery {
    border-top: 1px solid var(--border-subtle);
    margin-top: 1.5rem;
    padding-top: 1.25rem;
}

.expense-report-delivery__stats {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0 0 1rem;
}

.expense-report-delivery__error {
    color: var(--danger-color);
    cursor: help;
}

.expense-report-hint {
    background: var(--surface-muted);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--border-radius);
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 1.5rem 0 0;
    padding: 1rem 1.25rem;
}

/* Edición de relación de gastos */
.expense-report-edit .accounting-subheading {
    margin-bottom: 0;
}

.expense-edit-kpis {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-bottom: 0.5rem;
}

.expense-report-stat--highlight {
    background: #ecfdf5;
    border-color: rgba(16, 185, 129, 0.25);
}

.expense-report-stat--highlight .expense-report-stat__value {
    color: var(--success-color);
}

.expense-edit-kpis-meta {
    color: var(--gray-500);
    font-size: 0.8125rem;
    margin: 0 0 1.25rem;
}

.expense-edit-kpis-meta span {
    font-variant-numeric: tabular-nums;
}

.expense-edit-alert {
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    line-height: 1.45;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
}

.expense-edit-alert--danger {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #991b1b;
}

.expense-edit-alert a {
    color: inherit;
    font-weight: 600;
}

.expense-edit-collapsible {
    background: var(--surface-muted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.expense-edit-collapsible--compact {
    margin-top: 0.75rem;
}

.expense-edit-collapsible summary {
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    list-style: none;
    padding: 0.75rem 1rem;
}

.expense-edit-collapsible summary::-webkit-details-marker {
    display: none;
}

.expense-edit-collapsible summary::before {
    content: '▸ ';
    color: var(--gray-500);
}

.expense-edit-collapsible[open] summary::before {
    content: '▾ ';
}

.expense-edit-collapsible__body {
    border-top: 1px solid var(--border-subtle);
    padding: 0.85rem 1rem 1rem;
}

.expense-edit-help {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.expense-report-filter--inline {
    border-bottom: none;
    margin-bottom: 0.75rem;
    max-width: none;
    padding-bottom: 0;
}

.expense-edit-meta {
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.expense-edit-meta__notes textarea {
    min-height: 2.625rem;
}

.expense-edit-section-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.expense-edit-th-hint {
    color: var(--gray-500);
    font-weight: 400;
}

.expense-line-row--error {
    background: rgba(220, 38, 38, 0.06);
}

.expense-line-row--error td {
    border-bottom-color: rgba(220, 38, 38, 0.12);
}

.expense-edit-field-error {
    color: var(--danger-color);
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.expense-edit-secondary-actions {
    margin-top: 1rem;
}

.expense-publish-box {
    background: var(--gray-50, #f8fafc);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
}

.expense-publish-box__title {
    font-size: 0.95rem;
    margin: 0 0 0.35rem;
}

.expense-publish-box__text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 0 0.75rem;
}

.expense-edit-footer {
    align-items: center;
    background: var(--surface);
    border-top: 1px solid var(--border-subtle);
    bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1.25rem;
    position: sticky;
    z-index: 5;
}

@media (max-width: 900px) {
    .expense-edit-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .expense-edit-footer {
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
        margin-left: -1.25rem;
        margin-right: -1.25rem;
        padding: 1rem 1.25rem;
    }

    .expense-edit-footer .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .expense-report-summary {
        grid-template-columns: 1fr;
    }

    .expense-report-collection__grid {
        grid-template-columns: 1fr;
    }

    .accounting-panel__header--toolbar {
        flex-direction: column;
    }

    .accounting-panel__header--toolbar .financial-report-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .doc-explorer {
        grid-template-columns: 1fr;
    }

    .doc-tree {
        max-height: none;
    }

    .doc-main__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .doc-main__header .financial-report-actions {
        justify-content: flex-start;
        width: 100%;
    }
}

/* Gestión de documentos */
.documents-page .list-toolbar {
    margin-bottom: 1rem;
}

.documents-page .list-toolbar .search-bar {
    margin-bottom: 0;
}

.documents-summary {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-lg);
    color: var(--gray-600);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.875rem;
    gap: 0.35rem 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1.25rem;
}

.documents-summary__item strong {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.documents-summary__sep {
    color: var(--gray-300);
}

.documents-explorer {
    margin-top: 0;
}

.doc-explorer {
    align-items: stretch;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 420px;
}

.doc-tree {
    background: var(--surface-muted);
    border-right: 1px solid var(--border-subtle);
    max-height: 72vh;
    overflow: auto;
    padding: 1rem 0.75rem;
}

.doc-tree__title {
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
    text-transform: uppercase;
}

.doc-tree__link {
    align-items: center;
    border-radius: 6px;
    color: var(--gray-700);
    display: flex;
    font-size: 0.875rem;
    gap: 0.5rem;
    line-height: 1.35;
    padding: 0.45rem 0.5rem;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.doc-tree__link:hover {
    background: var(--white);
    color: var(--brand-color);
}

.doc-tree__root.is-active,
.doc-tree-path__current {
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand-color);
    font-weight: 600;
}

.doc-tree-path {
    border-bottom: 1px solid var(--border-subtle);
    margin: 0.5rem 0 0.75rem;
    padding-bottom: 0.75rem;
}

.doc-tree-path__row {
    padding-left: calc(0.35rem + var(--depth, 1) * 0.75rem);
}

.doc-tree-path__link,
.doc-tree-path__current {
    align-items: center;
    border-radius: 6px;
    display: flex;
    font-size: 0.8125rem;
    gap: 0.45rem;
    line-height: 1.35;
    min-width: 0;
    padding: 0.35rem 0.45rem;
    word-break: break-word;
}

.doc-tree-path__link {
    color: var(--gray-700);
    text-decoration: none;
}

.doc-tree-path__link:hover {
    background: var(--white);
    color: var(--brand-color);
}

.doc-tree-path__current {
    border-radius: 6px;
}

.doc-tree-path__link i,
.doc-tree-path__current i {
    color: #f59e0b;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.doc-tree__parent {
    align-items: center;
    border: 1px dashed var(--border-subtle);
    border-radius: 6px;
    color: var(--gray-600);
    display: flex;
    font-size: 0.8125rem;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    padding: 0.45rem 0.5rem;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.doc-tree__parent:hover {
    background: var(--white);
    border-color: var(--gray-300);
    color: var(--brand-color);
}

.doc-tree__section-title {
    color: var(--gray-500);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
    padding: 0 0.5rem;
    text-transform: uppercase;
}

.doc-tree-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.doc-tree-list__link {
    align-items: center;
    border-radius: 6px;
    color: var(--gray-700);
    display: flex;
    font-size: 0.875rem;
    gap: 0.5rem;
    line-height: 1.35;
    padding: 0.4rem 0.5rem;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.doc-tree-list__link:hover {
    background: var(--white);
    color: var(--brand-color);
}

.doc-tree-list__link i {
    color: #f59e0b;
    flex-shrink: 0;
}

.doc-tree__hint {
    color: var(--gray-500);
    font-size: 0.8125rem;
    line-height: 1.4;
    margin: 0.25rem 0 0;
    padding: 0 0.5rem;
}

.doc-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.doc-breadcrumb {
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--gray-600);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    gap: 0.35rem;
    padding: 0.75rem 1.25rem;
}

.doc-breadcrumb a {
    color: var(--brand-color);
    text-decoration: none;
}

.doc-breadcrumb a:hover {
    text-decoration: underline;
}

.doc-breadcrumb__sep {
    color: var(--gray-400);
}

.doc-breadcrumb__current {
    color: var(--text-primary);
    font-weight: 600;
}

.doc-main__header {
    align-items: center;
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.doc-main__title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0;
}

.doc-main__header-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.doc-main__body {
    flex: 1;
    min-width: 0;
    padding: 1.25rem;
}

.doc-main__body .accounting-table {
    box-shadow: none;
}

.doc-main__body .table-responsive {
    margin-top: 0;
}

.doc-folder-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    margin-bottom: 1.25rem;
}

.doc-folder-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    position: relative;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.doc-folder-card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.doc-folder-card__link {
    align-items: center;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
    padding: 1.1rem 0.75rem 0.9rem;
    text-align: center;
    text-decoration: none;
}

.doc-folder-card__link i {
    color: #f59e0b;
    font-size: 1.75rem;
}

.doc-folder-card__name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
}

.doc-folder-card__actions {
    display: flex;
    gap: 0.15rem;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    right: 0.3rem;
    top: 0.3rem;
    transition: opacity 0.15s ease;
    z-index: 2;
}

.doc-folder-card:hover .doc-folder-card__actions,
.doc-folder-card:focus-within .doc-folder-card__actions {
    opacity: 1;
    pointer-events: auto;
}

.doc-folder-card__action {
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    color: var(--gray-600);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.625rem;
    height: 1.35rem;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: relative;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    width: 1.35rem;
}

.doc-folder-card__action:hover:not(:disabled) {
    background: var(--white);
    border-color: var(--gray-300);
    color: var(--brand-color);
}

.doc-folder-card__action:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.doc-folder-card__action[data-tip]:hover::after,
.doc-folder-card__action[data-tip]:focus-visible::after {
    background: var(--gray-800);
    border-radius: 4px;
    bottom: auto;
    color: var(--white);
    content: attr(data-tip);
    font-size: 0.625rem;
    font-weight: 500;
    left: 50%;
    line-height: 1.2;
    padding: 0.2rem 0.4rem;
    pointer-events: none;
    position: absolute;
    top: calc(100% + 0.2rem);
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 5;
}

.doc-system-tag {
    background: var(--surface-muted);
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
    color: var(--gray-500);
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.1rem 0.45rem;
    text-transform: uppercase;
}

.doc-system-tag--inline {
    margin-top: 0.1rem;
}

.doc-inline-form {
    display: inline;
}

.doc-file-cell {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    min-width: 0;
}

.doc-file-cell__icon {
    color: var(--brand-color);
    flex-shrink: 0;
}

.doc-file-cell__meta {
    color: var(--gray-500);
    font-size: 0.75rem;
    margin-top: 0.1rem;
}

.doc-visibility {
    border-radius: 9999px;
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
}

.doc-visibility--public {
    background: #dcfce7;
    color: #166534;
}

.doc-visibility--board {
    background: #dbeafe;
    color: #1e40af;
}

.doc-visibility--confidential {
    background: #fee2e2;
    color: #991b1b;
}

.documents-empty {
    align-items: center;
    color: var(--gray-500);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 2.5rem 1rem;
    text-align: center;
}

.documents-empty--compact {
    background: var(--surface-muted);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
    padding: 1.25rem 1rem;
}

.documents-empty__icon {
    color: var(--gray-400);
    font-size: 2.25rem;
}

.documents-pagination {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.documents-pagination__label {
    color: var(--gray-500);
    font-size: 0.875rem;
}

@media (hover: none) {
    .doc-folder-card__actions {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Dark mode support (future enhancement) */
/*@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: var(--gray-900);
        --white: var(--gray-600);
        --gray-50: var(--gray-800);
        --gray-100: var(--gray-700);
        --gray-800: var(--gray-100);
        --gray-900: var(--gray-50);
    }
}
