/* Sistema de Control Entre Socios - Estilos Principales */

:root {
    --primary-color: #2c3e50;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-bg: #ecf0f1;
    --sidebar-width: 260px;
}

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

body {
    font-family: Arial, sans-serif;
    background-color: var(--light-bg);
    color: #333;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    color: white;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

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

.sidebar-user i {
    font-size: 24px;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
}

.sidebar-menu li {
    margin: 5px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-menu a.active {
    background-color: var(--success-color);
    color: white;
}

.sidebar-menu a i {
    font-size: 18px;
    width: 20px;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 20px;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* Mobile Navbar */
.navbar-mobile {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--primary-color);
    color: white;
    position: sticky;
    top: 0;
    z-index: 999;
    margin: -20px -20px 20px -20px;
}

.btn-menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: white;
    border-bottom: 2px solid var(--light-bg);
    padding: 15px 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.stat-card.success {
    background: linear-gradient(135deg, var(--success-color), #229954);
}

.stat-card.info {
    background: linear-gradient(135deg, var(--info-color), #2980b9);
}

.stat-card.warning {
    background: linear-gradient(135deg, var(--warning-color), #e67e22);
}

.stat-card h6 {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    font-weight: normal;
}

.stat-card h2 {
    margin: 10px 0 0 0;
    font-size: 28px;
    font-weight: bold;
}

/* Tables */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    padding: 12px;
}

.table tbody tr:hover {
    background-color: rgba(39, 174, 96, 0.05);
}

.table tbody td {
    padding: 12px;
    vertical-align: middle;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1a252f;
    border-color: #1a252f;
}

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

.btn-success:hover {
    background-color: #229954;
    border-color: #229954;
}

/* Forms */
.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 0.2rem rgba(39, 174, 96, 0.25);
}

.required::after {
    content: " *";
    color: var(--danger-color);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #34495e);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-card h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
}

.login-card .btn {
    width: 100%;
    padding: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 0;
    }
    
    .content-wrapper {
        padding: 20px;
    }
    
    .navbar-mobile {
        display: flex;
    }
    
    .stat-card h2 {
        font-size: 24px;
    }
    
    .table {
        font-size: 14px;
    }
}

/* Utility Classes */
.text-primary-custom {
    color: var(--primary-color);
}

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

.bg-primary-custom {
    background-color: var(--primary-color);
}

.bg-success-custom {
    background-color: var(--success-color);
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

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

.spinner-overlay.active {
    display: flex;
}
