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

:root {
    /* ASDE Scouts de España - Colores Corporativos */
    --color-primary: #622181;
    /* Morado corporativo */
    --color-primary-light: #7a3d9a;
    --color-primary-dark: #4a1963;
    --color-secondary: #88B241;
    /* Verde acción */
    --color-secondary-light: #9fc45a;
    --color-secondary-dark: #6d8f34;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #622181 0%, #4a1963 100%);
    --gradient-secondary: linear-gradient(135deg, #88B241 0%, #6d8f34 100%);
    --gradient-accent: linear-gradient(135deg, #622181 0%, #88B241 100%);

    /* Colores de estado */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;

    /* Grises y fondos */
    --color-bg: #f8f8f8;
    --color-bg-dark: #f0f0f0;
    --color-text: #333333;
    --color-text-light: #6b7280;
    --color-border: #e5e7eb;

    /* Layout */
    --sidebar-width: 250px;
    --container-max-width: 100%;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-lg);
}

.navbar .container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.navbar-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Layout Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 1.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.sidebar.collapsed {
    --sidebar-width: 70px;
    padding: 1rem 0.5rem;
}

.sidebar.collapsed .menu-item .text {
    display: none;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 0.75rem 0;
}

.sidebar-toggle-btn {
    width: 100%;
    border: none;
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.sidebar-toggle-btn:hover {
    background: var(--color-primary-light);
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-item:hover {
    background: #f7fafc;
    color: var(--color-primary);
    transform: translateX(5px);
}

.menu-item.active {
    background: var(--gradient-primary);
    color: white;
}

/* Main Content */
.content {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.page-header h2 {
    font-size: 2rem;
    color: #2d3748;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: #2d3748;
    font-size: 1.25rem;
}

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

.stat-card {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(98, 33, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(98, 33, 129, 0.4);
}

.stat-icon {
    font-size: 3rem;
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: white;
}

.stat-info p {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(98, 33, 129, 0.4);
}

.btn-secondary {
    background: #718096;
    color: white;
}

.btn-secondary:hover {
    background: #4a5568;
}

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

.btn-warning:hover {
    background: #d97706;
}

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

.btn-danger:hover {
    background: #dc2626;
}

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

.btn-success:hover {
    background: var(--color-secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(136, 178, 65, 0.4);
}

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

.btn-info:hover {
    background: #2563eb;
}

.btn-link {
    background: transparent;
    color: var(--color-primary);
    border: none;
    padding: 0.5rem 1rem;
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle::after {
    content: ' ▼';
    font-size: 0.75rem;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 8px;
    margin-top: 5px;
    border: 1px solid #e2e8f0;
}

.dropdown-content a {
    color: #4a5568;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background-color: #f7fafc;
    color: #667eea;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.col-4 {
    flex: 0 0 33.333%;
}

.col-6 {
    flex: 0 0 50%;
}

.col-8 {
    flex: 0 0 66.666%;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

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

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

.table thead {
    background: #f7fafc;
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.table tbody tr:hover {
    background: #f7fafc;
}

/* Badges */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
}

.badge-PENDIENTE {
    background: #feeBC8;
    color: #744210;
}

.badge-STOCK_CONFIRMADO {
    background: #BEE3F8;
    color: #2A4365;
}

.badge-PAGADO {
    background: #C6F6D5;
    color: #22543D;
}

.badge-ENTREGADO {
    background: #E2E8F0;
    color: #2D3748;
}

.badge-CANCELADO {
    background: #FED7D7;
    color: #742A2A;
}

.badge-success {
    background: #c6f6d5;
    color: #22543d;
}

.badge-danger {
    background: #fed7d7;
    color: #742a2a;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border-left: 4px solid #48bb78;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border-left: 4px solid #f56565;
}

/* Filters */
.filters {
    margin-bottom: 2rem;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-form input,
.filter-form select {
    padding: 0.625rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

.filter-form input {
    flex: 1;
}

/* Info List */
.info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
}

.info-list dt {
    font-weight: 600;
    color: #4a5568;
}

.info-list dd {
    color: #2d3748;
}

/* Activity List */
.activity-list {
    list-style: none;
}

.activity-list li {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.75rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #718096;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.875rem;
    color: #718096;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: #a0aec0;
}

.row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

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

    .row {
        flex-direction: column;
    }

    .col-4,
    .col-6,
    .col-8 {
        flex: 0 0 100%;
    }
}