/* CRM Datamind Styles - Inspired by DataMind AI Corporate Design */

:root {
    --primary-color: #4eb478;
    --primary-dark: #45a36c;
    --primary-hover: #72c393;
    --secondary-color: #a3ff00;
    --success-color: #4eb478;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #0a0a0a;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-primary: #232323;
    --text-secondary: #444444;
    --text-muted: #777777;
    --border-color: #e5e7eb;
    --shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 0 30px rgba(214, 215, 216, 0.6);
}

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

body {
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 300;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
}

/* Header - Matching AI Agents Platform */
.header {
    background: #000000;
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.3);
    padding: 0;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 997;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo a:hover {
    color: #fff;
    text-decoration: none;
}

.logo img {
    max-height: 36px;
    vertical-align: middle;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
}

.header-user span {
    opacity: 0.8;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 5px;
    padding: 5px;
    box-shadow: var(--shadow);
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(78, 180, 120, 0.08);
}

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

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

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

/* Sections - Card style matching AI Agents Platform */
.section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 25px;
    border-radius: 5px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 0;
    transition: 0.3s;
    overflow: hidden;
}

.section:hover {
    box-shadow: var(--shadow-lg);
}

.section h2 {
    margin-bottom: 12px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 6px;
    font-size: 1.25rem;
}

/* Forms */
.form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 3px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.875rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background-color: #c0c0c0;
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.875rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.filter-bar select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    min-width: 180px;
    font-size: 0.875rem;
}

