/* ========================================
   CondominioX - Sistema de Gestión Inteligente
   Estilos principales - Diseño con Sidebar
======================================== */

/* Variables CSS */
:root {
    --primary-dark: #1e3a3a;
    --primary: #2d4a4a;
    --primary-light: #3d5a5a;
    --accent-gold: #c9a227;
    --accent-gold-light: #d4b84a;
    --accent-gold-dark: #a88a1f;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --light-gray: #e9ecef;
    --text-dark: #1a1a2e;
    --text-muted: #6c757d;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--off-white);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* ========================================
   App Container - Layout Principal
======================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ========================================
   Sidebar
======================================== */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-header {
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.sidebar-header .logo-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    animation: floatLogo 4s ease-in-out infinite;
}

.sidebar-header h1 {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.sidebar-header .tagline {
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.menu-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

/* Navegación del Sidebar */
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-item.active {
    background: var(--accent-gold);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.3);
}

.nav-icon {
    font-size: 1.3rem;
    width: 30px;
    text-align: center;
}

/* Footer del Sidebar */
.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* ========================================
   Contenido Principal
======================================== */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    background: var(--off-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Tabs Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
    width: 100%;
    max-width: 900px;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header del contenido */
.content-header {
    margin-bottom: 40px;
    text-align: center;
    width: 100%;
}

.content-header h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.content-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ========================================
   Login Section (Tab Inicio)
======================================== */
.login-section {
    max-width: 500px;
}

.login-step {
    display: none;
}

.login-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* User Type Selector */
.user-type-selector {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-type-btn {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-lg);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    box-shadow: var(--shadow);
}

.user-type-btn:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.user-type-btn.selected {
    border-color: var(--accent-gold);
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1) 0%, rgba(201, 162, 39, 0.05) 100%);
}

.user-type-icon {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--off-white);
    border-radius: 50%;
}

.user-type-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-type-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
}

.user-type-desc {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Selected Type Badge */
.selected-type-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: var(--radius);
    margin-bottom: 30px;
    color: var(--white);
}

.selected-type-badge span:first-child {
    font-size: 1.5rem;
}

.selected-type-badge span:nth-child(2) {
    font-weight: 600;
    font-size: 1.1rem;
    flex: 1;
}

.change-type-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.change-type-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Form Styles */
.form-login {
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: var(--white);
    padding: 35px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 18px;
    font-size: 1.2rem;
    pointer-events: none;
}

.form-group input {
    width: 100%;
    padding: 16px 16px 16px 55px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.15);
}

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

/* Botón principal */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 30px;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 162, 39, 0.35);
}

.btn-arrow {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(5px);
}

/* Mensajes */
.mensaje {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    display: none;
}

.mensaje.error {
    display: block;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.mensaje.success {
    display: block;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Links */
.form-links {
    margin-top: 25px;
    text-align: center;
}

.form-links a {
    color: var(--accent-gold-dark);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.form-links a:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

/* ========================================
   Información Section (Tab Información)
======================================== */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    width: 100%;
}

.info-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px;
    color: var(--white);
}

.info-card-header.admin {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.info-card-header.propietario {
    background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
}

.info-card-icon {
    font-size: 2rem;
}

.info-card-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.feature-list {
    list-style: none;
    padding: 25px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
    font-size: 1rem;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list .check {
    color: #16a34a;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Tabla de información */
.info-table-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    width: 100%;
}

.info-table-section h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
}

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

.info-table th,
.info-table td {
    padding: 18px 20px;
    text-align: center;
    border-bottom: 1px solid var(--light-gray);
}

.info-table th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
}

.info-table th:first-child {
    border-radius: var(--radius) 0 0 0;
    text-align: left;
}

.info-table th:last-child {
    border-radius: 0 var(--radius) 0 0;
}

.info-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.info-table tbody tr:hover {
    background: var(--off-white);
}

.info-table .check {
    color: #16a34a;
    font-weight: bold;
    font-size: 1.3rem;
}

.info-table .cross {
    color: #dc2626;
    font-weight: bold;
    font-size: 1.3rem;
}

/* ========================================
   Acerca de Section (Tab Acerca)
======================================== */
.about-section {
    max-width: 800px;
    width: 100%;
}

.about-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.about-logo {
    margin-bottom: 20px;
}

.about-logo img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.about-card h3 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.about-card .version {
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 20px;
}

.about-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
}

