/* =========================
   RESET BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.talentum-body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #f4f6f9;
    color: #1f2937;
}

/* =========================
   LAYOUT GENERAL
========================= */
.talentum-app-shell {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
}

.talentum-sidebar {
    width: 325px;
    min-width: 325px;
    max-width: 325px;
    background: linear-gradient(180deg, #0f2f63 0%, #143d7a 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow: hidden;
}

.talentum-sidebar-brand {
    padding: 22px 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.talentum-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 24px;
}

.talentum-sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.talentum-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.22);
    border-radius: 999px;
}

.talentum-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.talentum-sidebar::-webkit-scrollbar {
    width: 8px;
}

.talentum-sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
}

.talentum-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.28);
    border-radius: 10px;
}

.talentum-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.42);
}

.talentum-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.talentum-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.talentum-main-content {
    padding: 18px 22px 22px;
}

.talentum-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.talentum-logo {
    width: 210px;
    max-width: 100%;
    transition: transform 0.3s ease;
}

.talentum-logo:hover {
    transform: scale(1.12);
}

.talentum-brand-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-top: 8px;
}

.talentum-brand-subtitle {
    font-size: 12px;
    opacity: 0.78;
    margin-top: 4px;
}

.talentum-topbar-title {
    font-size: 22px;
    font-weight: 700;
    color: #0D2C54;
}

.talentum-topbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.talentum-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 12px;
    color: #6b7280;
}

.talentum-user-info strong {
    color: #111827;
    font-size: 13px;
}

/* =========================
   MENÚ DINÁMICO
========================= */
.talentum-nav-section-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255,255,255,.92);
    margin: 14px 6px 6px;
    padding-left: 4px;
}

.talentum-nav-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    margin-top: 4px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,.88);
    text-align: left;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.25s ease;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.talentum-nav-group-toggle:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.talentum-nav-group-toggle.is-open {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.talentum-nav-group-title {
    display: inline-flex;
    align-items: center;
    flex: 1;
}

.talentum-nav-group-arrow {
    font-size: 12px;
    transition: transform 0.25s ease;
}

.talentum-nav-group-toggle.is-open .talentum-nav-group-arrow {
    transform: rotate(180deg);
}

.talentum-nav-group-content {
    display: none;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    margin-left: 4px;
    margin-bottom: 8px;
    padding-left: 4px;
}

.talentum-nav-group-content.is-open {
    display: flex;
}

.talentum-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px 9px 14px;
    border-radius: 10px;
    color: rgba(255,255,255,.92);
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 14px;
    font-weight: 600;
    min-height: 38px;
}

.talentum-nav-link-icon {
    width: 18px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.talentum-nav-link.is-active {
    background: #F39200;
    color: #fff;
    box-shadow: 0 6px 16px rgba(243, 146, 0, 0.25);
    font-weight: 700;
}

.talentum-nav-link:hover {
    background: rgba(243, 146, 0, 0.9);
    color: #fff;
    transform: translateX(2px);
}

.talentum-nav-link-disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* =========================
   PAGE
========================= */
.talentum-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.talentum-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.talentum-page-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.05;
    color: #0f172a;
}

.talentum-page-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin-top: 6px;
}

.talentum-page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* =========================
   CARD
========================= */
.talentum-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #e9eef5;
}

.talentum-card-header {
    margin-bottom: 16px;
}

.talentum-card-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.talentum-card-body {
    position: relative;
    z-index: 1;
}

.talentum-card-body--compact {
    padding: 0;
}

.talentum-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

/* =========================
   ALERTAS
========================= */
.talentum-alert {
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
}

