.admin-body {
    font-family: "lores-15-bold-alt-oakland", sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    color: #333;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.admin-sidebar {
    width: 250px;
    background-color: #000;
    color: #fff;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 2px solid #333;
    margin-bottom: 20px;
}

.sidebar-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

.sidebar-header p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    color: #ccc;
}

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

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.nav-item:hover {
    background-color: #333;
}

.nav-item.active {
    background-color: #333;
    border-left-color: #ff6b6b;
}

.nav-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

#logout-btn {
    margin-top: 30px;
    border-top: 2px solid #333;
    padding-top: 20px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.nav-link:hover {
    background-color: #333;
    color: #fff;
}

.nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background-color: #fff;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 2px solid #000;
}

.header-left {
    display: flex;
    align-items: center;
}

.toggle-sidebar {
    background: none;
    border: none;
    font-size: 1.2rem;
    margin-right: 15px;
    cursor: pointer;
    color: #000;
}

.admin-user {
    display: flex;
    align-items: center;
}

.admin-user img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid #000;
}

/* Admin Content */
.admin-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

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

.stat-card {
    background-color: #fff;
    border: 2px solid #000;
    padding: 20px;
    border-radius: 0;
    display: flex;
    align-items: center;
    box-shadow: 4px 4px 0 #000;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background-color: #000;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #fff;
    font-size: 1.5rem;
}

.stat-info h3 {
    margin: 0 0 5px;
    font-size: 0.9rem;
    color: #666;
}

.stat-number {
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
    color: #000;
}

.stat-change {
    margin: 5px 0 0;
    font-size: 0.9rem;
}

.stat-change.positive {
    color: #28a745;
}

.stat-change.negative {
    color: #dc3545;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.content-card {
    background-color: #fff;
    border: 2px solid #000;
    padding: 20px;
    border-radius: 0;
    box-shadow: 4px 4px 0 #000;
}

.content-card h3 {
    margin-top: 0;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
}

/* Lists */
.low-stock-list, .new-users-list, .best-sellers-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stock-item, .user-item, .product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.stock-amount {
    font-weight: bold;
}

.stock-amount.critical {
    color: #dc3545;
}

.stock-amount.warning {
    color: #ffc107;
}

.user-item {
    justify-content: flex-start;
}

.user-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid #000;
}

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

.user-info span:first-child {
    font-weight: bold;
}

.user-info span:last-child {
    font-size: 0.8rem;
    color: #666;
}

.product-info {
    display: flex;
    align-items: center;
}

.product-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #000;
    color: #fff;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 12px;
    font-size: 0.8rem;
}

.product-item:nth-child(1) .product-rank {
    background-color: #FFD700; /* Oro para el primer lugar */
}

.product-item:nth-child(2) .product-rank {
    background-color: #C0C0C0; /* Plata para el segundo lugar */
}

.product-item:nth-child(3) .product-rank {
    background-color: #CD7F32; /* Bronce para el tercer lugar */
}

.product-name {
    font-weight: bold;
}

.product-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.sales-count {
    font-weight: bold;
    color: #000;
}

.revenue {
    font-size: 0.8rem;
    color: #28a745;
}

.fa-star {
    color: #FFD700;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0;
}

/* Buttons */
.btn {
    padding: 10px 15px;
    border: 2px solid #000;
    background-color: #fff;
    color: #000;
    cursor: pointer;
    font-family: "lores-15-bold-alt-oakland", sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s;
    box-shadow: 3px 3px 0 #000;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

.btn-primary {
    background-color: #000;
    color: #fff;
}

.btn-outline {
    background-color: transparent;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Filters */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.search-input, .filter-select {
    padding: 10px;
    border: 2px solid #000;
    font-family: "lores-15-bold-alt-oakland", sans-serif;
}

.search-input {
    flex: 1;
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #000;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ddd;
}

.data-table th {
    background-color: #000;
    color: #fff;
    font-weight: normal;
}

.data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.data-table tr:hover {
    background-color: #f0f0f0;
}

/* Badges */
.status-badge, .role-badge, .stock-badge {
    padding: 5px 10px;
    border-radius: 0;
    font-size: 0.8rem;
    display: inline-block;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-badge.pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.preparing {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.status-badge.ready {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-badge.delivered {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.role-badge.admin {
    background-color: #000;
    color: #fff;
}

.role-badge.seller {
    background-color: #6c757d;
    color: #fff;
}

.role-badge.customer {
    background-color: #17a2b8;
    color: #fff;
}

.stock-badge {
    background-color: #28a745;
    color: #fff;
}

.stock-badge.warning {
    background-color: #ffc107;
    color: #000;
}

.stock-badge.critical {
    background-color: #dc3545;
    color: #fff;
}

/* Action Buttons */
.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 10px;
    font-size: 1rem;
}

.action-btn.edit {
    color: #007bff;
}

.action-btn.delete {
    color: #dc3545;
}

/* Orders Grid */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.order-card {
    background-color: #fff;
    border: 2px solid #000;
    padding: 20px;
    box-shadow: 4px 4px 0 #000;
    position: relative;
    overflow: hidden;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
}

.order-header h3 {
    margin: 0;
}

.order-date {
    color: #666;
    font-size: 0.9rem;
}

.order-details p {
    margin: 8px 0;
}

.order-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: nowrap;
}

.order-actions .btn-sm {
    padding: 6px 10px;
    font-size: 0.75rem;
    min-width: auto;
    white-space: nowrap;
}

/* Reports */
.report-filters {
    display: flex;
    gap: 10px;
}

.reports-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

.report-card {
    background-color: #fff;
    border: 2px solid #000;
    padding: 20px;
    box-shadow: 4px 4px 0 #000;
}

.report-card.large {
    grid-column: 1 / -1;
}

.report-card h3 {
    margin-top: 0;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
}

.chart-container {
    position: relative;
    height: 300px;
}

.top-users {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-user {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

/* Form Styles */
.form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
    padding: 25px;
}

.form-section {
    margin-bottom: 40px;
    padding: 25px;
    border: 2px solid #eee;
    background-color: #fafafa;
}

.form-section h4 {
    margin-bottom: 20px;
    color: #000;
    font-size: 1.3rem;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 280px;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 25px;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: #000;
    display: block;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 15px;
    border: 2px solid #000;
    font-family: "lores-15-bold-alt-oakland", sans-serif;
    background-color: #fff;
    font-size: 1.1rem;
    margin-top: 8px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 8px rgba(78, 205, 196, 0.8);
    border-color: #4ecdc4;
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 10px;
    min-height: 1.2em;
    font-weight: bold;
    padding: 5px 0;
    background-color: #fff;
    border: 1px solid #dc3545;
    padding: 8px 12px;
    border-radius: 4px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 3px solid #000;
}

.form-group.required label:after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

::placeholder {
    color: #666;
    opacity: 0.8;
    font-style: italic;
    font-size: 0.95rem;
}

/* Pixel art enhancements */
.admin-sidebar, .admin-header, .content-card, .stat-card, .order-card, .report-card,
.btn, .search-input, .filter-select, .data-table {
    image-rendering: pixelated;
}

/* Section spacer */
.section-spacer {
    height: 30px;
}