:root {
    /* Colores Growtix */
    --primary: #2ECC71;
    --primary-hover: #27ae60;
    --secondary: #1E1E2F;
    --accent: #9B59B6;
    --background: #FFFFFF;
    --surface: #F8F9FB;
    --border: #E1E8ED;
    --text-primary: #8b949e;
    --text-secondary: #657786;
    --text-muted: #AAB8C2;
    --success: #2ECC71;
    --warning: #F39C12;
    --danger: #E74C3C;
    --info: #3498DB;
    
    /* Variables de diseño */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --transition: all 0.2s ease;
}

/* Importar fuentes */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@600;700&display=swap');

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

body {
    background-color: var(--surface);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

/* ===== NAVBAR ===== */
.navbar-modern {
    background: var(--secondary) !important;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.brand-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.navbar-brand {
    margin-right: 100px;
}

.brand-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    background:var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Nav Items */
.nav-item-custom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem !important;
    border-radius: var(--border-radius-sm);
    margin: 0 0.1rem;
    transition: var(--transition);
    color: var(--text-primary) !important;
    font-weight: 500;
    text-decoration: none;
}

.nav-item-custom:hover {
    background: rgba(46, 204, 113, 0.1);
    color: var(--primary) !important;
    transform: translateY(-1px);
    text-decoration: none;
}

.nav-item-custom.active {
    background: var(--primary);
    color: white !important;
}

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

.nav-text {
    font-size: 0.9rem;
}

/* Notification Badge */
.notification-badge {
    background: var(--danger);
    color: white;
    border-radius: 10px;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.25rem;
    display: none;
}

/* User Menu */
.navbar-user {
    margin-left: 1rem;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    border: 1px solid transparent;
}

.user-menu-toggle:hover {
    background: rgba(46, 204, 113, 0.1);
    border-color: var(--primary);
    text-decoration: none;
    color: var(--text-primary);
}

.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.dropdown-arrow {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}

.user-menu-toggle.show .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    color: var(--text-primary);
    text-decoration: none;
}

.dropdown-item:hover {
    background: rgba(46, 204, 113, 0.1);
    color: var(--primary);
    transform: translateX(3px);
    text-decoration: none;
}

.dropdown-icon {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.dropdown-item:hover .dropdown-icon {
    color: var(--primary);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    background: var(--background);
    padding: 2rem 0;
}

/* ===== ALERTS ===== */
.alert-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: var(--shadow);
}

.alert-success {
    background: rgba(46, 204, 113, 0.1);
    border-left: 4px solid var(--success);
    color: #155724;
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--danger);
    color: #721c24;
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    border-left: 4px solid var(--warning);
    color: #856404;
}

.alert-info {
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid var(--info);
    color: var(--text-primary);
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.alert-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.alert-success .alert-icon { color: var(--success); }
.alert-danger .alert-icon { color: var(--danger); }
.alert-warning .alert-icon { color: var(--warning); }
.alert-info .alert-icon { color: var(--info); }

.alert-message {
    font-weight: 500;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    padding: 0.25rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    margin-left: 1rem;
    flex-shrink: 0;
}

.alert-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

/* ===== CARDS ===== */
.card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
}

/* Modern Card Variants */
.modern-card {
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    background: var(--background);
}

.modern-card-header {
    background: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: none;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

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

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--surface);
    color: var(--text-primary);
}

/* ===== FORMS ===== */
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    background: var(--background);
    font-family: 'Inter', sans-serif;
    width: 100%;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
    outline: none;
}

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

.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group .form-control {
    flex: 1;
}