.talentum-alert-success {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

.talentum-alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.talentum-alert-warning {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fdba74;
}

.talentum-alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

/* =========================
   BOTONES
========================= */
.talentum-btn {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 700;
}

.talentum-btn-primary {
    background: #0D2C54;
    color: #fff;
}

.talentum-btn-primary:hover {
    background: #F39200;
    color: #fff;
    transform: translateY(-1px);
}

.talentum-btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.talentum-btn-secondary:hover {
    background: #d1d5db;
}

.talentum-btn-danger {
    background: #dc2626;
    color: #fff;
}

.talentum-btn-danger:hover {
    background: #b91c1c;
    color: #fff;
}

.talentum-btn-warning {
    background: #f59e0b;
    color: #fff;
}

.talentum-btn-warning:hover {
    background: #d97706;
    color: #fff;
}

.talentum-btn-info {
    background: #0ea5e9;
    color: #fff;
}

.talentum-btn-info:hover {
    background: #0284c7;
    color: #fff;
}

.talentum-btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

/* =========================
   FILTROS Y BÚSQUEDA
========================= */
.talentum-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.talentum-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.talentum-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.talentum-filter-search .talentum-input {
    padding-left: 2.2rem;
}

.talentum-search-box {
    position: relative;
}

.talentum-search-box i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.9rem;
}

.talentum-filters-inline {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.talentum-filters-inline .filter-col-1 { grid-column: span 1; }
.talentum-filters-inline .filter-col-2 { grid-column: span 2; }
.talentum-filters-inline .filter-col-3 { grid-column: span 3; }
.talentum-filters-inline .filter-col-4 { grid-column: span 4; }
.talentum-filters-inline .filter-col-5 { grid-column: span 5; }
.talentum-filters-inline .filter-col-6 { grid-column: span 6; }

.talentum-filter-actions-inline {
    display: flex;
    gap: 8px;
    align-items: end;
    flex-wrap: wrap;
}

/* =========================
   FORMULARIOS
========================= */
.talentum-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.talentum-grid {
    display: grid;
    gap: 16px;
}

.talentum-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.talentum-grid-col-2 {
    grid-column: span 2;
}

.talentum-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.talentum-label {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}

.talentum-input,
.talentum-select,
.talentum-textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    min-height: 42px;
    background: #fff;
    color: #111827;
}

.talentum-textarea {
    min-height: 110px;
    resize: vertical;
}

.talentum-input:focus,
.talentum-select:focus,
.talentum-textarea:focus {
    outline: none;
    border-color: #0D2C54;
    box-shadow: 0 0 0 3px rgba(13, 44, 84, 0.08);
}

.is-invalid {
    border-color: #dc2626 !important;
}

.talentum-invalid-feedback {
    font-size: 12px;
    color: #b91c1c;
    font-weight: 600;
}

.text-muted {
    font-size: 12px;
    color: #6b7280;
}

.d-block {
    display: block;
}

.d-inline {
    display: inline;
}

.text-end {
    text-align: right;
}

.text-center {
    text-align: center;
}

