:root {
    --color-primary: #FF8A00; /* Naranja institucional */
    --color-secondary: #00B140; /* Verde */
    --color-accent: #6C757D; /* Gris */
    --color-dark: #343A40;
    --color-light: #F8F9FA;
    --bg-color: #f4f6f9;
    --sidebar-width: 250px;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    color: var(--color-dark);
}

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

.login-box {
    width: 400px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

.login-logo {
    text-align: center;
    padding: 30px 20px 10px;
    font-size: 24px;
    font-weight: bold;
    color: var(--color-dark);
}

.login-logo span {
    color: var(--color-primary);
}

.login-card-body {
    padding: 20px 40px 40px;
}

.login-card-body .form-group {
    margin-bottom: 20px;
}

.login-card-body label {
    font-size: 14px;
    color: var(--color-accent);
    margin-bottom: 5px;
    display: block;
}

.login-card-body .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.login-card-body .form-control:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 5px rgba(255, 138, 0, 0.3);
}

.btn-primary {
    background-color: var(--color-primary);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #e67c00;
}

.login-error {
    color: #dc3545;
    font-size: 13px;
    text-align: center;
    margin-bottom: 15px;
    display: none;
}

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

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--color-dark);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    z-index: 100;
}

.sidebar-brand {
    padding: 20px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    background-color: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand span {
    color: var(--color-primary);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

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

.sidebar-menu li {
    padding: 5px 20px;
}

.sidebar-menu a {
    color: #c2c7d0;
    text-decoration: none;
    display: block;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s;
    font-size: 15px;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: rgba(255, 138, 0, 0.1);
    color: white;
    border-left: 4px solid var(--color-primary);
    padding-left: 11px;
}

.sidebar-menu a i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
}

/* Submenu styles */
.sidebar-menu .has-submenu > a::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    float: right;
    transition: transform 0.3s;
}

.sidebar-menu .has-submenu.open > a::after {
    transform: rotate(180deg);
}

.sidebar-menu .submenu {
    display: none;
    list-style: none;
    padding-left: 15px;
    margin-top: 5px;
}

.sidebar-menu .submenu a {
    padding: 8px 15px;
    font-size: 14px;
}

.sidebar-menu .submenu a:hover, .sidebar-menu .submenu a.active {
    border-left: none;
    padding-left: 15px;
    color: var(--color-secondary);
    background-color: transparent;
}

.main-panel {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.navbar {
    background: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 10;
}

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

.user-info i {
    font-size: 20px;
    color: var(--color-accent);
}

.content {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

/* --- Cards and tables --- */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    margin: 0;
    font-size: 18px;
    color: var(--color-dark);
}

.card-body {
    padding: 20px;
}

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

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

.table th {
    background-color: #f9f9f9;
    color: var(--color-accent);
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(0, 177, 64, 0.05);
}

/* Status badges */
.badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.badge-pending { background-color: #ffc107; color: #333; }
.badge-approved { background-color: var(--color-secondary); }
.badge-rejected { background-color: #dc3545; }
.badge-finished { background-color: #17a2b8; }

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

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    border-bottom: 4px solid var(--color-primary);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 138, 0, 0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 20px;
}

.stat-info h3 {
    margin: 0;
    font-size: 24px;
    color: var(--color-dark);
}

.stat-info p {
    margin: 5px 0 0 0;
    color: var(--color-accent);
    font-size: 14px;
}