/* Features de Acerca */
.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.about-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.about-feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.about-feature-item h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.about-feature-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Video Section */
.video-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    text-align: center;
}

.video-section h4 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Aspect ratio 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
}

/* Contacto */
.contact-info {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.contact-info h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.contact-info p {
    opacity: 0.9;
}

.contact-email {
    font-size: 1.2rem;
    color: var(--accent-gold);
    font-weight: 600;
    margin-top: 10px;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 992px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 14px;
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: left;
        padding-bottom: 10px;
        margin-bottom: 6px;
    }

    .sidebar-header .logo-img {
        width: 60px;
        height: 60px;
    }

    .sidebar-header h1 {
        font-size: 1.2rem;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
        align-items: center;
        justify-content: center;
    }

    .sidebar-nav {
        display: none;
        flex-direction: column;
        gap: 8px;
        padding-top: 8px;
    }

    .nav-item {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 15px;
    }

    .nav-item span:last-child {
        display: inline;
    }

    .nav-icon {
        margin: 0;
    }

    .sidebar.menu-open .sidebar-nav {
        display: flex;
    }

    .sidebar-footer,
    .sidebar-user {
        display: none;
    }

    .sidebar.menu-open .sidebar-footer {
        display: block;
    }

    .sidebar.menu-open .sidebar-user {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding: 25px;
        justify-content: flex-start;
        padding-top: 30px;
    }

    .app-container {
        flex-direction: column;
    }
}