/* =========================
   DETALLE
========================= */
.talentum-detail-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.talentum-detail-label {
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.talentum-detail-value {
    font-size: 14px;
    color: #0f172a;
    line-height: 1.45;
}

/* =========================
   TABLAS
========================= */
.talentum-table-responsive,
.talentum-table-wrap {
    overflow-x: auto;
}

.talentum-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.talentum-table thead th {
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    white-space: nowrap;
    text-align: left;
    text-transform: uppercase;
}

.talentum-table tbody td {
    padding: 8px 8px;
    font-size: 14px;
    color: #334155;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
    line-height: 1.2;
}

.talentum-table tbody tr:hover {
    background: #f8fafc;
}

.talentum-table tbody tr:last-child td {
    border-bottom: none;
}

/* =========================
   BADGES
========================= */
.talentum-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

.talentum-badge-success {
    background: #dcfce7;
    color: #166534;
}

.talentum-badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.talentum-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.talentum-badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

.talentum-badge-secondary {
    background: #e5e7eb;
    color: #374151;
}

/* =========================
   ACCIONES ICONOGRÁFICAS
========================= */
.talentum-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.talentum-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.talentum-icon-view {
    background: #e0f2fe;
    color: #0369a1;
}

.talentum-icon-view:hover {
    background: #0ea5e9;
    color: #fff;
}

.talentum-icon-edit {
    background: #fef3c7;
    color: #b45309;
}

.talentum-icon-edit:hover {
    background: #f59e0b;
    color: #fff;
}

.talentum-icon-delete {
    background: #fee2e2;
    color: #b91c1c;
}

.talentum-icon-delete:hover {
    background: #dc2626;
    color: #fff;
}

.talentum-icon-success {
    background: #dcfce7;
    color: #166534;
}

.talentum-icon-success:hover {
    background: #16a34a;
    color: #fff;
}

/* =========================
   EMPTY STATE
========================= */
.talentum-empty {
    padding: 18px 12px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

/* =========================
   PAGINACIÓN
========================= */
.talentum-pagination-wrap {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eef2f7;
}

.talentum-pagination-wrap nav {
    display: flex;
    justify-content: flex-end;
}

.talentum-pagination-wrap .pagination {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.talentum-pagination-wrap .page-item {
    display: inline-flex;
}

.talentum-pagination-wrap .page-link,
.talentum-pagination-wrap span[aria-current="page"] span,
.talentum-pagination-wrap .page-item span {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #0D2C54;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.talentum-pagination-wrap .page-link:hover {
    background: #F39200;
    color: #fff;
    border-color: #F39200;
}

.talentum-pagination-wrap .page-item.active .page-link,
.talentum-pagination-wrap span[aria-current="page"] span {
    background: #0D2C54;
    color: #fff;
    border-color: #0D2C54;
}

.talentum-pagination-wrap .page-item.disabled .page-link,
.talentum-pagination-wrap .page-item.disabled span {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ===== ACCIONES TABLAS ===== */

.talentum-actions{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
    flex-wrap:nowrap;
    white-space:nowrap;
}

.talentum-actions form{
    margin:0;
    padding:0;
    display:flex;
}

.talentum-actions .talentum-btn-icon{
    display:flex;
    justify-content:center;
    align-items:center;
    width:30px;
    height:30px;
    padding:0;
}

/* =========================
   UTILIDADES
========================= */
.talentum-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.talentum-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.talentum-watermark {
    width: 240px;
    opacity: 0.035;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1200px) {
    .talentum-sidebar {
        width: 290px;
        min-width: 290px;
        max-width: 290px;
    }

    .talentum-main-content {
        padding: 16px;
    }

    .talentum-filters-inline {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .talentum-filters-inline .filter-col-1,
    .talentum-filters-inline .filter-col-2,
    .talentum-filters-inline .filter-col-3,
    .talentum-filters-inline .filter-col-4,
    .talentum-filters-inline .filter-col-5,
    .talentum-filters-inline .filter-col-6 {
        grid-column: span 3;
    }
}

@media (max-width: 992px) {
    .talentum-app-shell {
        flex-direction: column;
    }

    .talentum-sidebar {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: auto;
        position: relative;
    }

    .talentum-sidebar-nav {
        max-height: 420px;
    }

    .talentum-filters {
        grid-template-columns: 1fr;
    }

    .talentum-filter-actions {
        justify-content: flex-start;
    }

    .talentum-grid-2,
    .talentum-form-grid {
        grid-template-columns: 1fr;
    }

    .talentum-grid-col-2 {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .talentum-filters-inline {
        grid-template-columns: 1fr;
    }

    .talentum-filters-inline .filter-col-1,
    .talentum-filters-inline .filter-col-2,
    .talentum-filters-inline .filter-col-3,
    .talentum-filters-inline .filter-col-4,
    .talentum-filters-inline .filter-col-5,
    .talentum-filters-inline .filter-col-6 {
        grid-column: span 1;
    }

    .talentum-filter-actions-inline {
        width: 100%;
    }

    .talentum-filter-actions-inline .talentum-btn {
        width: 100%;
    }

    .talentum-topbar {
        padding: 14px 16px;
    }

    .talentum-page-title {
        font-size: 32px;
    }
}