@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* Grade Badge Styles */
.grade-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: bold;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.grade-aa {
    background-color: #FFD700;
    color: #333;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.grade-a {
    background-color: #22c55e;
    color: white;
}

.grade-b {
    background-color: #3b82f6;
    color: white;
}

.grade-c {
    background-color: #9ca3af;
    color: white;
}

.grade-d {
    background-color: #ef4444;
    color: white;
}

.grade-reject {
    background-color: #ef4444;
    color: white;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    height: 100vh;
    background-color: #f9fafb;
}

/* Sidebar Styles */
.sidebar {
    width: 16rem;
    background-color: white;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-logo-icon {
    width: 2rem;
    height: 2rem;
    background-color: #000;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.sidebar-logo-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
}

.sidebar-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav-item-active {
    width: 100%;
    justify-content: flex-start;
    background-color: #f3f4f6;
    color: #111827;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.sidebar-nav-item-inactive {
    width: 100%;
    justify-content: flex-start;
    color: #4b5563;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-nav-item-inactive:hover {
    color: #111827;
    background-color: #f9fafb;
}

.sidebar-nav-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.75rem;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header Styles */
.header {
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
}

.header-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Dashboard Content Styles */
.dashboard-main {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.metric-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

/* Charts Section */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

/* Transactions Table */
.transactions-card {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.transactions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.transactions-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

/* Badges */
.badge-revenue {
    background-color: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-expense {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-completed {
    background-color: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Variables CSS personalizadas */
:root {
    --gray-light: #f8f9fa;
    --gray-medium: #dee2e6;
    --gray-dark: #343a40;
    --blue-soft: #5c7cfa;
}

/* Layout global */
body {
    background-color: var(--gray-light);
    color: var(--gray-dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Header personalizado */
.fcd-header {
    background: white;
    border-bottom: 1px solid var(--gray-medium);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.fcd-header h1 {
    color: var(--gray-dark);
    font-weight: 600;
    letter-spacing: -0.025em;
}

/* Footer personalizado */
.fcd-footer {
    background: var(--gray-light);
    border-top: 1px solid var(--gray-medium);
    color: #6c757d;
    font-size: 0.875rem;
}

/* Cards profesionales */
.fcd-card {
    background: white;
    border: 1px solid var(--gray-medium);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

/* Tablas responsivas */
.fcd-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.fcd-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--gray-dark);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.fcd-table td {
    border-top: 1px solid var(--gray-medium);
}

/* Botones estandarizados */
.btn-primary {
    background: var(--blue-soft);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #4c6ef5;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--gray-dark);
    border: 1px solid var(--gray-medium);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

/* Form spacing improvements */
.fcd-card form {
    margin-bottom: 0;
}

.fcd-card input[type="text"],
.fcd-card input[type="email"],
.fcd-card input[type="tel"],
.fcd-card input[type="number"],
.fcd-card select,
.fcd-card textarea {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    width: 100%;
}

.fcd-card input[type="text"]:focus,
.fcd-card input[type="email"]:focus,
.fcd-card input[type="tel"]:focus,
.fcd-card input[type="number"]:focus,
.fcd-card select:focus,
.fcd-card textarea:focus {
    outline: none;
    border-color: var(--blue-soft);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Enhanced Form Styling */
select, input[type="text"], input[type="number"], input[type="email"], input[type="date"], input[type="tel"], textarea {
    background-color: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem !important;
    transition: all 0.2s ease-in-out !important;
    font-weight: 500 !important;
}

select:hover, input[type="text"]:hover, input[type="number"]:hover, input[type="email"]:hover, input[type="date"]:hover, input[type="tel"]:hover, textarea:hover {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

select:focus, input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="date"]:focus, input[type="tel"]:focus, textarea:focus {
    background-color: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

/* Disabled form elements */
select:disabled, input:disabled, textarea:disabled {
    background-color: #f1f5f9 !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
}

/* Required field indicator */
.required-field::after {
    content: " *";
    color: #ef4444;
    font-weight: bold;
}

/* Form sections with better contrast */
.form-section {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Slider Styling */
.slider {
    -webkit-appearance: none;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.slider:hover {
    opacity: 1;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Navegación móvil */
@media (max-width: 768px) {
    .fcd-nav {
        display: none;
    }
    
    .fcd-nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid var(--gray-medium);
        z-index: 50;
    }
}

/* Estados financieros árbol */
.financial-tree {
    font-family: 'Fira Code', monospace;
}

.tree-level-1 { padding-left: 0; font-weight: 600; }
.tree-level-2 { padding-left: 1rem; }
.tree-level-3 { padding-left: 2rem; }
.tree-level-4 { padding-left: 3rem; }

/* KPI Cards */
.kpi-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--blue-soft);
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-dark);
    line-height: 1;
}

.kpi-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

/* Alertas y notificaciones */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1edff;
    color: #0c4a6e;
    border: 1px solid #7dd3fc;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Collapsible Sidebar Styles */
.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.sidebar-nav-item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.sidebar-nav-item.active {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.sidebar-nav-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* Mobile Responsive Adjustments */
@media (max-width: 1023px) {
    .lg\:ml-64 {
        margin-left: 0 !important;
    }
    
    .lg\:translate-x-0 {
        transform: translateX(0) !important;
    }
    
    .lg\:static {
        position: static !important;
    }
    
    .lg\:inset-0 {
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
    }
} 