/* Estilos Principales del Sistema */
:root {
    --primary-color: #1a237e;
    --secondary-color: #3949ab;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --info-color: #2196f3;
    --light-color: #f5f5f5;
    --dark-color: #212121;
    --border-color: #e0e0e0;
    --text-color: #333;
    --text-muted: #757575;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

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

/* Admin Layout */
.admin-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    background: var(--primary-color);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    background: var(--dark-color);
    text-align: center;
}

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

.sidebar-menu li { border-bottom: 1px solid rgba(255,255,255,0.1); }

.sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--secondary-color);
    padding-left: 25px;
}

.sidebar-menu i { margin-right: 10px; width: 20px; }

.main-content {
    flex: 1;
    margin-left: 260px;
    background: var(--light-color);
}

.top-navbar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.breadcrumb-item {
    display: inline-block;
    color: var(--text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    padding: 0 8px;
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.content-area { padding: 30px; }

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

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

.card-header h5 {
    margin: 0;
    color: var(--primary-color);
    font-size: 18px;
}

.card-body { padding: 20px; }

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

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.primary {
    background: rgba(26,35,126,0.1);
    color: var(--primary-color);
}

.stat-icon.success {
    background: rgba(76,175,80,0.1);
    color: var(--success-color);
}

.stat-icon.warning {
    background: rgba(255,152,0,0.1);
    color: var(--warning-color);
}

.stat-icon.info {
    background: rgba(33,150,243,0.1);
    color: var(--info-color);
}

.stat-details h3 {
    margin: 0 0 5px 0;
    font-size: 28px;
    color: var(--dark-color);
}

.stat-details p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 14px;
}

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

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26,35,126,0.1);
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--secondary-color);
}

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

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

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

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

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

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

.table thead th {
    background: var(--light-color);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--border-color);
}

.table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: rgba(26,35,126,0.02);
}

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

.badge-success {
    background: rgba(76,175,80,0.2);
    color: var(--success-color);
}

.badge-danger {
    background: rgba(244,67,54,0.2);
    color: var(--danger-color);
}

.badge-warning {
    background: rgba(255,152,0,0.2);
    color: var(--warning-color);
}

/* Search */
.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box input { padding-left: 40px; }

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
}

.page-link {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover { background: var(--primary-color); color: white; }
.page-link.active { background: var(--primary-color); color: white; }

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-2 { margin-top: 20px; }
.mb-2 { margin-bottom: 20px; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 20px; }

/* Dropzone */
.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.dropzone:hover,
.dropzone.active {
    border-color: var(--primary-color);
    background: rgba(26,35,126,0.02);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr; }
}