/* Prospects Grid */
.prospects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.prospect-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prospect-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.prospect-card h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.prospect-card .status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.status-lead_frio { background: #f1f5f9; color: #475569; }
.status-primer_contacto { background: #e6f9ee; color: #2d7a4a; }
.status-desarrollo { background: #fef3c7; color: #92400e; }
.status-presupuesto { background: #ede9fe; color: #5b21b6; }
.status-aceptado { background: #d1fae5; color: #065f46; }
.status-rechazado { background: #fee2e2; color: #991b1b; }

.prospect-card p {
    margin: 5px 0;
    font-size: 0.875rem;
}

/* List Section (no card style) */
.list-section {
    margin-bottom: 15px;
}

.list-header {
    margin-bottom: 12px;
}

.list-header h2 {
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 1.25rem;
}

/* Prospects Table */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.prospects-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    min-width: 900px;
}

.prospects-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.prospects-table th {
    padding: 10px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prospects-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
}

.prospects-table tbody tr {
    transition: background-color 0.2s ease;
}

.prospects-table tbody tr:hover {
    background-color: var(--bg-color);
}

.prospects-table tbody tr:last-child td {
    border-bottom: none;
}

.prospects-table .status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.count-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 10px;
}

/* Sales Goals */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
}

.goal-card {
    background: white;
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.goal-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}

.goal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #39ff14, #2bcc0f);
}

.goal-card.goal-complete {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.goal-card.goal-complete::before {
    background: linear-gradient(180deg, #059669, #34d399);
}

.goal-card.goal-warning {
    border-color: #fcd34d;
    background: linear-gradient(135deg, #ffffff 0%, #fefce8 100%);
}

.goal-card.goal-warning::before {
    background: linear-gradient(180deg, #f59e0b, #fbbf24);
}

.goal-card.goal-danger {
    border-color: #fca5a5;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.goal-card.goal-danger::before {
    background: linear-gradient(180deg, #ef4444, #f87171);
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.goal-actions {
    display: flex;
    gap: 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.goal-card:hover .goal-actions {
    opacity: 1;
}

.goal-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.goal-product {
    display: flex;
    align-items: center;
    gap: 10px;
}

.goal-product-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #f0f9ff, #e6f9ee);
}

.goal-title strong {
    font-size: 1.15rem;
    color: var(--text-primary);
    font-weight: 600;
}

.goal-period {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.goal-period-badge {
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
}

.goal-progress {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 500;
}

.progress-label-icon {
    font-size: 1rem;
}

.progress-values {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.progress-values strong {
    color: var(--text-primary);
    font-weight: 600;
}

.progress-bar-container {
    height: 10px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease-out;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-bar.progress-low {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.progress-bar.progress-medium {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.progress-bar.progress-good {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.progress-bar.progress-complete {
    background: linear-gradient(90deg, #059669, #10b981);
}

.progress-bar.progress-complete::after {
    display: none;
}

.progress-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.progress-pct {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f8fafc;
}

.progress-pct.pct-low { color: #ef4444; background: #fef2f2; }
.progress-pct.pct-medium { color: #d97706; background: #fffbeb; }
.progress-pct.pct-good { color: #059669; background: #ecfdf5; }
.progress-pct.pct-complete { color: #047857; background: #d1fae5; }

.progress-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.modal-small {
    max-width: 520px;
}

.modal-small .form {
    padding: 10px 0;
}

.modal-small .form-group label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.modal-small .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-top: 10px;
}

/* Empty state for goals */
#sales-goals-list .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

#sales-goals-list .empty-state::before {
    content: '🎯';
    display: block;
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Filter bar improvements for goals */
#sales-goals-tab .filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
}

#sales-goals-tab .filter-bar input[type="number"] {
    width: 100px;
    padding: 10px 12px;
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

#sales-goals-tab .filter-bar input[type="number"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Dashboard */
.metrics-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
}

.metrics-filters input {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.metrics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 25px;
    border-radius: 5px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: 0.3s;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.metric-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: bold;
}

/* Pipeline Chart */
.pipeline-section,
.sellers-section {
    margin-top: 30px;
}

.pipeline-chart {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pipeline-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pipeline-bar {
    flex: 1;
    height: 40px;
    background: var(--primary-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: white;
    font-weight: 500;
}

.pipeline-label {
    min-width: 200px;
    font-weight: 500;
}

/* Sellers */
.sellers-list,
.sellers-table {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.seller-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.seller-info h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: block;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    transition: all 0.3s ease;
}

/* Modal maximizado */
.modal.maximized .modal-content {
    margin: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding: 20px;
}

/* Modal header con controles */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.modal-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    padding: 0;
}

.modal-btn:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.modal-btn svg {
    pointer-events: none;
}

.close {
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close:hover {
    color: var(--danger-color);
}

.comments-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.comments-section h3 {
    margin-bottom: 15px;
}

#comment-form {
    margin-bottom: 20px;
}

#comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 10px;
}

.comment-item {
    background: var(--bg-color);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.comment-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.comment-updated {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

.comment-actions {
    margin-left: auto;
    display: flex;
    gap: 5px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.2s, background-color 0.2s;
}

.btn-icon:hover {
    opacity: 1;
    background-color: var(--border-color);
}

.btn-danger-icon:hover {
    background-color: #fee2e2;
}

/* Prospect Edit Form */
.prospect-edit-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Document section styles */
.documents-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.documents-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.document-upload {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
    padding: 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.document-upload input[type="file"] {
    flex: 1;
    padding: 0.5rem;
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.document-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.document-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.document-icon {
    font-size: 1.5rem;
}

.document-info div {
    display: flex;
    flex-direction: column;
}

.document-info strong {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.document-info small {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.text-secondary {
    color: var(--text-secondary);
    font-style: italic;
}

/* Sales Funnel Styles */
.funnel-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.funnel-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.sales-funnel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
}

.funnel-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 65px;
    min-width: 300px;
    padding: 0 24px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    overflow: hidden;
}

.funnel-stage:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.funnel-stage-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 2;
    white-space: nowrap;
}

.funnel-stage-label {
    font-size: 0.95rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.funnel-stage-count {
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding: 0 8px;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    border-right: 2px solid rgba(255, 255, 255, 0.3);
}

.funnel-stage-value {
    font-size: 0.85rem;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

/* Funnel stage widths - progressively narrower */
.funnel-stage-0 { width: 90%; }
.funnel-stage-1 { width: 75%; }
.funnel-stage-2 { width: 60%; }
.funnel-stage-3 { width: 45%; }
.funnel-stage-4 { width: 30%; }

/* Funnel stage colors (same as status colors) */
.funnel-stage-lead_frio { background: linear-gradient(135deg, #94a3b8, #64748b); }
.funnel-stage-primer_contacto { background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); }
.funnel-stage-desarrollo { background: linear-gradient(135deg, #f59e0b, #d97706); }
.funnel-stage-presupuesto { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.funnel-stage-aceptado { background: linear-gradient(135deg, #10b981, #059669); }

/* Funnel connector arrows */
.funnel-connector {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 12px solid #2a2a2a;
    opacity: 0.5;
}

/* Empty state for funnel */
.funnel-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    background: transparent;
    border-top: 1px solid var(--border-color);
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.footer-link:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.footer-link span {
    font-weight: 400;
}

.footer-logo {
    height: 24px;
    width: auto;
    vertical-align: middle;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
}

.footer-link:hover .footer-logo {
    filter: grayscale(0%) opacity(1);
}

/* Recursos Grid */
.recursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.recurso-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.recurso-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.recurso-icon {
    font-size: 3rem;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f0f9ff, #e6f9ee);
    border-radius: 10px;
    margin-bottom: 5px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recurso-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: contain;
    border-radius: 6px;
}

.recurso-icon-fallback {
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recurso-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.recurso-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    word-break: break-word;
}

.recurso-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    width: fit-content;
}

.recurso-producto {
    display: inline-block;
    background: #f1f5f9;
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    width: fit-content;
}

.recurso-size {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.recurso-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 5px 0 0 0;
    line-height: 1.4;
}

.recurso-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.recurso-actions .btn {
    flex: 1;
    text-align: center;
    text-decoration: none;
}

/* Recursos filter bar adjustments */
#recursos-tab .filter-bar {
    flex-wrap: wrap;
    align-items: center;
}

#recursos-tab .filter-bar select {
    min-width: 160px;
}

/* Empty state for recursos */
#recursos-list .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

#recursos-list .empty-state::before {
    content: '📁';
    display: block;
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 8px;
    padding: 10px 0 20px 0;
    min-height: 500px;
}

.kanban-column {
    flex: 1 1 0;
    min-width: 0;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.kanban-column-header {
    padding: 12px 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: 600;
}

.kanban-column-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kanban-column-count {
    background: rgba(255,255,255,0.25);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.kanban-header-lead-frio { background: linear-gradient(135deg, #94a3b8, #64748b); }
.kanban-header-primer-contacto { background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); }
.kanban-header-desarrollo { background: linear-gradient(135deg, #f59e0b, #d97706); }
.kanban-header-presupuesto { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.kanban-header-aceptado { background: linear-gradient(135deg, #10b981, #059669); }
.kanban-header-rechazado { background: linear-gradient(135deg, #dc2626, #b91c1c); }

.kanban-column-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kanban-card {
    background: white;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    border-left-color: var(--primary-color);
}

.kanban-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.kanban-card-contact {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.kanban-card-producto {
    display: inline-block;
    background: #e6f9ee;
    color: var(--primary-dark);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #2a2a2a;
}

.kanban-card-seller {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.kanban-card-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success-color);
}

.kanban-empty {
    text-align: center;
    padding: 20px 10px;
    color: #94a3b8;
    font-size: 0.8rem;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .header-bar {
        height: auto;
        padding: 10px 0;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .header {
        height: auto;
    }

    .logo a {
        font-size: 1.1rem;
    }

    .logo img {
        max-height: 28px;
    }

    .prospects-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .tabs {
        overflow-x: auto;
    }
}

/* Calendar View */
.calendar-day-group {
    margin-bottom: 20px;
}

.calendar-day-header {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    padding: 10px 15px;
    background: rgba(78, 180, 120, 0.2);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 5px 5px 0;
    margin-bottom: 10px;
}

.calendar-day-past .calendar-day-header {
    background: rgba(239, 68, 68, 0.15);
    border-left-color: #ef4444;
    color: #fca5a5;
}

.calendar-tasks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    padding-left: 20px;
}

.calendar-task-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.calendar-task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.calendar-task-card.has-pendiente {
    border-left: 4px solid #ff9800;
}

.calendar-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Pendiente Badge */
.pendiente-badge {
    display: inline-block;
    background: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pendiente Toggle */
.pendiente-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #fff8e1;
    border: 2px solid #ff9800;
    border-radius: 8px;
    margin-top: 10px;
}

.pendiente-toggle label {
    font-weight: 600;
    color: #e65100;
    cursor: pointer;
    font-size: 0.95rem;
}

.pendiente-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #ff9800;
    cursor: pointer;
}

/* Rejection Reason */
.rejection-reason-field {
    margin-top: 10px;
    padding: 10px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 5px;
}

.rejection-reason-field label {
    color: #991b1b;
    font-weight: 600;
}

/* Detail sections in modal */
.detail-section {
    margin-bottom: 15px;
}

.detail-section h4 {
    font-size: 0.9rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
