/* ==============================================================================
   TPS RECLUTA CRM - SISTEMA DE DISEÑO & ESTILOS VISUALES
   Dominio: https://recluta.thepeoplestaff.com
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Paleta de Colores TPS Premium */
    --tps-primary: #0f172a;       /* Slate 900 */
    --tps-primary-light: #1e293b; /* Slate 800 */
    --tps-accent: #2563eb;        /* Royal Blue */
    --tps-accent-hover: #1d4ed8;
    --tps-teal: #0d9488;          /* Teal 600 */
    --tps-purple: #7c3aed;        /* Purple 600 */
    --tps-gold: #d97706;          /* Amber 600 */
    --tps-success: #16a34a;       /* Green 600 */
    --tps-danger: #dc2626;        /* Red 600 */
    
    /* Neutrales & Glassmorphism */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-color-hover: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    /* Sombras Elevadas & Radios */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout Estructura */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Lateral Navigation */
.app-sidebar {
    width: 260px;
    background: var(--tps-primary);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: fixed;
    height: 100vh;
    z-index: 50;
    box-shadow: var(--shadow-lg);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 2rem;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--tps-accent), var(--tps-teal));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.sidebar-title {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.sidebar-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    margin: 1.25rem 0.75rem 0.5rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-item a:hover, .nav-item.active a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active a {
    background: linear-gradient(90deg, var(--tps-accent), #3b82f6);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.user-profile-bottom {
    margin-top: auto;
    padding: 1rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: var(--tps-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Área Principal de Contenido */
.main-wrapper {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-header {
    background: var(--bg-card);
    height: 70px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 40;
}

.page-header-title h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.page-header-title p {
    font-size: 0.825rem;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.content-body {
    padding: 2rem;
    flex: 1;
}

/* Botones & Inputs */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--tps-accent);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: var(--tps-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: var(--border-color-hover);
}

.btn-success {
    background: var(--tps-success);
    color: #ffffff;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* Tarjetas & Dashboards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-color-hover);
}

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

.stat-icon.blue { background: #dbeafe; color: var(--tps-accent); }
.stat-icon.teal { background: #ccfbf1; color: var(--tps-teal); }
.stat-icon.purple { background: #ede9fe; color: var(--tps-purple); }
.stat-icon.gold { background: #fef3c7; color: var(--tps-gold); }

.stat-details .value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-details .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.2rem;
}

.tps-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    overflow: hidden;
}

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

.tps-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tps-card-body {
    padding: 1.5rem;
}

/* Tablas Estilizadas */
.tps-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.tps-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.tps-table th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.725rem;
    letter-spacing: 0.05em;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.tps-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.tps-table tbody tr:hover {
    background: #f1f5f9;
}

/* Badges & Pills */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-abierto { background: #dcfce7; color: #15803d; }
.badge-en_proceso { background: #dbeafe; color: #1e40af; }
.badge-pausado { background: #fef3c7; color: #b45309; }
.badge-cerrado { background: #f1f5f9; color: #475569; }

/* Match Score Pill */
.score-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
}

.score-high { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.score-medium { background: #fef3c7; color: #92400e; border: 1px solid #fde047; }
.score-low { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Modal Styles */
.tps-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.tps-modal-overlay.active {
    display: flex;
}

.tps-modal {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tps-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tps-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.tps-modal-body {
    padding: 1.5rem;
}

/* Form Controls */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.825rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-family: inherit;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--tps-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

/* Kanban Board Styling */
.kanban-board {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    min-height: 600px;
}

.kanban-column {
    flex: 0 0 280px;
    background: #f1f5f9;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    max-height: 80vh;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.kanban-column-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-primary);
}

.kanban-count {
    background: #cbd5e1;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
}

.kanban-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    overflow-y: auto;
    flex: 1;
    padding-right: 0.25rem;
}

.kanban-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: var(--transition);
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--tps-accent);
}

.kanban-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.kanban-card-subtitle {
    font-size: 0.775rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}
