.tc-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.tc-grid-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 1024px) {
    .tc-grid-main {
        grid-template-columns: 1fr;
    }
}

.tc-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.tc-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e293b;
}

.tc-section-header i {
    color: var(--azul-400);
    font-size: 0.85rem;
}

.tc-section-body {
    padding: 14px 16px;
}

.tc-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tc-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tc-field label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gris-600, #475569);
    letter-spacing: 0.2px;
}

.tc-field input,
.tc-field select {
    padding: 7px 10px;
    border: 1.5px solid var(--gris-200, #e2e8f0);
    border-radius: 6px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.78rem;
    color: var(--gris-800, #1e293b);
    background: #fff;
    transition: border-color 0.2s;
    width: 100%;
}

.tc-field input:focus,
.tc-field select:focus {
    outline: none;
    border-color: var(--azul-400);
    box-shadow: 0 0 0 3px rgba(37,99,160,0.12);
}

.tc-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.tc-btn-group {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.tc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: none;
    border-radius: 6px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tc-btn-primary {
    background: var(--azul-400);
    color: #fff;
    box-shadow: 0 2px 6px rgba(37,99,160,0.2);
}

.tc-btn-primary:hover {
    background: var(--azul-500);
    box-shadow: 0 4px 12px rgba(37,99,160,0.3);
    transform: translateY(-1px);
}

.tc-btn-success {
    background: var(--azul-400);
    color: #fff;
    box-shadow: 0 2px 6px rgba(37,99,160,0.2);
}

.tc-btn-success:hover {
    background: var(--azul-500);
    box-shadow: 0 4px 12px rgba(37,99,160,0.3);
    transform: translateY(-1px);
}

.tc-btn-warning {
    background: #f59e0b;
    color: #fff;
}

.tc-btn-warning:hover {
    background: #d97706;
}

.tc-btn-danger {
    background: #ef4444;
    color: #fff;
}

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

.tc-btn-outline {
    background: #fff;
    color: var(--azul-400);
    border: 1px solid var(--azul-300, #3B82B8);
}

.tc-btn-outline:hover {
    background: #f8fafc;
    border-color: var(--azul-400);
}

.tc-btn-sunat {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    font-weight: 600;
}

.tc-btn-sunat:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
}

.tc-btn-sunat:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.tc-table-wrap {
    overflow-x: auto;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: var(--blanco);
    border: 1px solid var(--gris-200);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.tc-tabla {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.tc-tabla th {
    position: sticky !important;
    top: 0;
    background: var(--azul-500);
    color: #fff;
    padding: 8px 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    z-index: 1;
    white-space: nowrap;
    border-bottom: 2px solid var(--azul-700, #0F2847);
}
.tc-tabla thead tr th:first-child { border-radius: 6px 0 0 0; }
.tc-tabla thead tr th:last-child { border-radius: 0 6px 0 0; }

.tc-tabla td {
    padding: 4px 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.7rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    line-height: 1.3;
}

.tc-tabla tr:hover td {
    background: #f8fafc;
}

.tc-tabla tr.tc-selected td {
    background: #eff6ff;
}

.tc-tabla .tc-col-fecha { width: 120px; }
.tc-tabla .tc-col-compra { width: 120px; text-align: right; }
.tc-tabla .tc-col-venta { width: 120px; text-align: right; }
.tc-tabla .tc-col-fuente { width: 100px; }
.tc-tabla .tc-col-acciones { width: 80px; text-align: center; }

.tc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.tc-badge-sunat {
    background: #dbeafe;
    color: #1d4ed8;
}

.tc-badge-manual {
    background: #f1f5f9;
    color: #64748b;
}

.tc-filtros {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: var(--azul-50, #eff6ff);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.tc-filtros .tc-field {
    min-width: 130px;
}

.tc-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.tc-footer-info {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.72rem;
    color: #64748b;
}

.tc-resultado {
    padding: 10px 14px;
    border-radius: 6px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.78rem;
    display: none;
}

.tc-resultado-ok {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    display: block;
}

.tc-resultado-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: block;
}

.tc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #64748b;
    font-size: 13px;
}

.tc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    color: #94a3b8;
    gap: 8px;
}

.tc-empty i {
    font-size: 28px;
    color: #cbd5e1;
}

.tc-mes-anio {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.tc-mes-anio .tc-field {
    flex: 1;
}

.tc-btn-print {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s;
}

.tc-btn-print:hover {
    background: #e2e8f0;
    color: #1e293b;
}
