:root {
    /* Paleta Talits - #ff6600, azul marino, gris, negro */
    --primary-color: #ff6600;
            --primary-dark: #e65c00;
            --primary-light: #ff8533;
            --navy: #001f3f;
            --navy-dark: #001529;
            --sidebar-bg: #001f3f;
            --sidebar-dark: #001529;
            --header-bg: #ff6600;
            --header-dark: #e65c00;
            --secondary-color: #6b7280;
            --secondary-dark: #4b5563;
            --secondary-light: #9ca3af;
            --background-color: #f4f4f5;
            --card-color: #ffffff;
            --border-color: #e5e7eb;
            --shadow-color: rgba(0, 0, 0, 0.08);
            --shadow-hover: rgba(0, 0, 0, 0.12);
            --success-color: #10b981;
            --success-dark: #059669;
            --danger-color: #ef4444;
            --danger-dark: #dc2626;
            --warning-color: #f59e0b;
            --warning-dark: #d97706;
            --info-color: #ff6600;
            --info-dark: #e65c00;
            --text-color: #111111;
            --text-secondary: #6b7280;
            --text-light: #9ca3af;
            --accent-color: #ff6600;
            --accent-dark: #e65c00;
        }

        html, body {
            margin: 0;
            padding: 0;
            overflow: hidden;
            height: 100%;
        }
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: var(--background-color);
            color: var(--text-color);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* Estilos para la barra superior de usuario */
        /* Layout principal con encabezado y menú lateral */
        .app-layout {
            display: flex;
            flex-direction: column;
            height: 100vh;
            max-height: 100vh;
            width: 100%;
            margin: 0;
            padding: 0;
            gap: 0;
            overflow: hidden;
        }

        .app-top-bar {
            width: 100%;
            height: 20px;
            background-color: #cdcdcd;
            flex-shrink: 0;
        }

        .app-header {
            background: linear-gradient(135deg, var(--header-bg) 0%, var(--header-dark) 100%);
            color: white;
            padding: 6px 24px;
            flex-shrink: 0;
            box-shadow: none;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 200;
            position: sticky;
            top: 0;
            width: 100%;
            box-sizing: border-box;
            gap: 20px;
        }

        .app-header-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .app-header-logo-block {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 0;
            padding: 0;
        }
        .app-header-brand {
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 2px;
        }
        .app-header-brand h1 {
            color: white;
            margin: 0;
            font-size: 1.3em;
            font-weight: 700;
            letter-spacing: -0.5px;
            line-height: 1.2;
        }
        .app-header-brand .brand-subtitle {
            font-size: 0.75em;
            opacity: 0.9;
            margin: 0;
            color: rgba(255,255,255,0.9);
        }
        .app-header-tagline {
            font-size: 0.85em;
            opacity: 0.95;
            padding-left: 20px;
            margin-left: 8px;
            border-left: 1px solid rgba(255,255,255,0.4);
        }

        .app-header-right {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .app-body {
            display: flex;
            flex: 1;
            width: 100%;
            overflow: hidden;
            margin: 0;
            margin-top: -2px;
            min-height: 0;
        }

        .sidebar {
            width: 260px;
            background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-dark) 100%);
            box-shadow: 2px 0 8px rgba(0,0,0,0.2);
            padding: 0;
            z-index: 150;
            position: sticky;
            top: 60px;
            height: calc(100vh - 60px);
            overflow-y: auto;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
        }

        .sidebar-logo {
            padding: 16px 20px;
            background-color: #ffffff;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: center;
            flex-shrink: 0;
        }
        .sidebar-logo img {
            max-width: 100%;
            max-height: 56px;
            object-fit: contain;
            display: block;
        }

        .sidebar-menu {
            list-style: none;
            padding: 20px;
            margin: 0;
            flex: 1;
        }

        .sidebar-menu-item {
            margin: 0;
        }

        .sidebar-menu-link {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 20px;
            color: rgba(255,255,255,0.9);
            text-decoration: none;
            transition: all 0.2s ease;
            border-left: 4px solid transparent;
            font-size: 0.95em;
        }

        .sidebar-menu-link:hover {
            background-color: rgba(255,255,255,0.08);
            color: white;
        }

        .sidebar-menu-link.active {
            background-color: rgba(255,255,255,0.15);
            border-left-color: var(--primary-color);
            color: white;
            font-weight: 600;
        }

        .sidebar-menu-icon {
            font-size: 1.15em;
            width: 24px;
            text-align: center;
            opacity: 0.95;
        }

        .sidebar-secondary {
            background: #cdcdcd;
            margin-top: auto;
            padding: 12px 16px 12px 24px;
            border-top: 1px solid rgba(0,0,0,0.08);
        }
        .sidebar-secondary-link {
            display: block;
            font-size: 0.78em;
            color: var(--text-secondary);
            text-decoration: none;
            padding: 6px 0 6px 12px;
            margin-left: 8px;
            border-left: 2px solid transparent;
            transition: all 0.2s ease;
        }
        .sidebar-secondary-link:hover {
            color: var(--text-color);
        }
        .sidebar-secondary-link.active {
            color: var(--primary-color);
            border-left-color: var(--primary-color);
            font-weight: 500;
        }

        .sidebar-footer {
            padding: 20px;
            border-top: 1px solid var(--border-color);
            margin-top: auto;
            background-color: #ffffff;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }
        .sidebar-footer-logo {
            margin-bottom: 8px;
        }
        .sidebar-footer-logo a {
            display: block;
            text-decoration: none;
        }
        .sidebar-footer-logo img {
            max-width: 100%;
            max-height: 36px;
            object-fit: contain;
            display: block;
            margin: 0 auto;
        }
        .sidebar-footer-copy {
            font-size: 0.7em;
            color: var(--text-secondary);
        }

        .main-content-area {
            flex: 1;
            padding: 0 30px 20px 30px;
            overflow-y: auto;
            background-color: var(--background-color);
            min-width: 0;
            box-sizing: border-box;
            margin: 0;
        }

        .user-bar {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255,255,255,0.25);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            font-size: 0.9em;
        }

        .user-details {
            display: flex;
            flex-direction: column;
        }

        .user-name {
            font-weight: 600;
            font-size: 0.9em;
            color: white;
        }

        .user-profile {
            font-size: 0.75em;
            color: rgba(255, 255, 255, 0.8);
        }

        .trial-counter {
            padding: 6px 14px;
            background: rgba(255,255,255,0.25);
            color: white;
            border-radius: 6px;
            font-size: 0.85em;
            font-weight: 600;
        }

        .trial-counter.expired {
            background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
            box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
        }

        .btn-logout {
            padding: 6px 14px;
            background: rgba(255,255,255,0.2);
            color: white;
            border: 1px solid rgba(255,255,255,0.4);
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.85em;
            font-weight: 500;
            transition: all 0.2s ease;
        }

        .btn-logout:hover {
            background: rgba(255,255,255,0.3);
        }

        .btn-settings, .btn-help {
            padding: 6px 12px;
            background: rgba(255,255,255,0.15);
            color: white;
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.85em;
            transition: background-color 0.3s ease;
            margin-right: 10px;
        }

        .btn-settings:hover, .btn-help:hover {
            background: rgba(255,255,255,0.25);
        }

        .main-content {
            display: none;
        }

        .main-content.show {
            display: block;
        }

        .content-section {
            display: none;
            margin: 0;
            padding: 0;
        }

        .content-section.active {
            display: block;
        }

        /* Estilos para el Dashboard */
        .dashboard {
            max-width: 100%;
            margin: 0;
            width: 100%;
        }

        .dashboard-header {
            margin-bottom: 30px;
            padding: 0;
        }

        .dashboard-header h2 {
            color: var(--text-color);
            margin: 0 0 8px 0;
            font-weight: 600;
            font-size: 1.875em;
        }

        .dashboard-header p {
            color: var(--text-secondary);
            margin: 0;
            font-size: 1em;
        }

        .kpi-grid {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 15px;
            margin-bottom: 30px;
        }

        @media (max-width: 1400px) {
            .kpi-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        @media (max-width: 768px) {
            .kpi-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        .kpi-card {
            background-color: var(--card-color);
            padding: 16px;
            border-radius: 10px;
            box-shadow: 0 1px 3px var(--shadow-color);
            border: 1px solid var(--border-color);
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            min-height: auto;
        }

        .kpi-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px var(--shadow-hover);
            border-color: var(--accent-color);
        }

        .kpi-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 8px;
        }

        .kpi-title {
            font-size: 0.75em;
            color: var(--text-secondary);
            margin: 0;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            line-height: 1.3;
        }

        .kpi-icon {
            font-size: 1.2em;
            opacity: 0.7;
            flex-shrink: 0;
        }

        .kpi-value {
            font-size: 1.75em;
            font-weight: 700;
            color: var(--text-color);
            margin: 4px 0;
            line-height: 1.2;
        }

        .kpi-change {
            font-size: 0.75em;
            display: flex;
            align-items: center;
            gap: 4px;
            margin-top: 4px;
            line-height: 1.3;
        }

        .kpi-change.positive {
            color: var(--success-color);
            font-weight: 600;
        }

        .kpi-change.negative {
            color: var(--danger-color);
            font-weight: 600;
        }

        .kpi-change.neutral {
            color: var(--text-secondary);
            font-weight: 500;
        }

        .charts-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .chart-container {
            min-height: 280px;
            overflow: visible;
            padding: 15px;
            width: 100%;
            box-sizing: border-box;
        }

        #projects-progress-chart {
            min-height: 350px;
            overflow: visible;
            padding: 20px 15px;
            width: 100%;
            box-sizing: border-box;
        }

        .chart-svg {
            width: 100%;
            height: 100%;
            max-height: 100%;
            display: block;
        }

        .chart-card {
            background-color: var(--card-color);
            padding: 24px;
            border-radius: 12px;
            box-shadow: 0 1px 3px var(--shadow-color);
            border: 1px solid var(--border-color);
        }

        .chart-card h3 {
            color: var(--text-color);
            margin: 0 0 20px 0;
            font-size: 1.125em;
            font-weight: 600;
        }

        .chart-placeholder {
            height: 250px;
            background: var(--card-color);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            font-style: italic;
            border: 1px solid var(--border-color);
            position: relative;
            overflow: hidden;
        }

        .chart-container {
            width: 100%;
            height: 250px;
            position: relative;
            padding: 20px;
            box-sizing: border-box;
        }

        .chart-svg {
            width: 100%;
            height: 100%;
        }

        .chart-axis {
            stroke: var(--border-color);
            stroke-width: 1;
        }

        .chart-grid-line {
            stroke: var(--border-color);
            stroke-width: 0.5;
            stroke-dasharray: 3,3;
            opacity: 0.5;
        }

        .chart-bar {
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .chart-bar:hover {
            opacity: 0.8;
            transform: scaleY(1.05);
            transform-origin: bottom;
        }

        .chart-label {
            font-size: 11px;
            fill: var(--text-secondary);
            font-weight: 500;
        }

        .chart-value-label {
            font-size: 10px;
            fill: var(--text-color);
            font-weight: 600;
        }

        .chart-legend {
            display: flex;
            justify-content: center;
            gap: 18px;
            margin-top: 10px;
            padding: 10px 0;
            flex-wrap: wrap;
        }

        .chart-legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.85em;
            color: var(--text-color);
            white-space: nowrap;
        }

        .chart-legend-color {
            width: 14px;
            height: 14px;
            border-radius: 3px;
            flex-shrink: 0;
        }

        .pie-chart-container {
            width: 100%;
            min-height: 200px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            padding: 15px 0;
        }

        .pie-chart-svg {
            width: 180px;
            height: 180px;
            max-width: 100%;
        }

        .pie-chart-center {
            font-size: 24px;
            font-weight: 700;
            fill: var(--text-color);
        }

        .pie-chart-label {
            font-size: 12px;
            fill: var(--text-secondary);
            font-weight: 500;
        }

        .projects-summary {
            background-color: var(--card-color);
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px var(--shadow-color);
            margin-top: 20px;
        }

        .projects-summary h3 {
            color: var(--text-color);
            margin: 0 0 15px 0;
            font-size: 1.1em;
            font-weight: 500;
        }

        .summary-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .summary-item {
            padding: 10px 0;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .summary-item:last-child {
            border-bottom: none;
        }

        .summary-item-label {
            color: var(--text-color);
        }

        .summary-item-value {
            font-weight: 600;
            color: var(--primary-color);
            font-size: 1.05em;
        }

        .settings-page {
            width: 100%;
        }
        .settings-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 24px;
        }
        @media (max-width: 900px) {
            .settings-grid {
                grid-template-columns: 1fr;
            }
        }
        .settings-card {
            background-color: var(--card-color);
            padding: 24px;
            border-radius: 12px;
            box-shadow: 0 1px 3px var(--shadow-color);
            border: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            min-height: 180px;
        }
        .settings-card.settings-card-full {
            grid-column: 1 / -1;
        }
        .settings-section h4 {
            color: var(--text-color);
            margin: 0 0 12px 0;
            font-size: 1.1em;
        }

        .settings-section p {
            color: var(--text-secondary);
            font-size: 0.9em;
            margin: 0 0 16px 0;
            line-height: 1.6;
        }
        .settings-section p:last-child {
            margin-bottom: 0;
        }

        .settings-warning {
            font-size: 0.85em;
            color: var(--danger-color);
            margin-top: 12px;
        }

        .settings-hint {
            font-size: 0.85em;
            color: var(--text-secondary);
            margin-top: 8px;
        }

        .profile-container {
            padding: 0;
            max-width: 100%;
        }
        .profile-header {
            margin-bottom: 20px;
        }
        .profile-banner {
            background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
            color: white;
            padding: 24px 30px;
            border-radius: 12px;
            margin-bottom: 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 16px;
        }
        .profile-banner-left { display: flex; align-items: center; gap: 20px; }
        .profile-avatar {
            width: 72px;
            height: 72px;
            border-radius: 50%;
            background: rgba(255,255,255,0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2em;
            font-weight: 600;
            flex-shrink: 0;
        }
        .profile-banner-name { font-size: 1.4em; margin: 0 0 4px 0; font-weight: 600; }
        .profile-banner-id { font-size: 0.9em; opacity: 0.85; margin: 0 0 8px 0; }
        .profile-banner-meta { font-size: 0.8em; opacity: 0.8; margin: 0 0 2px 0; }
        .profile-role-tag {
            background: var(--primary-color);
            color: white;
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 0.85em;
            font-weight: 600;
        }
        .profile-cards-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            margin-bottom: 24px;
        }
        .profile-card {
            background: var(--card-color);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        .profile-card-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-color);
        }
        .profile-card-icon { font-size: 1.2em; }
        .profile-card-header h4 { margin: 0; font-size: 1em; }
        .profile-card-body {
            padding: 20px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        .profile-field {
            display: block;
            margin-bottom: 14px;
        }
        .profile-card-body .profile-field:last-of-type { margin-bottom: 0; }
        .profile-field-label {
            display: block;
            font-size: 0.75em;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 4px;
        }
        .profile-field-value { font-size: 0.95em; }
        .btn-profile {
            margin-top: 16px;
            padding: 8px 16px;
            font-size: 0.9em;
            background: var(--background-color);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-color);
            cursor: pointer;
        }
        .btn-profile:hover { background: var(--border-color); }
        .profile-quick-links { display: flex; flex-direction: column; gap: 10px; }
        .profile-quick-link {
            display: block;
            padding: 10px 14px;
            background: var(--background-color);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-color);
            text-decoration: none;
            font-size: 0.95em;
            transition: background 0.2s;
        }
        .profile-quick-link:hover { background: var(--border-color); }
        .profile-users-section {
            border: 1px solid var(--border-color);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        }
        .profile-users-header {
            background: var(--navy);
            color: white;
            padding: 14px 20px;
            font-weight: 600;
        }
        .profile-users-form {
            display: grid;
            grid-template-columns: 1fr 1fr auto auto auto;
            gap: 12px;
            padding: 20px;
            background: var(--background-color);
            border-bottom: 1px solid var(--border-color);
        }
        .profile-users-form input,
        .profile-users-form select {
            padding: 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 0.95em;
            min-width: 0;
        }
        .btn-register {
            background: #2563eb;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
        }
        .btn-register:hover { background: #1d4ed8; }
        .profile-users-table th,
        .profile-users-table td {
            padding: 14px 20px;
        }
        .profile-users-table th {
            font-size: 0.75em;
            text-transform: uppercase;
            color: var(--text-secondary);
            font-weight: 600;
        }
        .role-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 0.8em;
            font-weight: 600;
            color: white;
        }
        .role-badge.Director { background: var(--primary-color); }
        .role-badge.Gerente { background: var(--success-color); }
        .role-badge.Coordinador { background: #3b82f6; }
        .role-badge.Usuario { background: #64748b; }
        .btn-baja {
            padding: 6px 12px;
            font-size: 0.85em;
            background: var(--danger-color);
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
        }
        .btn-baja:hover { background: var(--danger-dark); }
        .profile-page { width: 100%; }
        .profile-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }

        .agreement-content { margin-top: 20px; }
        .agreement-card {
            background: var(--card-color);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 28px;
            max-width: 720px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        }
        .agreement-card h3 { margin: 0 0 16px 0; color: var(--primary-color); }
        .agreement-card p { margin: 0 0 14px 0; line-height: 1.7; color: var(--text-secondary); }
        .agreement-card p:last-child { margin-bottom: 0; }

        .users-table-wrapper {
            overflow-x: auto;
            margin-top: 0;
            padding: 0;
        }
        .profile-users-section .users-table-wrapper {
            padding: 16px 20px;
        }

        .users-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.9em;
        }

        .users-table th, .users-table td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid var(--border-color);
        }

        .users-table th {
            background-color: var(--background-color);
            font-weight: 600;
            color: var(--text-color);
        }

        .form-group {
            margin-bottom: 16px;
        }

        .form-group input {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 1em;
            box-sizing: border-box;
        }

        .btn-small {
            padding: 4px 10px;
            font-size: 0.8em;
        }

        .file-input-wrapper {
            position: relative;
            margin-bottom: 15px;
        }

        .file-input-wrapper input[type="file"] {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 0.9em;
            background-color: var(--card-color);
            transition: all 0.2s ease;
        }

        .file-input-wrapper input[type="file"]:hover {
            border-color: var(--primary-color);
        }

        .storage-progress-wrapper {
            margin-top: 10px;
        }
        .storage-progress-bar {
            height: 24px;
            background-color: var(--border-color);
            border-radius: 12px;
            overflow: hidden;
            margin-bottom: 8px;
        }
        .storage-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--success-color) 0%, var(--warning-color) 70%, var(--danger-color) 100%);
            border-radius: 12px;
            transition: width 0.3s ease;
            min-width: 4px;
        }
        .storage-progress-label {
            font-size: 0.85em;
            color: var(--text-secondary);
        }

        .help-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(15, 23, 42, 0.5);
            backdrop-filter: blur(4px);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 2000;
        }
        .help-modal.active { display: flex; }
        .help-content {
            background-color: var(--card-color);
            padding: 32px;
            border-radius: 12px;
            box-shadow: 0 8px 24px var(--shadow-hover);
            max-width: 560px;
            width: 90%;
            max-height: 85vh;
            overflow-y: auto;
        }
        .help-content h3 {
            color: var(--primary-color);
            margin-top: 0;
            margin-bottom: 20px;
        }
        .help-content h4 {
            color: var(--text-color);
            margin: 20px 0 10px 0;
            font-size: 1em;
        }
        .help-content ul, .help-content p {
            margin: 0 0 12px 0;
            color: var(--text-secondary);
            font-size: 0.95em;
            line-height: 1.6;
        }

        .container {
            width: 100%;
            max-width: 100%;
            margin: 0;
            background-color: transparent;
            padding: 8px 0 0 0;
        }

        .header-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding: 0 0 15px 0;
            border-bottom: 1px solid var(--border-color);
        }

        .header-actions h1 {
            color: var(--primary-color);
            font-weight: 300;
            margin: 0 0 4px 0;
        }

        .header-subtitle {
            color: var(--text-secondary);
            font-size: 1em;
            margin: 0;
        }

        h1 {
            color: var(--primary-color);
            font-weight: 300;
            margin: 0;
        }
        
        /* Estilos del Gantt */
        #gantt-container {
            background-color: var(--card-color);
            border-radius: 12px;
            box-shadow: 0 1px 3px var(--shadow-color);
            border: 1px solid var(--border-color);
            padding: 24px;
            margin-bottom: 30px;
        }

        .action-buttons {
            display: flex;
            gap: 15px;
        }

        .table-container {
            width: 100%;
            overflow-x: auto;
            border-radius: 12px;
            box-shadow: 0 1px 3px var(--shadow-color);
            border: 1px solid var(--border-color);
        }

        .project-section, .category-section {
            margin-bottom: 20px;
        }
        
        .project-details {
            font-size: 0.9em;
            color: var(--text-color);
            margin-top: 5px;
            margin-left: 15px;
        }

        .project-header, .category-header {
            background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
            color: white;
            padding: 14px 20px;
            cursor: pointer;
            border-radius: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(0, 31, 63, 0.25);
        }

        .project-header:hover, .category-header:hover {
            background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
        }

        .project-title, .category-title {
            font-weight: 500;
        }

        .project-actions, .category-actions {
            display: flex;
            gap: 10px;
        }

        .project-actions .btn, .category-actions .btn {
            padding: 5px 10px;
            font-size: 0.8em;
            background-color: white;
            color: var(--primary-color);
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }
        
        .project-actions .btn-add { background-color: var(--info-color); color: white; }
        .project-actions .btn-add:hover { background-color: var(--info-dark); }

        .activity-table {
            width: 100%;
            border-collapse: collapse;
            background-color: var(--card-color);
            min-width: 700px;
            border-radius: 8px 8px 0 0;
            overflow: hidden;
            margin-top: 10px;
        }

        .activity-table th, .activity-table td {
            padding: 15px;
            text-align: left;
            border-bottom: 1px solid var(--border-color);
        }

        .activity-table th {
            background-color: var(--background-color);
            color: var(--text-color);
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.875em;
            letter-spacing: 0.5px;
            border-bottom: 2px solid var(--border-color);
        }

        .activity-table tbody tr:hover {
            background-color: var(--background-color);
            transition: background-color 0.2s ease;
        }

        .tag {
            display: inline-block;
            padding: 6px 10px;
            border-radius: 15px;
            font-size: 0.8em;
            font-weight: 500;
            color: white;
            white-space: nowrap;
            letter-spacing: 0.5px;
        }

        .tag.Diseño { background-color: var(--warning-color); color: white; }
        .tag.Backend { background-color: var(--primary-color); color: white; }
        .tag.Frontend { background-color: var(--success-color); color: white; }
        .tag.Planificación { background-color: var(--secondary-color); color: white; }
        .tag.General { background-color: var(--info-color); color: white; }
        .tag.Completado { background-color: var(--success-color); color: white; }
        .tag.Por-Hacer { background-color: var(--secondary-color); color: white; }
        .tag.En-Progreso { background-color: var(--info-color); color: white; }

        .actions-cell {
            display: flex;
            gap: 10px;
            align-items: center;
            justify-content: flex-start;
        }

        .actions-cell .btn {
            padding: 8px 12px;
            font-size: 0.85em;
            border-radius: 6px;
            border: none;
            color: white;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        .actions-cell .btn-warning { background-color: var(--warning-color); color: white; }
        .actions-cell .btn-danger { background-color: var(--danger-color); }

        .semaphore {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            display: inline-block;
            margin-right: 8px;
        }

        .sem-green { background-color: var(--success-color); }
        .sem-yellow { background-color: var(--warning-color); }
        .sem-red { background-color: var(--danger-color); }
        .sem-grey { background-color: var(--secondary-color); }

        .btn, .btn-add {
            display: inline-block;
            padding: 10px 20px;
            border: none;
            background-color: var(--primary-color);
            color: white;
            border-radius: 8px;
            font-size: 0.95em;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            text-decoration: none;
            box-shadow: 0 2px 4px rgba(255, 102, 0, 0.25);
        }

        .btn:hover, .btn-add:hover {
            background-color: var(--primary-dark);
            transform: translateY(-1px);
            box-shadow: 0 4px 6px var(--shadow-hover);
        }

        .btn-success { background-color: var(--success-color); }
        .btn-success:hover { background-color: var(--success-dark); }

        .btn-danger { background-color: var(--danger-color); }
        .btn-danger:hover { background-color: var(--danger-dark); }

        .btn-warning { background-color: var(--warning-color); color: white; }
        .btn-warning:hover { background-color: var(--warning-dark); }

        .select-status {
            padding: 8px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
            background-color: var(--card-color);
            font-size: 0.9em;
            color: var(--text-color);
        }

        .form-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(15, 23, 42, 0.5);
            backdrop-filter: blur(4px);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .form-container.active {
            display: flex;
        }

        .task-form, .project-form, .category-form {
            background-color: var(--card-color);
            padding: 24px;
            border-radius: 12px;
            box-shadow: 0 8px 24px var(--shadow-hover);
            border: 1px solid var(--border-color);
            width: 90%;
            max-width: 450px;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .task-form h3, .project-form h3, .category-form h3 {
            color: var(--primary-color);
            font-weight: 600;
            margin-bottom: 4px;
            text-align: center;
            font-size: 1.25em;
        }

        .task-form label, .project-form label, .category-form label {
            font-size: 0.875em;
            color: var(--text-secondary);
            display: block;
            margin-bottom: 6px;
            font-weight: 500;
        }

        .task-form input, .task-form textarea, .task-form select,
        .project-form input, .project-form select,
        .category-form input, .category-form select {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            box-sizing: border-box;
            font-size: 0.9em;
            color: var(--text-color);
            background-color: var(--card-color);
            transition: all 0.2s ease;
        }

        .task-form input:focus, .task-form textarea:focus, .task-form select:focus,
        .project-form input:focus, .project-form select:focus,
        .category-form input:focus, .category-form select:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
        }

        .task-form textarea {
            min-height: 60px;
        }

        .form-actions {
            display: flex;
            gap: 6px;
            justify-content: flex-end;
            margin-top: 8px;
        }

        .form-actions .btn {
            padding: 6px 10px;
            font-size: 0.85em;
        }
        
        .empty-state {
            text-align: center;
            padding: 50px 20px;
            color: var(--secondary-color);
            font-style: italic;
        }

        @media (max-width: 900px) {
            .profile-cards-grid { grid-template-columns: 1fr; }
            .profile-users-form {
                grid-template-columns: 1fr 1fr;
            }
            .profile-users-form .btn-register { grid-column: 1 / -1; }
        }
        @media (max-width: 600px) {
            .profile-users-form {
                grid-template-columns: 1fr;
            }
            .profile-banner {
                flex-direction: column;
                align-items: flex-start;
            }
            .profile-role-tag {
                align-self: flex-start;
            }
        }
        @media (max-width: 768px) {
            .container {
                width: 100%;
                padding: 0;
                margin: 0;
            }

            .header-actions {
                flex-direction: column;
                align-items: stretch;
                gap: 15px;
            }

            .action-buttons {
                width: 100%;
                flex-direction: column;
                gap: 10px;
            }

            .activity-table {
                min-width: auto;
            }

            .app-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
                padding: 12px 16px;
            }

            .app-header-left {
                flex-wrap: wrap;
            }

            .app-header-tagline {
                display: none;
            }

            .app-header h1 {
                font-size: 1.2em;
            }

            .app-body {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                position: relative;
                top: 0;
                height: auto;
                box-shadow: 0 2px 8px rgba(0,0,0,0.2);
                display: flex;
                flex-direction: row;
                flex-wrap: wrap;
                align-items: center;
                justify-content: center;
            }

            .sidebar-logo {
                padding: 10px 15px;
                margin-bottom: 0;
                border-bottom: 1px solid var(--border-color);
                order: 0;
                width: 100%;
                text-align: center;
            }
            .sidebar-logo img {
                max-height: 36px;
            }

            .sidebar-menu {
                display: flex;
                overflow-x: auto;
                flex: 1;
                padding: 8px 0;
            }

            .sidebar-menu-item {
                flex-shrink: 0;
            }

            .sidebar-menu-link {
                white-space: nowrap;
                border-left: none;
                border-bottom: 3px solid transparent;
            }

            .sidebar-menu-link.active {
                border-left: none;
                border-bottom-color: var(--primary-light);
            }

            .sidebar-secondary {
                display: flex;
                flex-wrap: wrap;
                gap: 8px;
                padding: 8px 12px;
                margin-top: 0;
                order: 2;
                width: 100%;
            }
            .sidebar-secondary-link {
                font-size: 0.7em;
                padding: 4px 8px;
                margin-left: 0;
            }
            .sidebar-footer {
                display: none;
            }

            .user-bar {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
                width: 100%;
            }

            .user-info {
                width: 100%;
            }

            .trial-counter {
                width: 100%;
                text-align: center;
            }

            .btn-logout {
                width: 100%;
            }

            .btn-settings {
                width: 100%;
                margin-right: 0;
                margin-bottom: 10px;
            }

            .settings-form {
                max-width: 95%;
                padding: 20px;
            }

            .kpi-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .kpi-card {
                padding: 12px;
            }

            .kpi-value {
                font-size: 1.4em;
            }

            .kpi-title {
                font-size: 0.65em;
            }

            .kpi-change {
                font-size: 0.65em;
            }

            .charts-grid {
                grid-template-columns: 1fr;
            }

            .chart-container {
                min-height: 220px;
                padding: 8px;
            }

            #projects-progress-chart {
                min-height: 280px;
                padding: 10px 5px;
            }

            .pie-chart-svg {
                width: 150px;
                height: 150px;
            }

            .chart-legend {
                gap: 12px;
                font-size: 0.8em;
            }

            .main-content-area {
                padding: 20px 30px 20px 30px;
            }

            .container {
                padding: 0;
            }

            .dashboard-header {
                margin-bottom: 20px;
            }
