/* Intranet Valen SPA - Estilos Modernos */

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #ffc107;
    --accent-color: #2c3e50;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-bg: #f5f6fa;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
}

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

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

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

.login-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    text-align: center;
}

.login-logo {
    width: 100px;
    margin-bottom: 20px;
}

.login-box h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 10px;
}

.login-box p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.login-box .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.login-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.login-box input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 16px;
    transition: all 0.3s ease;
}

.login-box input:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: #e6ac00;
    transform: translateY(-2px);
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    color: var(--secondary-color);
}

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

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

.sidebar-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header img {
    width: 70px;
    margin-bottom: 10px;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 500;
}

.sidebar-header p {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 25px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(255,255,255,0.1);
    color: var(--secondary-color);
    border-left-color: var(--secondary-color);
}

.menu-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 18px;
}

.menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 15px 20px;
}

.menu-section {
    padding: 0 25px 10px;
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    letter-spacing: 1px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

/* Top Header */
.top-header {
    background: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-title h2 {
    font-size: 22px;
    color: var(--primary-color);
}

.header-title p {
    font-size: 13px;
    color: var(--text-light);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    text-align: right;
}

.user-info .name {
    font-weight: 600;
    color: var(--text-dark);
}

.user-info .role {
    font-size: 12px;
    color: var(--text-light);
}

.logout-btn {
    padding: 8px 16px;
    background: var(--danger-color);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Content Area */
.content-area {
    padding: 30px;
}

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

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-icon.seguridad {
    background: rgba(52, 152, 219, 0.1);
    color: var(--info-color);
}

.stat-icon.aseo {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.stat-icon.total {
    background: rgba(255, 193, 7, 0.1);
    color: var(--secondary-color);
}

.stat-icon.liquidaciones {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.stat-info h3 {
    font-size: 32px;
    color: var(--text-dark);
    line-height: 1;
}

.stat-info p {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 5px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

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

.card-header h3 {
    font-size: 18px;
    color: var(--text-dark);
}

.card-body {
    padding: 25px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: #e6ac00;
}

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

.btn-success:hover {
    background: #219a52;
}

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

.btn-danger:hover {
    background: #c0392b;
}

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

.btn-info:hover {
    background: #2980b9;
}

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

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

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

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--text-dark);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: rgba(255, 193, 7, 0.05);
}

.data-table td {
    font-size: 14px;
}

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

.badge-seguridad {
    background: rgba(52, 152, 219, 0.15);
    color: var(--info-color);
}

.badge-aseo {
    background: rgba(39, 174, 96, 0.15);
    color: var(--success-color);
}

.badge-admin {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
}

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

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 15px;
    transition: all 0.3s ease;
}

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

select.form-control {
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: var(--secondary-color);
    background: rgba(255, 193, 7, 0.05);
}

.file-upload i {
    font-size: 40px;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
}

.tab {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.tab:hover {
    color: var(--secondary-color);
}

.tab.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

/* Tab Content */
.tab-content {
    display: none;
}

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

/* Profile */
.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--primary-color);
    font-weight: 600;
}

.profile-info h2 {
    font-size: 28px;
    margin-bottom: 5px;
}

.profile-info p {
    color: var(--text-light);
}

/* Document List */
.document-list {
    display: grid;
    gap: 15px;
}

.document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--light-bg);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.document-item:hover {
    background: rgba(255, 193, 7, 0.1);
}

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

.document-icon {
    width: 45px;
    height: 45px;
    background: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.document-details h4 {
    font-size: 15px;
    margin-bottom: 3px;
}

.document-details p {
    font-size: 12px;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .intranet-wrapper {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .top-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
}

/* Icons (using emoji as fallback) */
.icon::before {
    margin-right: 8px;
}

/* Month/Year Selector */
.period-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.period-selector select {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-state-icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-light);
}

/* Action Buttons in Table */
.table-actions {
    display: flex;
    gap: 8px;
}

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

.search-box input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
}

.search-box::before {
    content: "🔍";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

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

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination a {
    background: var(--white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.pagination a:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.pagination .current {
    background: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 600;
}
