/* ============================================
   CUSOSO Foundation - CSS Variables System
   ============================================ */

:root {
    /* Primary colors - Bootstrap 5 default blue */
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --primary-light: rgba(13, 110, 253, 0.1);

    /* Secondary colors */
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;

    /* Text */
    --text-primary: #333;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;

    /* Background */
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 3rem;
}

/* ============================================
   GENERAL
   ============================================ */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ============================================
   BUTTONS
   ============================================ */

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

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    background-color: var(--bg-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

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

.navbar-nav .nav-link:hover:not(.active) {
    background-color: var(--primary-light);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--primary-color);
}

/* ============================================
   CARDS
   ============================================ */

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: var(--bg-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

/* Stat Cards */
.stat-card .card-body {
    padding: 1.25rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

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

.bg-success-light {
    background-color: rgba(40, 167, 69, 0.1);
}

.bg-warning-light {
    background-color: rgba(255, 193, 7, 0.1);
}

.bg-info-light {
    background-color: rgba(23, 162, 184, 0.1);
}

.bg-danger-light {
    background-color: rgba(220, 53, 69, 0.1);
}

/* ============================================
   TABLES
   ============================================ */

.table {
    margin-bottom: 0;
}

.table th {
    background-color: var(--bg-light);
    font-weight: 600;
    border-bottom-width: 1px;
}

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

/* ============================================
   FORMS
   ============================================ */

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--primary-light);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    border: none;
    border-radius: 0.5rem;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

/* ============================================
   LIST GROUPS
   ============================================ */

.list-group-item-action:hover {
    background-color: var(--primary-light);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    margin-top: auto;
}

/* ============================================
   UTILITIES
   ============================================ */

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

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

/* Cursor pointer for clickable elements */
.cursor-pointer {
    cursor: pointer;
}

/* ============================================
   ADMIN SPECIFIC
   ============================================ */

.admin-sidebar {
    min-height: calc(100vh - 56px);
    background-color: var(--bg-light);
    border-right: 1px solid #dee2e6;
}

.admin-sidebar .nav-link {
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 0;
}

.admin-sidebar .nav-link:hover {
    background-color: var(--primary-light);
}

.admin-sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .stat-card .card-body {
        padding: 1rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}
