/* ============================================
   SISTEMA DE CONDOMINIOS CHILE - ESTILOS
   ============================================ */

/* Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --bg-dark: #1e293b;
    --bg-light: #f1f5f9;
    --bg-white: #ffffff;
    
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-white: #ffffff;
    
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    
    --radius: 8px;
    --radius-lg: 12px;
    
    --sidebar-width: 260px;
    --header-height: 60px;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

html {
    margin: 0;
    padding: 0;
}

/* ============================================
   RESIDENT PORTAL
   ============================================ */

#resident-screen {
    display: none;
    min-height: 100vh;
    background: var(--bg-light);
}

.resident-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.resident-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.resident-logo i {
    font-size: 1.5rem;
    color: var(--primary);
}

.resident-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.resident-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    text-align: right;
}

.user-info span {
    display: block;
}

.user-info span:first-child {
    font-weight: 600;
    color: var(--text-dark);
}

.user-info span:last-child {
    font-size: 0.85rem;
    color: var(--text-light);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.resident-main {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-section {
    margin-bottom: 40px;
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.welcome-card h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.welcome-card p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.quick-actions {
    margin-bottom: 40px;
}

.quick-actions h3 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--text-dark);
}

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

.action-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.action-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.action-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.action-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.info-cards {
    margin-bottom: 40px;
}

.info-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

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

.info-header {
    background: var(--bg-light);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-header i {
    color: var(--primary);
    font-size: 1.2rem;
}

.info-header h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
}

.info-content {
    padding: 20px;
}

.balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

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

.balance .amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.latest-communication {
    margin-bottom: 16px;
}

.comm-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.comm-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.recent-activity h3 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--text-dark);
}

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

.activity-item {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
}

.activity-icon i {
    font-size: 1.2rem;
}

.text-success {
    color: var(--success) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.activity-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Responsive para portal residente */
@media (max-width: 768px) {
    .resident-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .resident-user {
        flex-direction: column;
        gap: 12px;
    }
    
    .user-info {
        text-align: center;
    }
    
    .resident-main {
        padding: 20px;
    }
    
    .welcome-card {
        padding: 24px;
    }
    
    .welcome-card h2 {
        font-size: 1.5rem;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .info-row {
        grid-template-columns: 1fr;
    }
    
    .activity-item {
        padding: 16px;
    }
}

/* ============================================
   LOGIN SCREEN - MODERNO
   ============================================ */

#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#login-screen:not(.active) {
    display: none;
}

.login-container {
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    margin: 0;
}

.login-left {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.login-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    text-align: center;
    padding: 40px;
}

.login-overlay .login-logo {
    animation: fadeInUp 0.8s ease-out;
}

.login-overlay .login-logo i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: white;
}

.login-overlay .login-logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: white;
}

.login-overlay .login-logo p {
    font-size: 1.1rem;
    opacity: 0.9;
    color: white;
}

.login-right {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    min-height: 100%;
}

.login-box {
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

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

.login-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.form-group {
    margin-bottom: 24px;
}

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

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    z-index: 1;
    pointer-events: none;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 16px 12px 45px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-white);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.input-group select {
    padding-left: 45px;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.input-group select option {
    padding: 8px;
    background: white;
    color: var(--text-dark);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
}

.btn-block {
    width: 100%;
}

.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.login-footer p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.login-footer strong {
    color: var(--text-dark);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .login-container {
        width: 90%;
        height: 85vh;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        height: 100vh;
        max-height: none;
        width: 100%;
        border-radius: 0;
        margin: 0;
    }
    
    .login-left {
        height: 40vh;
        min-height: 300px;
    }
    
    .login-right {
        padding: 40px 30px;
        height: 60vh;
        min-height: 400px;
    }
    
    .login-overlay .login-logo h1 {
        font-size: 1.8rem;
    }
    
    .login-overlay .login-logo p {
        font-size: 0.9rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .login-overlay {
        padding: 20px;
    }
    
    .login-overlay .login-logo i {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .login-right {
        padding: 30px 20px;
    }
    
    .login-header {
        margin-bottom: 30px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .login-container {
        height: 100vh;
    }
    
    .login-left {
        height: 35vh;
        min-height: 250px;
    }
    
    .login-right {
        height: 65vh;
        min-height: 350px;
    }
}

/* ============================================
   LAYOUT
   ============================================ */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

#login-screen.active {
    display: flex !important;
}

#resident-screen.active {
    display: block !important;
}

#main-screen {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-dark);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header i {
    font-size: 24px;
    color: var(--primary);
}

.sidebar-header span {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-white);
}

.nav-link.active {
    background: rgba(255,255,255,0.1);
    color: var(--text-white);
    border-left-color: var(--primary);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.user-info span {
    font-weight: 500;
}

.user-info small {
    color: rgba(255,255,255,0.5);
    text-transform: capitalize;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header h2 {
    flex: 1;
    font-size: 20px;
    font-weight: 600;
}

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

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* Content */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* ============================================
   COMPONENTS
   ============================================ */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

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

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

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

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    color: var(--text-light);
    position: relative;
}

.btn-icon:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

select.form-control {
    cursor: pointer;
    width: auto;
    min-width: 200px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

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

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

.table th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-light);
    background: var(--bg-light);
}

.table tbody tr:hover {
    background: var(--bg-light);
}

.table .actions {
    display: flex;
    gap: 5px;
}

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

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

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.bg-blue { background: var(--primary); }
.bg-green { background: var(--success); }
.bg-orange { background: var(--warning); }
.bg-red { background: var(--danger); }

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
}

.stat-info p {
    color: var(--text-light);
    font-size: 14px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pendiente { background: #fef3c7; color: #92400e; }
.status-pagado { background: #d1fae5; color: #065f46; }
.status-atrasado { background: #fee2e2; color: #991b1b; }
.status-parcial { background: #dbeafe; color: #1e40af; }
.status-activo { background: #d1fae5; color: #065f46; }
.status-inactivo { background: #e5e7eb; color: #374151; }
.status-confirmada { background: #d1fae5; color: #065f46; }
.status-cancelada { background: #fee2e2; color: #991b1b; }
.status-completada { background: #dbeafe; color: #1e40af; }

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.3s;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 15px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlide 0.3s;
    min-width: 300px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Areas Grid */
.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.area-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.area-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.area-card h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.area-card h4 i {
    color: var(--primary);
}

/* Documentos Grid */
.documentos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.documento-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.documento-card i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 15px;
}

.documento-card h4 {
    font-size: 14px;
    margin-bottom: 5px;
    word-break: break-word;
}

.documento-card p {
    font-size: 12px;
    color: var(--text-light);
}

/* Comunicaciones List */
.comunicaciones-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comunicacion-item {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.comunicacion-item.urgente {
    border-left: 4px solid var(--danger);
}

.comunicacion-item.fijado {
    background: #fef3c7;
}

.comunicacion-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.comunicacion-header h4 {
    font-size: 16px;
    font-weight: 600;
}

.comunicacion-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* Text utilities */
.text-muted {
    color: var(--text-light);
}

.text-center {
    text-align: center;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-actions {
        flex-direction: column;
    }
    
    select.form-control {
        width: 100%;
    }
}

/* Print */
@media print {
    .sidebar,
    .header,
    .page-actions,
    .btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .page {
        display: block !important;
    }
}
