:root {
    --primary-color: #8d5524;
    /* Color Pan/Caramelo */
    --primary-hover: #6e421c;
    --secondary-color: #23120b;
    /* Café oscuro / Chocolate */
    --accent-color: #f0c27b;
    /* Dorado suave (Fondo del logo) */
    --background-color: #fdfbf7;
    /* Crema muy suave */
    --text-color: #3e2723;
    /* Café oscuro para texto */
    --white: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

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

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

.auth-box {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-box h2 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.25rem 0.5rem !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer;
    font-size: 0.75rem !important;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
    color: var(--white) !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    width: 100%;
}

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

.btn-view {
    background-color: #a0522d !important;
}

.btn-view:hover {
    background-color: #8a4321 !important;
}

.btn-edit {
    background-color: #cd853f !important;
}

.btn-edit:hover {
    background-color: #b36f2e !important;
}

.btn-delete {
    background-color: #8b4513 !important;
}

.btn-delete:hover {
    background-color: #69330e !important;
}

.btn-delete:hover {
    background-color: #69330e;
}

.alert {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

.sidebar {
    width: 250px;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar h3 {
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--white) !important;
    opacity: 0.8;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white) !important;
    opacity: 1;
}

.main-content {
    flex: 1;
    padding: 2rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--white);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.currency:before {
    content: "L ";
}

/* Tab Navigation */
.tab-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
    background: #f1f1f1;
    border-radius: var(--border-radius);
    width: fit-content;
    border: 1px solid #e0e0e0;
}

.tab-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
    color: #666 !important;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    background: transparent;
    border: 1px solid transparent;
}

.tab-link i {
    font-size: 1rem;
}

.tab-link:hover,
.tab-link:focus {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-color) !important;
}

.tab-link.active {
    background: var(--white) !important;
    color: var(--primary-color) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    border: 1px solid #fff;
}

/* Ensure no default link colors interfere */
.tab-link:visited {
    color: #666 !important;
}

.tab-link.active:visited {
    color: var(--primary-color) !important;
}