/* ===================================
   Upcube Style - Employee Management System
   =================================== */

:root {
    --primary-color: #5b69bc;
    --primary-dark: #4a58a9;
    --secondary-color: #10c469;
    --info-color: #35b8e0;
    --warning-color: #f9c851;
    --danger-color: #ff5b5b;
    --dark-color: #323a46;
    --light-color: #f5f5f5;
    --sidebar-bg: #313a46;
    --sidebar-dark: #282e38;
    --text-muted: #98a6ad;
    --border-color: #e7e7e7;
    --card-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #6c757d;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

/* ========== WRAPPER ========== */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.left-sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    position: fixed;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.left-sidebar.collapsed {
    width: 70px;
}

.sidebar-inner {
    height: 100%;
    overflow-y: auto;
}

/* Logo Area */
.logo-area {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-area h3 {
    color: #fff;
    font-size: 20px;
    margin: 0;
    font-weight: 600;
}

.left-sidebar.collapsed .logo-area h3 {
    display: none;
}

.left-sidebar.collapsed .logo-area::after {
    content: "EP";
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

/* User Box */
.user-box {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
}

.user-box h5 {
    color: #fff;
    margin: 5px 0;
    font-size: 14px;
}

.user-box p {
    color: var(--text-muted);
    font-size: 12px;
    margin: 0;
}

.left-sidebar.collapsed .user-box h5,
.left-sidebar.collapsed .user-box p {
    display: none;
}

/* Navigation Menu */
.sidebar-menu {
    padding: 20px 0;
}

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

.sidebar-menu > ul > li {
    position: relative;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-menu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-menu a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-menu a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.sidebar-menu i {
    font-size: 18px;
    width: 30px;
    text-align: center;
    margin-right: 10px;
}

.menu-title {
    flex: 1;
}

.left-sidebar.collapsed .menu-title {
    display: none;
}

.menu-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

/* Rotar flecha cuando el submenú está abierto */
.has-submenu.active > a .menu-arrow,
.menu-arrow.rotate {
    transform: rotate(90deg);
}

.left-sidebar.collapsed .menu-arrow {
    display: none;
}

/* Submenu */
.sidebar-menu .submenu {
    display: none;
    background: var(--sidebar-dark);
}

.sidebar-menu .submenu.show {
    display: block;
}

.sidebar-menu .submenu a {
    padding-left: 50px;
    font-size: 13px;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    margin-left: 240px;
    transition: all 0.3s ease;
}

.main-content.expanded {
    margin-left: 70px;
}

/* ========== TOPBAR ========== */
.topbar {
    background: #fff;
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 30px;
    box-shadow: 0 0 35px 0 rgba(154, 161, 171, 0.15);
    position: sticky;
    top: 0;
    z-index: 999;
}

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

.menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark-color);
    cursor: pointer;
    margin-right: 20px;
}

.search-box {
    position: relative;
    max-width: 300px;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 8px 40px 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 13px;
}

.search-box button {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: none;
    border: none;
    padding: 0 15px;
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-list {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-link {
    position: relative;
    color: var(--dark-color);
    font-size: 20px;
    cursor: pointer;
}

.badge-notify {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.user-dropdown:hover {
    background: var(--light-color);
}

.user-dropdown img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-dropdown .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
}

/* ========== PAGE CONTENT ========== */
.page-content {
    padding: 30px;
}

.page-title-box {
    margin-bottom: 30px;
}

.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-title h4 {
    color: var(--dark-color);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.breadcrumb {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    color: var(--text-muted);
    font-size: 13px;
}

.breadcrumb li a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb li::after {
    content: "/";
    margin-left: 10px;
}

.breadcrumb li:last-child::after {
    display: none;
}

/* ========== CARDS ========== */
.card {
    background: #fff;
    border-radius: 5px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.card-body {
    padding: 20px;
}

.card-title {
    color: var(--dark-color);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 20px 0;
}

/* Widget Cards */
.widget-card {
    padding: 20px;
    border-radius: 5px;
    background: #fff;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.widget-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
}

.widget-card.primary::before { background: var(--primary-color); }
.widget-card.success::before { background: var(--secondary-color); }
.widget-card.info::before { background: var(--info-color); }
.widget-card.warning::before { background: var(--warning-color); }

.widget-icon {
    float: right;
    font-size: 40px;
    opacity: 0.3;
}

.widget-content h5 {
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    margin: 0 0 10px 0;
    font-weight: 400;
}

.widget-content h3 {
    color: var(--dark-color);
    font-size: 32px;
    margin: 0;
    font-weight: 300;
}

.widget-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.widget-footer p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== TABLES ========== */
.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: #6c757d;
    font-size: 13px;
}

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

/* ========== BUTTONS ========== */
.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--secondary-color);
    color: #fff;
}

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

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

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

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
}

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

.btn-lg {
    padding: 12px 30px;
    font-size: 15px;
}

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

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

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 13px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

/* ========== BADGES ========== */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.badge-primary { background: var(--primary-color); color: #fff; }
.badge-success { background: var(--secondary-color); color: #fff; }
.badge-info { background: var(--info-color); color: #fff; }
.badge-warning { background: var(--warning-color); color: #fff; }
.badge-danger { background: var(--danger-color); color: #fff; }

/* ========== UTILITIES ========== */
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--secondary-color) !important; }
.text-danger { color: var(--danger-color) !important; }

.mt-3 { margin-top: 1rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-3, .col-md-4, .col-md-6, .col-md-8, .col-md-12 {
    padding: 0 15px;
}

.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .left-sidebar {
        transform: translateX(-100%);
    }
    
    .left-sidebar.mobile-show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .col-md-3, .col-md-4, .col-md-6, .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
}

/* ========== LOGIN PAGE ========== */
.account-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.account-card {
    background: #fff;
    border-radius: 5px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.account-logo {
    text-align: center;
    margin-bottom: 30px;
}

.account-logo h3 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.account-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* ========== CHARTS ========== */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ========== FOOTER ========== */
.footer {
    background: #fff;
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}