@keyframes floatLogo {
    0% { transform: translateY(0); opacity: 0.85; }
    50% { transform: translateY(-6px); opacity: 1; }
    100% { transform: translateY(0); opacity: 0.85; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(6px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 576px) {
    .content-header h2 {
        font-size: 1.6rem;
    }

    .user-type-btn {
        padding: 20px;
    }

    .user-type-icon {
        font-size: 2rem;
        width: 60px;
        height: 60px;
    }

    .user-type-title {
        font-size: 1.2rem;
    }

    .form-login {
        padding: 25px;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .about-features {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Página Recuperar Contraseña
======================================== */
.recuperar-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 40px 20px;
}

.recuperar-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 50px;
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.recuperar-card .logo-mini {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.recuperar-card h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.recuperar-card .text-muted {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.recuperar-card .form-login {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.recuperar-card .form-group input {
    padding: 14px 16px;
}

.recuperar-card small {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 5px;
    text-align: left;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    text-decoration: none;
    position: absolute;
    top: 30px;
    left: 30px;
    font-weight: 500;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--accent-gold);
}

@media (max-width: 576px) {
    .recuperar-card {
        padding: 30px 25px;
    }

    .back-link {
        top: 20px;
        left: 20px;
    }
}

/* ========================================
   Paneles de Admin y Propietario
======================================== */

/* Sidebar User */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.user-info-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-info-sidebar .user-name {
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
}

.user-info-sidebar .user-role {
    color: var(--accent-gold);
    font-size: 0.8rem;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(220, 38, 38, 0.3);
}

/* Panel Content */
.panel-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    background: var(--off-white);
    min-height: 100vh;
}

.panel-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.panel-section.active {
    display: block;
}

/* Section Header */
.section-header {
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.section-header p {
    color: var(--text-muted);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    animation: fadeUp 0.6s ease-out both;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.15); }
.stat-icon.orange { background: rgba(249, 115, 22, 0.15); }
.stat-icon.red { background: rgba(239, 68, 68, 0.15); }
.stat-icon.green { background: rgba(34, 197, 94, 0.15); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: var(--white);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: var(--white);
}

.btn-success:hover {
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

.btn-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: var(--white);
}

.btn-info:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: var(--white);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-filter-active {
    outline: 2px solid #1f2937;
    outline-offset: 2px;
}

.btn-state-pendientes-active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: var(--white);
}

.btn-state-pagados-active {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: var(--white);
}

.total-row td {
    font-weight: 700;
    background: #f8fafc;
}

.recibos-search,
.recibos-control-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #f8fafc;
    border: 1px dashed #cbd5f5;
    padding: 12px 14px;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.recibos-controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.recibos-control-card {
    margin-bottom: 0;
}

.recibos-inline-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

.recibos-inline-group label {
    min-width: 125px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.estructura-helper {
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.filtros-rapidos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 4px 0 10px;
}

.filtros-rapidos span {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: 2px;
}

.tabla-caption {
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-bottom: 1px solid #eef2f7;
    background: #fbfcff;
}

.recibos-search-title {
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.recibos-search-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.title-icon-svg {
    width: 18px;
    height: 18px;
    fill: #334155;
}

.input-inline {
    padding: 10px 12px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius);
    background: var(--white);
    font-size: 0.95rem;
    max-width: 220px;
}

.input-inline:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.password-toggle-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle-field input {
    width: 100%;
    padding-right: 4.2rem;
}

.password-toggle-btn {
    position: absolute;
    right: 8px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: var(--white);
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1;
    width: 34px;
    height: 30px;
    padding: 0;
    cursor: pointer;
}

.password-toggle-btn:hover {
    background: #f3f4f6;
}

.password-toggle-btn img {
    width: 16px;
    height: 16px;
    display: block;
    margin: 0 auto;
}

.input-wrapper.password-wrapper input {
    padding-right: 4.8rem;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 16px;
}

.modal-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
    padding: 20px;
}

.modal-card h3 {
    margin-bottom: 8px;
    color: var(--text-dark);
}

.modal-card p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Form Card */
.form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    overflow: hidden;
}

.form-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--off-white);
    border-bottom: 1px solid var(--light-gray);
}

.form-card-header h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.btn-close:hover {
    color: var(--text-dark);
}

/* Panel Form */
.panel-form {
    padding: 25px;
}

.panel-form .form-group {
    margin-bottom: 20px;
}

.panel-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.panel-form .form-group input,
.panel-form .form-group select,
.panel-form .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.panel-form .form-group input:focus,
.panel-form .form-group select:focus,
.panel-form .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.panel-form .form-group small {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--light-gray);
}

/* Data Table Container */
.data-table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: slideIn 0.5s ease-out both;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

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

.data-table th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}

.data-table tbody tr:hover {
    background: var(--off-white);
}

.data-table .empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

/* Profile Card (Propietario) */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.profile-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 30px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.profile-name h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.profile-name span {
    color: var(--text-muted);
}

#btnEditarContacto {
    margin-left: auto;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
}

.detail-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 600;
    color: var(--text-dark);
}

.detail-edit-input {
    min-width: 220px;
    max-width: 320px;
    width: 48%;
    padding: 8px 10px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 0.95rem;
}

.detail-edit-input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.detail-edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.propietario-actions {
    display: flex;
    gap: 10px;
}

.propietario-actions .btn {
    min-width: 88px;
    justify-content: center;
}

.gasto-actions {
    display: flex;
    gap: 8px;
}

.gasto-actions .btn {
    min-width: 86px;
    justify-content: center;
}

/* Stats Mini */
.stats-mini {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-mini-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
    border-left: 4px solid;
}

.stat-mini-card.warning {
    border-color: #f59e0b;
}

.stat-mini-card.success {
    border-color: #22c55e;
}

.stat-mini-icon {
    font-size: 2rem;
}

.stat-mini-info {
    flex: 1;
}

.stat-mini-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-mini-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.stat-mini-amount {
    font-weight: 600;
    color: var(--text-dark);
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Responsive para paneles */
@media (max-width: 992px) {
    .panel-content {
        margin-left: 0;
        padding: 20px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
}