/* ===== POSTS ===== */
.post-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.post-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.post-user-info h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.post-user-info small {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.post-content {
    padding: 1rem 1.25rem;
    line-height: 1.6;
}

.post-text {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    white-space: pre-line;
}

.post-image {
    width: 100%;
    border-radius: var(--border-radius-sm);
    margin-top: 1rem;
    max-height: 500px;
    object-fit: cover;
}

.post-actions {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
}

.post-action {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-action:hover {
    background: var(--surface);
    color: var(--text-primary);
}

/* Comments */
.comments-section {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1rem 1.25rem;
}

.comment {
    display: flex;
    margin-bottom: 1rem;
}

.comment:last-child {
    margin-bottom: 0;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.comment-author {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.comment-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.comment-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.comment-input .form-control {
    flex: 1;
    font-size: 0.875rem;
}

.comment-input-field {
    border-radius: 20px;
    padding-right: 400px;
    line-height-step: 21px;
}

.comment-input {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}


.comment-input-field:focus {
    border-color: #2ecc71;
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.1);
}

.comment-input button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #2ecc71;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.comment-input button:hover {
    background: #27ae60;
    transform: scale(1.1);
}

/* ===== CHAT ===== */
.chat-container {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: var(--surface);
}

.message {
    max-width: 70%;
    margin-bottom: 1rem;
    clear: both;
}

.message-sent {
    float: right;
}

.message-received {
    float: left;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 18px;
    font-size: 0.875rem;
    line-height: 1.4;
}

.message-sent .message-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-received .message-bubble {
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-align: right;
}

.message-received .message-time {
    text-align: left;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: var(--background);
}

/* ===== CONTACT LIST ===== */
.contact-list {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.contact-item:hover {
    background: var(--surface);
    text-decoration: none;
    color: inherit;
}

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

.contact-item.active {
    background: rgba(46, 204, 113, 0.05);
    border-left: 3px solid var(--primary);
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.contact-info h6 {
    margin: 0;
    font-weight: 600;
    font-size: 0.875rem;
}

.contact-info small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* ===== BADGES ===== */
.badge {
    padding: 0.35rem 0.65rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

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

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

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

.badge-info {
    background: var(--info);
    color: white;
}

/* ===== TABLES ===== */
.table {
    background: var(--background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    width: 100%;
}

.table th {
    background: var(--surface);
    border: none;
    padding: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

.table-modern {
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* ===== MODALS ===== */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

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

.modal-title {
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
}

/* ===== FOOTER ===== */
.footer-modern {
    background: var(--secondary);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-icon {
    color: var(--primary);
    font-size: 1.2rem;
}

.footer-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
}

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

/* ===== UTILITY CLASSES ===== */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }

.bg-surface { background: var(--surface) !important; }
.bg-white { background: var(--background) !important; }
.bg-primary { background: var(--primary) !important; }

.rounded { border-radius: var(--border-radius) !important; }
.rounded-sm { border-radius: var(--border-radius-sm) !important; }

.shadow-sm { box-shadow: var(--shadow) !important; }
.shadow { box-shadow: var(--shadow-md) !important; }

.d-flex { display: flex !important; }
.d-none { display: none !important; }
.flex-column { flex-direction: column !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }

.text-center { text-align: center !important; }
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.me-4 { margin-right: 1.5rem !important; }
.me-5 { margin-right: 3rem !important; }

.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.ms-4 { margin-left: 1.5rem !important; }
.ms-5 { margin-left: 3rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

/* ===== LOADING ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container, .container-fluid {
        padding: 0 0.75rem;
    }
    
    .navbar-modern {
        padding: 0.5rem 0;
    }
    
    .brand-text {
        font-size: 1.2rem;
    }
    
    .nav-text {
        display: none;
    }
    
    .nav-item-custom {
        padding: 0.75rem !important;
        justify-content: center;
    }
    
    .user-info {
        display: none;
    }
    
    .dropdown-arrow {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .post-header,
    .comments-section {
        padding: 0.75rem 1rem;
    }
    
    .message {
        max-width: 85%;
    }
    
    .chat-container {
        height: 400px;
    }
    
    .btn {
        padding: 0.65rem 1.25rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .navbar-modern {
        background: var(--secondary) !important;
    }
    
    .footer-modern {
        background: var(--secondary);
    }
}