/* components.css */
/* ===== CARD ===== */
.tef-card {
    background: var(--tef-surface);
    border-radius: var(--tef-radius);
    padding: 20px;
    box-shadow: var(--tef-shadow);
}

/* ===== KPI ===== */
.kpi-card {
    border-left: 4px solid var(--tef-gold);
    transition: transform .2s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
}

.kpi-value {
    font-size: 26px;
    font-weight: 700;
}

.kpi-label {
    font-size: 14px;
    color: var(--tef-text-muted);
}

.kpi-icon {
    font-size: 26px;
    color: var(--tef-gold);
}

/* ===== STATUS ===== */
.tef-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 95px;
    text-align: center;
}

.tef-status.success { background: var(--tef-success); }
.tef-status.info    { background: var(--tef-info); }
.tef-status.danger  { background: var(--tef-danger); }

/* ===== PANEL ===== */
.tef-panel {
    background: var(--tef-surface);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--tef-shadow);
}

.tef-panel-title {
    font-weight: 600;
    margin-bottom: 15px;
}

.c-btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.c-table {
    width: 100%;
    border-collapse: collapse;
}

/* ===== DATATABLES DARK ===== */
.dataTables_wrapper {
    color: var(--tef-text);
}

.dataTables_filter input,
.dataTables_length select {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid var(--tef-border);
    border-radius: 10px;
    padding: 6px 10px;
}

.dataTables_paginate .paginate_button {
    background: #1a1a1a !important;
    color: var(--tef-text) !important;
    border: 1px solid var(--tef-border) !important;
    border-radius: 8px;
    margin: 0 2px;
}

.dataTables_paginate .paginate_button.current {
    background: var(--tef-gold) !important;
    color: #000 !important;
    border: none !important;
}

.dataTables_paginate .paginate_button:hover {
    background: #222 !important;
    color: #fff !important;
}

/* ===== INPUT GROUP ===== */
.tef-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tef-input-group label {
    font-size: 13px;
    color: var(--tef-text-muted);
    font-weight: 500;
}

.tef-input-group .helper-text {
    font-size: 12px;
    color: var(--tef-text-muted);
}

.tef-input.is-error {
    border-color: var(--tef-danger);
    box-shadow: 0 0 0 2px rgba(165,58,58,.25);
}

.tef-input.is-success {
    border-color: var(--tef-success);
    box-shadow: 0 0 0 2px rgba(31,122,79,.25);
}

.tef-form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 4px;
}

/* ===== INPUTS ===== */
.tef-input,
.tef-select,
.tef-textarea {
    width: 100%;
    background: var(--tef-surface-soft);
    color: var(--tef-text);
    border: 1px solid var(--tef-border);
    border-radius: var(--tef-radius-sm);
    padding: 10px 12px;
    font-family: var(--tef-font);
    font-size: 14px;
    transition: border .2s ease, box-shadow .2s ease;
}

/* ===== INPUT SIZES (FLEX) ===== */
.tef-input-sm {
    flex: 1 1 160px;
}

.tef-input-md {
    flex: 1 1 300px;
}

.tef-input-lg {
    flex: 1 1 100%;
}


.tef-input::placeholder,
.tef-textarea::placeholder {
    color: var(--tef-text-muted);
}

.tef-input:focus,
.tef-select:focus,
.tef-textarea:focus {
    outline: none;
    border-color: var(--tef-gold);
    box-shadow: 0 0 0 2px var(--tef-gold-soft);
}

/* Botón  */
.tef-btn {
    display: block;
    margin-bottom: 5px;
    padding: 10px;
    border-radius: var(--tef-radius-sm);
    font-weight: 600;
    font-family: var(--tef-font);
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: 
        background .2s ease,
        color .2s ease,
        box-shadow .2s ease;
}

.tef-btn:hover {
    box-shadow: 0 0 0 1px var(--tef-border);
    opacity: 0.95;
}

.tef-btn-primary {
    background: var(--tef-btn-primary-bg);
    color: var(--tef-btn-primary-text);
}

.tef-btn-secondary {
    background: var(--tef-btn-secondary-bg);
    color: var(--tef-btn-secondary-text);
}

.tef-btn-danger {
    background: var(--tef-btn-danger-bg);
    color: var(--tef-btn-danger-text);
}

.tef-btn-success {
    background: var(--tef-btn-success-bg);
    color: var(--tef-btn-success-text);
}

.tef-btn-muted {
    background: var(--tef-btn-muted-bg);
    color: var(--tef-btn-muted-text);
}

.tef-btn-primary {
    background: var(--tef-btn-primary-bg);
    color: var(--tef-btn-primary-text);
}

.tef-btn-secondary {
    background: var(--tef-btn-secondary-bg);
    color: var(--tef-btn-secondary-text);
}

.tef-btn-danger {
    background: var(--tef-btn-danger-bg);
    color: var(--tef-btn-danger-text);
}

.tef-btn-success {
    background: var(--tef-btn-success-bg);
    color: var(--tef-btn-success-text);
}

.tef-btn-muted {
    background: var(--tef-btn-muted-bg);
    color: var(--tef-btn-muted-text);
}

/* =========================
   TEF Table → Card (Mobile)
========================= */
@media (max-width: 991px) {

    .c-table thead {
        display: none;
    }

    .c-table,
    .c-table tbody,
    .c-table tr,
    .c-table td {
        display: block;
        width: 100%;
    }

    .c-table tr {
        background: var(--tef-surface-soft);
        border: 1px solid var(--tef-border);
        border-radius: 14px;
        padding: 12px;
        margin-bottom: 12px;
    }

    .c-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border: none;
        font-size: .85rem;
    }

    .c-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--tef-text-muted);
        margin-right: 12px;
    }

    .c-table td:last-child {
        margin-top: 6px;
        justify-content: flex-end;
    }
}

.tef-dropdown {
    position: relative;
    display: inline-block;
}

.tef-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    min-width: 140px;
    z-index: 10;
}

.tef-dropdown-menu a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
}

.tef-dropdown-menu a:hover {
    background: #f5f5f5;
}

.tef-dropdown:hover .tef-dropdown-menu {
    display: block;
}
